-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add support for Gradle Kotlin DSL #9353
Conversation
Thanks a lot for this! @maxandersen @aloubyansky I think you'll probably want to check this out |
...est/resources/add-extension-multi-module-kotlin-dsl/gradle/wrapper/gradle-wrapper.properties
Outdated
Show resolved
Hide resolved
Thanks @mgorniew |
d1da13f
to
b5c6b5b
Compare
b5c6b5b
to
8cf38b8
Compare
@aloubyansky what's the status of this one? It has a lot of conflicts now unfortunately :/ |
We need to rebase this. @mgorniew sorry, I am not sure why I didn't merge it, tbh. If you could rebase it, it'll be much appreciated, if not then I'll look into this. |
I will rebase this tomorrow.
pt., 10 lip 2020, 16:51 użytkownik Alexey Loubyansky <
[email protected]> napisał:
… We need to rebase this. @mgorniew <https://github.com/mgorniew> sorry, I
am not sure why I didn't merge it, tbh. If you could rebase it, it'll be
much appreciated, if not then I'll look into this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9353 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADIDQ4ZHDISEN4TJQOH5DE3R24TG5ANCNFSM4NBWUIFA>
.
|
|
||
java { | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 |
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 think you should remove this, since our CI will be also testing it under Java 11. And I remember we had issues with Kotlin and Java 14. If you run into that, the tests may need to be disabled for that version.
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.
Just as a quick note, everything related to generating new project using Kotlin DSL is going to be replaced by the new codestart system, so we will soon need to implement it there too: |
8cf38b8
to
b8d38a7
Compare
@aloubyansky this one got outdated again. Maybe you could sync with @mgorniew at the beginning of the 1.8 cycle? |
Looking at my emails I don't see a notification of the pushed update. That is strange. But explains how I missed it. Sorry again @mgorniew At this point though I would take @ia3andy's suggestion. @mgorniew you've got all the reasons to lose your motivation by now. Sorry about that. In case you still would like to get this feature in, please let @ia3andy know. We need it for sure. |
@mgorniew it would be a pleasure to help you to add kotlin dsl as a codestart.. let me know :) |
@ia3andy I think best way is to wait now for #10372 merge. Then I can rebase this PR and add kotlin dsl to codestart. I didn't have time yet to look at codedstart, so for now I've only have one question. With#10372, does all changes made in this PR are still valid and I should just add something more to support codestart? Or some functionality was moved entirely to codestarts, eg. templates from platform-descriptor-json? |
The goal with codestarts is to replace all the current codegen (templates from platform-descriptor-json), but we don't plan to migrate in one shot, the current templates will be the default until this is stable enough. So instead of having the Kotlin DSL as part of the future "legacy" codegen, I think it makes sense to have kotlin DSL as experimental in the codestarts to start. It could also be a way to make people use the codestarts so we gather some feedback :) |
@ia3andy ok, so I will keep plugins changes (to add/remove extensions, etc.) and move templates/project bootstrapping code to codestarts. |
Yes you need to keep the code the Add/Remove code, this is meant to be kept! |
thanks @mgorniew |
@mgorniew Codestarts are merged :) I think that kotlin DSL codestart will be really close to the gradle one: Let me know if you have questions.. |
@ia3andy Ok, thanks. I will look at this and try to update this pull request tomorrow. |
b8d38a7
to
493d066
Compare
@aloubyansky @ia3andy I've made changes required to support codestarts, please review. I've found two possible issues:
|
This was a mistake and will be fixed with:
I think that's a bug, why would we add it multiple time? @mgorniew also note that in the commit I inverted version to |
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.
LGTM
Thanks @mgorniew that's a great contribution. Please create an issue for the duplicated enforcedPlatform. |
@aloubyansky I've created #11251 for dependencies issue. |
493d066
to
9726174
Compare
@ia3andy @aloubyansky @gastaldi Please check rebased code. This include fix from #11255, but it is handled in slightly different way. I hope to make this less fragile with #11303, but I would like to have this merged into master first. |
devtools/maven/src/main/java/io/quarkus/maven/CreateProjectMojo.java
Outdated
Show resolved
Hide resolved
...ools-common/src/main/java/io/quarkus/devtools/project/buildfile/AbstractGradleBuildFile.java
Show resolved
Hide resolved
9726174
to
5c260f4
Compare
@gastaldi could you have a look before I merge, it now takes rebase with your fix for bom. |
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.
@mgorniew I missed it sorry, but you need to add the Gradle wrappers to the new buildtool codestart, have a look to the Gradle one (don't forget to also add the version data).
It should be a matter of seconds :)
5c260f4
to
8d04d3c
Compare
@ia3andy I've added wrapper. |
8d04d3c
to
e187e13
Compare
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.
Good job!
@mgorniew it seems tests are failing, can you have a look? |
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.
Ok I found the problem for JDK 11 tests, you need to use kotlin.version
in the templates. For JDK 8, I have no idea..
...in/resources/bundled-codestarts/buildtool/gradle-kotlin-dsl/kotlin/build.tpl.qute.gradle.kts
Outdated
Show resolved
Hide resolved
...in/resources/bundled-codestarts/buildtool/gradle-kotlin-dsl/kotlin/build.tpl.qute.gradle.kts
Outdated
Show resolved
Hide resolved
e187e13
to
e661c7b
Compare
...ion-tests/devtools/src/test/java/io/quarkus/devtools/codestarts/CodestartProjectRunTest.java
Show resolved
Hide resolved
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.
Crossing fingers this one is the one :)
Good job @mgorniew!! |
Hi,
This will add support for Kotlin DSL in Quarkus Gradle tools.
It will also fix #5776