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

gradle: Make default Bundle-SymbolicName and Bundle-Version inputs #5280

Merged
merged 2 commits into from Jun 14, 2022

Conversation

bjhargrave
Copy link
Member

If Bundle-SymbolicName and/or Bundle-Version are not specified in the
bnd instructions, then BundleTaskExtension will set default values
based upon the Jar task's archiveBaseName, archiveClassifier, and
archiveVersion properties. However, these Jar task properties are not
considered inputs to the Jar task. They are just considered as
parts of the archiveFile property which is an output property.

Setting the defaults as input properties means that Gradle will consider
them as part of the build cache key. This is important since the values
can end up in the build jar's manifest.

Fixes #5279

bjhargrave added 2 commits Jun 14, 2022
BundleTaskExtension supports using the Jar manifest property to
set attributes in the manifest main attribute section. However
it did not properly handle the use of a Provider to supply the value.
This fix is now in line with how the Gradle Manifest object handles
converting attribute values to a String.

Signed-off-by: BJ Hargrave <bj@hargrave.dev>
If Bundle-SymbolicName and/or Bundle-Version are not specified in the
bnd instructions, then BundleTaskExtension will set default values
based upon the Jar task's archiveBaseName, archiveClassifier, and
archiveVersion properties. However, these Jar task properties are not
considered inputs to the Jar task. They are just considered as
parts of the archiveFile property which is an output property.

Setting the defaults as input properties means that Gradle will consider
them as part of the build cache key. This is important since the values
can end up in the build jar's manifest.

Fixes bndtools#5279

Signed-off-by: BJ Hargrave <bj@hargrave.dev>
@bjhargrave bjhargrave merged commit 017248d into bndtools:master Jun 14, 2022
9 of 10 checks passed
@bjhargrave bjhargrave deleted the issues/5279 branch Jun 14, 2022
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

Successfully merging this pull request may close these issues.

BundleTaskExtension$BuildAction adds undeclared inputs to jar tasks
1 participant