Skip to content

Commit 11d2c87

Browse files
committed
Split out the third-party dependencies of build-scan-summary into a separate jar
`lib/develocity` contains the proprietary code `lib/third-party` contains the third-party open source libraries. In this commit, all OSS libraries are contained in a single jar.
1 parent fc159ea commit 11d2c87

7 files changed

+14
-4
lines changed

Diff for: build.gradle.kts

+9-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ val isDevelopmentRelease = !hasProperty("finalRelease")
3636
val releaseVersion = releaseVersion()
3737
val releaseNotes = releaseNotes()
3838
val distributionVersion = distributionVersion()
39-
val buildScanSummaryVersion = "0.9-2024.1.1-20240503130149"
39+
val buildScanSummaryVersion = "0.9-2024.1.2-20240515173555"
4040

4141
allprojects {
4242
version = releaseVersion.get()
@@ -133,6 +133,10 @@ val copyGradleScripts by tasks.registering(Copy::class) {
133133
include("build-scan-summary-${buildScanSummaryVersion}.jar")
134134
into("lib/develocity/")
135135
}
136+
from(layout.projectDirectory.dir("components/third-party")) {
137+
include("build-scan-summary-dependencies-${buildScanSummaryVersion}.jar")
138+
into("lib/third-party/")
139+
}
136140
into(layout.buildDirectory.dir("scripts/gradle"))
137141
}
138142

@@ -177,6 +181,10 @@ val copyMavenScripts by tasks.registering(Copy::class) {
177181
include("build-scan-summary-${buildScanSummaryVersion}.jar")
178182
into("lib/develocity/")
179183
}
184+
from(layout.projectDirectory.dir("components/third-party")) {
185+
include("build-scan-summary-dependencies-${buildScanSummaryVersion}.jar")
186+
into("lib/third-party/")
187+
}
180188
from(mavenComponents) {
181189
into("lib/scripts/maven-libs/")
182190
}
Binary file not shown.
Binary file not shown.

Diff for: components/scripts/lib/build-scan-offline.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ read_build_scan_dumps() {
3838
)
3939

4040
echo "Extracting Build Scan data for all builds"
41-
build_scan_data="$(JAVA_HOME="${CLIENT_JAVA_HOME:-$JAVA_HOME}" invoke_java "$BUILD_SCAN_SUMMARY_JAR" "${args[@]}")"
41+
build_scan_data="$(JAVA_HOME="${CLIENT_JAVA_HOME:-$JAVA_HOME}" invoke_java "${BUILD_SCAN_SUMMARY_JAR}:${SCRIPT_DIR}/lib/third-party/*" com.gradle.develocity.scans.summary.Main "${args[@]}")"
4242
build_scan_summary_exit_code="$?"
4343
if [[ $build_scan_summary_exit_code -eq $JVM_VERSION_NOT_SUPPORTED ]]; then
4444
die "ERROR: Java 17+ is required when using --disable-build-scan-publishing. Rerun the script with Java 17+ or set the CLIENT_JAVA_HOME environment variable to a Java 17+ installation." "$UNEXPECTED_ERROR"

Diff for: components/scripts/lib/build-scan-online.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,5 @@ fetch_build_scan_data() {
9999
args+=( "${run_num},${build_scan_urls[run_num]}" )
100100
done
101101

102-
JAVA_HOME="${CLIENT_JAVA_HOME:-$JAVA_HOME}" invoke_java "${BUILD_SCAN_SUMMARY_JAR}" "${args[@]}"
102+
JAVA_HOME="${CLIENT_JAVA_HOME:-$JAVA_HOME}" invoke_java "${BUILD_SCAN_SUMMARY_JAR}:${SCRIPT_DIR}/lib/third-party/*" com.gradle.develocity.scans.summary.Main "${args[@]}"
103103
}

Diff for: components/scripts/lib/java.sh

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
invoke_java() {
1111
local classpath="$1"
1212
shift
13+
local mainClass="$1"
14+
shift
1315

1416
# OS specific support (must be 'true' or 'false').
1517
cygwin=false
@@ -111,7 +113,7 @@ location of your Java installation."
111113
# double quotes to make sure that they get re-expanded; and
112114
# * put everything else in single quotes, so that it's not re-expanded.
113115

114-
set -- -Dpicocli.ansi=true -jar "$classpath" "$@"
116+
set -- -Dpicocli.ansi=true -cp "$classpath" "$mainClass" "$@"
115117

116118
# Stop when "xargs" is not available.
117119
if ! command -v xargs >/dev/null 2>&1; then
Binary file not shown.

0 commit comments

Comments
 (0)