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

Add removeJarVersionNumbers build setting #8116

Merged
merged 3 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ and then you can find the java agent artifact at

`javaagent/build/libs/opentelemetry-javaagent-<version>.jar`.

To simplify local development, you can remove the version number from the build product. This allows
the file name to stay consistent across versions. To do so, add the following to
`~/.gradle/gradle.properties`.

```properties
removeJarVersionNumbers=true
```

## IntelliJ setup and troubleshooting

See [IntelliJ setup and troubleshooting](docs/contributing/intellij-setup-and-troubleshooting.md)
Expand Down
6 changes: 6 additions & 0 deletions javaagent/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ tasks {
dependsOn(shadowJar, baseJavaagentJar)
}

if (findProperty("removeJarVersionNumbers") == "true") {
withType<AbstractArchiveTask>().configureEach {
archiveVersion.set("")
}
}

withType<Test>().configureEach {
dependsOn(shadowJar)

Expand Down