-
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
Improve gradle docs by adding kotlin snippets #45344
base: main
Are you sure you want to change the base?
Conversation
Thanks for your pull request! Your pull request does not follow our editorial rules. Could you have a look?
This message is automatically generated by a bot. |
🎊 PR Preview 0d6a99e has been successfully built and deployed to https://quarkus-pr-main-45344-preview.surge.sh/version/main/guides/
|
This comment has been minimized.
This comment has been minimized.
043a1e7
to
019dd43
Compare
This comment has been minimized.
This comment has been minimized.
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.
Sorry for not replying earlier. I was skeptical at first as it requires more maintenance but given they are switching to Kotlin first, it's probably a good idea to consider this, or at least a version of this.
You will see some comments inline: the thing is that if we can reduce the number of alternatives by using the same approach we had for the extension in guides (https://quarkus.io/guides/validation#creating-the-maven-project), it would have my preference.
Also, can you clarify when kts became the default? If it's in a current Gradle version, I think I'm fine with making it the first alternative.
---- | ||
pluginManagement { | ||
repositories { | ||
mavenCentral() | ||
gradlePluginPortal() | ||
} | ||
plugins { | ||
id 'io.quarkus.extension' version "${quarkus.version}" <1> | ||
id 'io.quarkus.extension' version "{quarkus-version}" <1> |
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.
The variable is not available here? I think we are supposed to have a variable in the generated project?
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.
There is no project generation available for an extension using gradle with quarkus cli, that's why i used the quarkus version variable from the ascii doc here.
We could add to the page a gradle.properties
to have the same behaviour as a non extension quarkus application and reuse the same variables.
gradlePluginPortal() | ||
} | ||
plugins { | ||
id("io.quarkus.extension") version "{quarkus-version}" <1> |
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.
Same question here about the variable?
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.
Same answer as previous one, and with kotlin it would have to be renamed to quarkusVersion
implementation platform("io.quarkus:quarkus-bom:${quarkus.version}") | ||
|
||
implementation 'io.quarkus:quarkus-arc-deployment' | ||
implementation platform("{quarkus-platform-groupid}:quarkus-bom:{quarkus-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.
Same here about the variable?
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.
Same answer as previous one. Would need a new file gradle.properties file in the doc.
I don't really understand, you mean to avoid having two versions of the gradle build, and keep only one ?
It became the default since gradle 8.2: https://blog.gradle.org/kotlin-dsl-is-now-the-default-for-new-gradle-builds
|
Status for workflow
|
Improve the quarkus gradle docs by adding kotlin code snippets next to the groovy ones where appropriate.
Also use version attributes instead of hard coded versions in some cases.
We could also improve by switching the first language on display docs from
groovy
tokotlin
as now it is the default for new gradle projects since Gradle 8.2 .