Skip to content

Commit b79fc29

Browse files
committed
Rename the gradle property useDdprofSnapshot -> ddprofUseSnapshot
1 parent e07d345 commit b79fc29

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,7 @@ deploy_snapshot_with_ddprof_snapshot:
898898
- export GPG_PRIVATE_KEY=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.signing.gpg_private_key --with-decryption --query "Parameter.Value" --out text)
899899
- export GPG_PASSWORD=$(aws ssm get-parameter --region us-east-1 --name ci.dd-trace-java.signing.gpg_passphrase --with-decryption --query "Parameter.Value" --out text)
900900
- echo "Publishing dd-trace-java snapshot with ddprof snapshot dependency"
901-
- ./gradlew -PbuildInfo.build.number=$CI_JOB_ID -PuseDdprofSnapshot=true publishToSonatype -PskipTests $GRADLE_ARGS
901+
- ./gradlew -PbuildInfo.build.number=$CI_JOB_ID -PddprofUseSnapshot=true publishToSonatype -PskipTests $GRADLE_ARGS
902902
artifacts:
903903
paths:
904904
- 'workspace/dd-java-agent/build/libs/*.jar'

dd-java-agent/ddprof-lib/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies {
1616

1717
// Log information about ddprof version being used
1818
afterEvaluate {
19-
if (rootProject.hasProperty('ddprofSnapshotVersion')) {
19+
if (rootProject.hasProperty('ddprofUseSnapshot')) {
2020
logger.lifecycle("${project.name}: Using ddprof SNAPSHOT version ${rootProject.ext.ddprofSnapshotVersion}")
2121
}
2222
}

docs/publishing-with-ddprof-snapshot.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This feature allows publishing dd-trace-java snapshot versions that depend on a
1010

1111
### Version Qualification
1212

13-
To avoid overwriting standard snapshot artifacts, builds with `-PuseDdprofSnapshot=true` will have a `-ddprof` qualifier added to their version:
13+
To avoid overwriting standard snapshot artifacts, builds with `-PddprofUseSnapshot=true` will have a `-ddprof` qualifier added to their version:
1414

1515
- Standard snapshot: `1.58.0-SNAPSHOT`
1616
- With ddprof snapshot: `1.58.0-ddprof-SNAPSHOT`
@@ -24,7 +24,7 @@ This ensures that both versions can coexist in Maven Central Snapshots repositor
2424
To verify that the ddprof snapshot version is correctly calculated and applied:
2525

2626
```bash
27-
./gradlew -PuseDdprofSnapshot=true :dd-java-agent:ddprof-lib:dependencies --configuration runtimeClasspath
27+
./gradlew -PddprofUseSnapshot=true :dd-java-agent:ddprof-lib:dependencies --configuration runtimeClasspath
2828
```
2929

3030
Look for the output:
@@ -38,15 +38,15 @@ Look for the output:
3838
To build the project with the ddprof snapshot dependency:
3939

4040
```bash
41-
./gradlew build -PuseDdprofSnapshot=true
41+
./gradlew build -PddprofUseSnapshot=true
4242
```
4343

4444
### Publishing to Maven Central Snapshots
4545

4646
To publish artifacts with the ddprof snapshot dependency:
4747

4848
```bash
49-
./gradlew publishToSonatype -PuseDdprofSnapshot=true -PskipTests
49+
./gradlew publishToSonatype -PddprofUseSnapshot=true -PskipTests
5050
```
5151

5252
**Note:** You must have the required credentials configured:
@@ -67,7 +67,7 @@ A GitLab CI job named `deploy_snapshot_with_ddprof_snapshot` is available for ma
6767
3. Click the manual play button to trigger it
6868

6969
**What it does:**
70-
- Builds dd-trace-java with `-PuseDdprofSnapshot=true`
70+
- Builds dd-trace-java with `-PddprofUseSnapshot=true`
7171
- Publishes to Maven Central Snapshots repository
7272
- Produces artifacts with the ddprof snapshot dependency
7373

@@ -87,7 +87,7 @@ A GitLab CI job named `deploy_snapshot_with_ddprof_snapshot` is available for ma
8787

8888
### How It Works
8989

90-
1. The Gradle property `-PuseDdprofSnapshot=true` activates the feature
90+
1. The Gradle property `-PddprofUseSnapshot=true` activates the feature
9191
2. The configuration reads `gradle/libs.versions.toml` to get the current ddprof version
9292
3. Version is parsed using regex: `ddprof = "X.Y.Z"`
9393
4. Snapshot version is calculated: `X.(Y+1).0-SNAPSHOT`
@@ -136,6 +136,6 @@ This ensures that even transitive dependencies on ddprof are overridden.
136136
**Cause:** The property might not be correctly set or parsed.
137137

138138
**Solutions:**
139-
- Ensure you're using `-PuseDdprofSnapshot=true` (not `-DuseDdprofSnapshot`)
139+
- Ensure you're using `-PddprofUseSnapshot=true` (not `-DddprofUseSnapshot`)
140140
- Check Gradle output for "Using ddprof snapshot version" message
141141
- Run with `--info` flag to see detailed dependency resolution logs

gradle/ddprof-override.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Configuration for using ddprof snapshot versions
2-
// When -PuseDdprofSnapshot=true is set, this will:
2+
// When -PddprofUseSnapshot=true is set, this will:
33
// 1. Parse the current ddprof version from libs.versions.toml
44
// 2. Calculate the next minor snapshot version: X.Y.Z -> X.(Y+1).0-SNAPSHOT
55
// 3. Override the ddprof dependency resolution to use the snapshot version
66
// 4. Add a qualifier to the dd-trace-java version to avoid overwriting standard snapshots
77

8-
def useDdprofSnapshot = project.hasProperty('useDdprofSnapshot') && project.property('useDdprofSnapshot').toBoolean()
8+
def ddprofUseSnapshot = project.hasProperty('ddprofUseSnapshot') && project.property('ddprofUseSnapshot').toBoolean()
99

10-
if (useDdprofSnapshot) {
10+
if (ddprofUseSnapshot) {
1111
def ddprofSnapshotVersion = calculateDdprofSnapshotVersion()
1212
logger.lifecycle("Using ddprof snapshot version: ${ddprofSnapshotVersion}")
1313

0 commit comments

Comments
 (0)