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

Upgrade Gradle of examples to 7.2., fix println using non-existent property #3600

Merged

Conversation

Oberon00
Copy link
Member

By using the same (or newer) gradle version as in the main build we can in theory start looking into making the examples buildable with a composite build (cf. open-telemetry/opentelemetry-java-instrumentation#3626)

zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionSha256Sum=f581709a9c35e9cb92e16f585d2c4bc99b2b1a5f85d2badbd3dc6bff59e1e6dd
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copied from main build.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think gradle itself will generate these for you if you use the wrapper task, but this is also fine. :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did use the wrapper task, but it removed the SHA 😕 maybe there is some extra option.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird. it shouldn't do that, I wouldn't think.

@@ -2,7 +2,7 @@ pluginManagement {
plugins {
id "com.diffplug.spotless" version "5.6.1"
id "com.github.johnrengelman.shadow" version "6.1.0"
id 'com.google.protobuf' version '0.8.8'
id 'com.google.protobuf' version '0.8.17'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had to upgrade this since the old version was accessing the no longer existing compile configuration internally.

@@ -3,7 +3,16 @@ plugins {
id "com.github.johnrengelman.shadow" apply false
}

println("Building against OpenTelemetry version: ${project.properties["io.opentelemetry.version"]}")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This always printed null, and a property which this name is nowhere to be found and not used anywhere else.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, this was left over from when we could build against different versions with a provided property. Good catch!

@@ -3,7 +3,16 @@ plugins {
id "com.github.johnrengelman.shadow" apply false
}

println("Building against OpenTelemetry version: ${project.properties["io.opentelemetry.version"]}")
ext {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved the ext block outside the subprojects block since subprojects will fall back to their parent project's ext properties and this makes it possible to print the version here.

@Oberon00 Oberon00 changed the title Upgrade Gradle of examples to 7.2. Upgrade Gradle of examples to 7.2., fix println using non-existent property Sep 10, 2021
Copy link
Contributor

@jkwatson jkwatson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jkwatson jkwatson merged commit 7bbf19a into open-telemetry:main Sep 10, 2021
@Oberon00 Oberon00 deleted the upgrade-example-gradle branch September 10, 2021 15:02
This was referenced Dec 19, 2021
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.

2 participants