-
Notifications
You must be signed in to change notification settings - Fork 218
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
Converting existing gradle DSL from groovy to kotlin. #2453
Conversation
plugins { | ||
val smithyGradleVersion : String by settings | ||
id("software.amazon.smithy.gradle.smithy-jar") version smithyGradleVersion | ||
} |
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.
Previously we would pin the version in specific subprojects' build.gradle.kts
like this:
plugins {
id("software.amazon.smithy.gradle.smithy-jar") version smithyGradleVersion
}
However I found that the correct way to do version pinning for dependencies from gradle.properties
is this.
This is also temporary while we move to the versions.toml
approach like other projects and buildSrc
based plugins in future PRs.
References:
We deliberately switched to groovy from kotlin, though I don't remember the context on why. @kstich did it iirc and he might remember. |
** Why is this needed ? ** This is the first step in moving to a more consistent and composable experience for gradle configuration in the smithy repository. Writing it in kotlin to make it more expressive as compared to groovy. This commit just converts the existing gradle build from groovy to kotlin. ** Next steps: ** Once this change is merged, few other PRs will follow to introduce nice features such as `buildSrc` plugins to enhance configurability of how each sub project builds in this package. It will introduce flexibility in things such as allowing each subproject to compile with different JVM toolchain, and much more.
57b7a82
to
d99babe
Compare
d99babe
to
c035320
Compare
Why is this needed ?
This is the first step in moving to a more consistent and composable experience for gradle configuration in the smithy repository. Writing it in kotlin to make it more expressive as compared to groovy. This commit just converts the existing gradle build from groovy to kotlin.
Next steps:
Once this change is merged, few other PRs will follow to introduce nice features such as
buildSrc
plugins to enhance configurability of how each sub project builds in this package. It will introduce flexibility in things such as allowing each subproject to compile with different JVM toolchain, and much more.Testing
gradle clean && gradle build
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.