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

Add Gradle #75

Closed
vorburger opened this issue Mar 7, 2019 · 5 comments
Closed

Add Gradle #75

vorburger opened this issue Mar 7, 2019 · 5 comments

Comments

@vorburger
Copy link
Contributor

started in master...vorburger:gradle

currently blocked by quarkusio/quarkus#1323

@stalep FYI

@vorburger
Copy link
Contributor Author

vorburger commented Mar 11, 2019

quarkusio/quarkus#1323 is now fixed, and when there is a new Quarkus 0.12.0 release I'll bump the versions in getting-started/build.gradle of master...vorburger:gradle and raise a PR from that branch.

@vorburger
Copy link
Contributor Author

@jnizet given your quarkusio/quarkus#1403, shout via comments here if you have an feedback on master...vorburger:gradle ... (no PR actually raised yet, as waiting for release, or if you prefer I could raise a DRAFT PR that you can edit?).

@jnizet
Copy link

jnizet commented Mar 11, 2019

@vorburger My feedback would be to rey to avoid apply plugin xxx, and instead do as I suggest in quarkusio/quarkus#1403.

Applying plugins imperatively that way is discouraged for a long time by Gradle in favor of using the plugins block.

The main reasons are that

  • it's simple (at least when the plugin is deployed in the gradle plugin central, otherwise you need to adapt the settings.gradle file), because you don't have to add anything to the buildscript classpath. I'm not sure why it isn't publshed in the plugin central yet.
  • it's what allows using the Gradle Kotlin DSL in an idiomatic way.

For example, if you use apply(plugin = ...) in a Kotlin build script, You can't use the idiomatic

quarkus {
    // ...
}

to configure the Quarkus extension. Instead, you need to add an import for the extension, and use something like

configure<QuarkusExtension> {
    // ...
}

Same for configuring the tasks added by the plugin: you don't benefit anymore for the type-safe, auto-completable extensions provided by Gradle when a plugin is applied by the plugins block.

See https://docs.gradle.org/current/userguide/plugins.html#sec:plugins_block for more information.

@vorburger
Copy link
Contributor Author

avoid apply plugin xxx, and instead do as I suggest in quarkusio/quarkus#1403.

@jnizet I've done this in commit be5712a on #90 - would you like to review?

quarkusio/quarkus#1323 is now fixed, and when there is a new Quarkus 0.12.0 release I'll bump the versions in getting-started/build.gradle of master...vorburger:gradle and raise a PR from that branch.

This happened in today's commit 9743fd7 on #90 - now ready for merge, from my side.

@vorburger
Copy link
Contributor Author

#90 was merged a while ago, so closing this now. (But note new #136.)

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

2 participants