Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

集成gradle #41

Closed
mychao opened this issue Aug 10, 2018 · 5 comments
Closed

集成gradle #41

mychao opened this issue Aug 10, 2018 · 5 comments

Comments

@mychao
Copy link

mychao commented Aug 10, 2018

项目中现在用到了gradle、用到了官方的generator,如何再引入这个插件,还请执教,谢谢

@mychao
Copy link
Author

mychao commented Aug 13, 2018

@itfsw 楼主,请问gradle如何集成?🙏

@itfsw
Copy link
Owner

itfsw commented Aug 13, 2018

好像只能用ant去做集成,具体你可以参考官方文档

@masa-kunikata
Copy link

Hi,

I'm using the Gradle to develop MyBatis Generator plugins
with @itfsw 's great library. Thank you very much!!!

the link below is a sample build.gradle i'm using
https://gist.github.com/masa-kunikata/daaf0f51a8ab9b808f61805407e1654c

1, prepare your generatorConfig.xml and place it
to the path mybatisGenerator{configFile =specified.
2, gradle init to make a Gradle project folder.
3, replace the build.gradle file
4, you can do
gradle mbGenerator
task to generate soruce files.

Hope this helps.

@itfsw
Copy link
Owner

itfsw commented Sep 11, 2018

thanks @masa-kunikata

@panpanliuBJ
Copy link

Execution failed for task ':mbGenerator'.
> Could not resolve all files for configuration ':mybatisGenerator'.
   > Could not resolve project :.
     Required by:
         project :
      > Cannot choose between the following variants of project ::
          - productionRuntimeClasspath
          - runtimeElements
        All of them match the consumer attributes:
          - Variant 'productionRuntimeClasspath' capability com.bixi:trade:1.0-SNAPSHOT:
              - Unmatched attributes:
                  - Provides org.gradle.dependency.bundling 'external' but the consumer didn't ask for it
                  - Provides org.gradle.libraryelements 'jar' but the consumer didn't ask for it
                  - Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it
          - Variant 'runtimeElements' capability com.bixi:trade:1.0-SNAPSHOT:
              - Unmatched attributes:
                  - Provides org.gradle.category 'library' but the consumer didn't ask for it
                  - Provides org.gradle.dependency.bundling 'external' but the consumer didn't ask for it
                  - Provides org.gradle.jvm.version '14' but the consumer didn't ask for it
                  - Provides org.gradle.libraryelements 'jar' but the consumer didn't ask for it
                  - Provides org.gradle.usage 'java-runtime' but the consumer didn't ask for it

I met the question, copy it from the reference.
jvm: jdk 14

please give me help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants