-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Convert Gradle config parameters (such as jib.to.image and jib.to.tags) to use Property type #2727
Comments
Yeah I don't think you can use GString lazy eval, but you can use |
Much like we currently use jib/jib-gradle-plugin/src/main/java/com/google/cloud/tools/jib/gradle/JibExtension.java Line 96 in 9a39d8f
|
once this is released, we should also update the answer here: https://stackoverflow.com/questions/59588495/jib-plugin-not-able-to-access-project-version-as-updated-by-another-gradle-plugi/59631660#59631660 UPDATE: done |
I tried using
gradle-git-properties
Gradle plugin to set a git commit as an image tag. Following their plugin doc,Running
./gradlew printGitProperties
works as documented.The doc also shows an example using Groovy GString lazy evaluation.
I confirm
./gradlew jar
works and theMANIFEST.MF
in the JAR contains theBuild-Revision
attribute.However, we still can't use GString lazy evaluation with most of the Jib properties. It fails with "Cannot get property 'gitProps' on extra properties extension as it does not exist."
I think it makes sense to convert
jib.to.image
andjib.to.tags
toProperty<String>
andSetProperty<String>
.Property<String>
has two.set()
methods, one with signature.set(String)
and the other with.set(Provider<String>)
, which I think will allow configuring these values lazily.The text was updated successfully, but these errors were encountered: