集成gradle
mychao opened this issue · 5 comments
mychao commented
项目中现在用到了gradle、用到了官方的generator,如何再引入这个插件,还请执教,谢谢
masa-kunikata commented
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 commented
thanks @masa-kunikata
panpanliuBJ commented
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