jponge / vertx-gradle-plugin

An opinionated Gradle plugin for Vert.x projects
Apache License 2.0
113 stars 15 forks source link

Use Kotlin DSL for Gradle files #24

Closed gmariotti closed 5 years ago

gmariotti commented 6 years ago

This is how it will look like using the Kotlin DSL. I'm not 100% sure about create("vertxPlugin"), I think it needs to be tested. Also, the wrapper task is not needed, you can update the gradle-wrapper with ./gradlew wrapper --gradle-version=4.10.2 --distribution-type=all. But I can put it back if you prefer.

jponge commented 6 years ago

Thanks @gmariotti I will test it.

Yes, can you please pull back the wrapper task? I tend to prefer it, but that is a very personal matter.

gmariotti commented 6 years ago

@jponge no worries, I've put it back

jponge commented 5 years ago

I'm likely going to switch our build to the Kotlin DSL using your PR ;-)

gmariotti commented 5 years ago

That's great news. I'll rebase the branch between today and tomorrow to remove the conflicts. Should we also look into updating Gradle to 5.0?

jponge commented 5 years ago

Yes, obviously Gradle 5.0 has Kotlin DSL 1.0 support so we should move to it.

On 19 Dec 2018, at 17:02, Guido Pio Mariotti notifications@github.com wrote:

That's great news. I'll rebase the branch between today and tomorrow to remove the conflicts. Should we also look into updating Gradle to 5.0?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

gmariotti commented 5 years ago

@jponge fixed the conflicts and updated to Gradle 5.0

jponge commented 5 years ago

Strange, tests now fail, e.g.:

org.gradle.testkit.runner.UnexpectedBuildFailure: Unexpected build execution failure in /Users/jponge/Code/vertx/vertx-gradle-plugin/src/test/gradle/simple-project with arguments [clean, build]

Output:

FAILURE: Build failed with an exception.

* What went wrong:
Project directory '/Users/jponge/Code/vertx/vertx-gradle-plugin/src/test/gradle/simple-project' is not part of the build defined by settings file '/Users/jponge/Code/vertx/vertx-gradle-plugin/settings.gradle.kts'. If this is an unrelated build, it must have it's own settings file.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org
gmariotti commented 5 years ago

Strange, I'll give it a look and see if I find what is wrong

gmariotti commented 5 years ago

Should be fixed now. I think Gradle wasn't able to figure it out that simple-project was a project on its own without the settings.gradle file. Out of curiosity, when will you release the next version?

jponge commented 5 years ago

Thanks!

jponge commented 5 years ago

@gmariotti I will merge then release

gmariotti commented 5 years ago

That's great!! Is there anything else I can help you with? I was thinking, maybe, on migrating the tests to Junit 5 and have a similar simple-project test but with .kts gradle files

jponge commented 5 years ago

Sure, please feel-free to propose improvements and I’ll happily review those!

On 2 Jan 2019, at 15:30, Guido Pio Mariotti notifications@github.com wrote:

That's great!! Is there anything else I can help you with? I was thinking, maybe, on migrating the tests to Junit 5 and have a similar simple-project test but with .kts gradle files

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.