-
Notifications
You must be signed in to change notification settings - Fork 37
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
Remove the kotlin-dsl
plugin
#112
Conversation
@@ -56,7 +56,7 @@ Once you setup the plugin correctly, you can call the `:generateSwagger` gradle | |||
|
|||
In order to run this gradle plugin you need to fulfill the following requirements: | |||
|
|||
* Gradle 5.x - This plugin uses Gradle 5 features, and you will need to setup your Gradle wrapper to use 5.0 or more. | |||
* Gradle 5.x - This plugin uses Gradle 5 features, and you will need to setup your Gradle wrapper to use 5.4.1 or more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I bumped from 5.0
to 5.4.1
because the testProject fails on 5.0
due to:
Build file '/home/martin/git/swagger-gradle-codegen/gradle-plugin/plugin/junit7355662627637669365/project/build.gradle.kts' line: 9
* What went wrong:
Script compilation errors:
Line 09: content {
^ Unresolved reference: content
Line 10: excludeGroup("com.yelp.codegen")
^ Unresolved reference: excludeGroup
I think it should be safe to assume most people are using gradle >= 5.4.1 but we can certainly remove that limitation if really needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@martinbonnin I would personally prefer to use kotlin-dsl
as far as possile.
I did open #111 to deal with the problem mentioned in #108 .
The approach proposed on the other PR has one "major" downside: the project itself cannot benefit from the latest gradle features. But I don't think it is going to be a major blocker.
+1 |
@macisamuele no problem if you want to keep it but as you said, it's bringing a downside and I don't see the upside. The amount of code is almost similar and it might bring things like |
That is convenient as it simplifies our Gradle setup. I'll try to stick to it as long as it's possible. Although, I don't have a really strong opinion on this, we could even drop if you have a strong argument @martinbonnin 👍 |
9efca79
to
dd3b50c
Compare
gradle-plugin/plugin/src/test/java/com/yelp/plugin/PluginTests.kt
Outdated
Show resolved
Hide resolved
Following up the discussions we had on Slack here We decided for replacing |
Closes #108
It turns out the
kotlin-dsl
plugin embeds code that's using Gradle 6.1 classes while we shouldn't really need this. Remove it and use the plainjava-gradle-plugin
instead.Also add some checks and tests about Gradle version.