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

Move build summary extraction logic out #487

Open
wants to merge 33 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
08b580a
Remove the data processing logic
sorin-florea Aug 21, 2023
9afb897
Remove support for offline mode
jthurne May 2, 2024
90a7203
Revert "Remove support for offline mode"
jthurne May 8, 2024
8721a55
TEMP: Update repo and version used to fetch build-scan-summary
jthurne May 3, 2024
2971323
Move library scripts to lib/scripts in distributable
jthurne May 9, 2024
b620f38
Move build-scan-summary jar to lib/develocity in distributables
jthurne May 9, 2024
0ac12da
Add the build-scan-summary jar to the repository
jthurne May 9, 2024
ee1166b
Align internal env var name with the build-scan-summary jar filename
jthurne May 9, 2024
9fadce5
Eliminate read-only variable errors
jthurne May 9, 2024
fc159ea
Move BUILD_SCAN_SUMMARY_JAR to init.sh
jthurne May 10, 2024
11d2c87
Split out the third-party dependencies of build-scan-summary into a s…
jthurne May 16, 2024
55f93cc
Download build scan summary dependencies
sorin-florea May 17, 2024
a7b8f95
Remove includes
sorin-florea May 17, 2024
bde3027
Fix from statements
sorin-florea May 17, 2024
c1e00c3
Implement feedback
sorin-florea May 22, 2024
1d2e19d
Merge pull request #617 from gradle/sorin/download-dependencies
sorin-florea May 22, 2024
cba9b66
Update license
sorin-florea May 23, 2024
45fe330
Update license
sorin-florea May 23, 2024
f883c7c
Update build.gradle.kts
sorin-florea May 23, 2024
12df243
Remove support for offline mode
jthurne May 2, 2024
8c538ad
Update build scan summary jar
sorin-florea May 29, 2024
044b94f
Remove fat jar containing third-party depednencies
jthurne May 29, 2024
13f7f2d
Add NOTICE file
jthurne May 30, 2024
8d02809
Add some text requested by Legal
jthurne May 30, 2024
d8ea550
Update license and notice files per suggestions from legal
jthurne Jun 12, 2024
68dcf40
Fix typo in NOTICE
jthurne Jun 12, 2024
9690cfe
Merge remote-tracking branch 'origin/main' into sorin/consolidation
jthurne Jun 12, 2024
95b35fc
Move the Develocity Maven extension to lib/develocity
jthurne Jun 13, 2024
5bb54c1
Move common-custom-user-data-maven-extension to lib/third-party
jthurne Jun 13, 2024
0540156
Add the Gradle Common Custom User Data Maven Extension to the NOTICE …
jthurne Jun 13, 2024
418f05a
Fix typo
jthurne Jun 13, 2024
b51d887
Add support for the renamed Develocity Maven Extension (#624)
jthurne Jun 14, 2024
ee3f228
Merge remote-tracking branch 'origin/main' into sorin/consolidation
jthurne Jun 14, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
59 changes: 40 additions & 19 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,17 @@ val isDevelopmentRelease = !hasProperty("finalRelease")
val releaseVersion = releaseVersion()
val releaseNotes = releaseNotes()
val distributionVersion = distributionVersion()
val buildScanSummaryVersion = "0.9-2024.1.1-20240503130149"

allprojects {
version = releaseVersion.get()
}

val argbash by configurations.creating
val commonComponents by configurations.creating
val mavenComponents by configurations.creating

dependencies {
argbash("argbash:argbash:2.10.0@zip")
commonComponents(project(path = ":fetch-build-scan-data-cmdline-tool", configuration = "shadow"))
mavenComponents(project(":configure-gradle-enterprise-maven-extension"))
mavenComponents("com.gradle:gradle-enterprise-maven-extension:1.18.4")
mavenComponents("com.gradle:common-custom-user-data-maven-extension:1.13")
Expand Down Expand Up @@ -95,7 +94,10 @@ val copyGradleScripts by tasks.registering(Copy::class) {
// local variable required for configuration cache compatibility
// https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:not_yet_implemented:accessing_top_level_at_execution
val releaseVersion = releaseVersion
val buildScanSummaryVersion = buildScanSummaryVersion

inputs.property("project.version", releaseVersion)
etiennestuder marked this conversation as resolved.
Show resolved Hide resolved
inputs.property("summary.version", buildScanSummaryVersion)

from(layout.projectDirectory.file("LICENSE"))
from(layout.projectDirectory.dir("release").file("version.txt"))
Expand All @@ -104,24 +106,32 @@ val copyGradleScripts by tasks.registering(Copy::class) {
from(layout.projectDirectory.dir("components/scripts/gradle")) {
exclude("gradle-init-scripts")
filter { line: String -> line.replace("<HEAD>", releaseVersion.get()) }
filter { line: String -> line.replace("<SUMMARY_VERSION>", buildScanSummaryVersion) }
}
from(layout.projectDirectory.dir("components/scripts/gradle")) {
include("gradle-init-scripts/**")
into("lib/")
into("lib/scripts/")
}
from(layout.projectDirectory.dir("components/scripts")) {
include("README.md")
include("mapping.example")
include("network.settings")
include("lib/**")
exclude("lib/cli-parsers")
filter { line: String -> line.replace("<HEAD>", releaseVersion.get()) }
filter { line: String -> line.replace("<SUMMARY_VERSION>", buildScanSummaryVersion) }
}
from(layout.projectDirectory.dir("components/scripts/lib")) {
include("**")
exclude("cli-parsers")
filter { line: String -> line.replace("<HEAD>", releaseVersion.get()) }
filter { line: String -> line.replace("<SUMMARY_VERSION>", buildScanSummaryVersion) }
into("lib/scripts/")
}
from(generateBashCliParsers.map { it.outputDir.file("lib/cli-parsers/gradle") }) {
into("lib/")
into("lib/scripts/")
}
from(commonComponents) {
into("lib/build-scan-clients/")
from(layout.projectDirectory.dir("components/develocity")) {
include("build-scan-summary-${buildScanSummaryVersion}.jar")
into("lib/develocity/")
}
into(layout.buildDirectory.dir("scripts/gradle"))
}
Expand All @@ -133,31 +143,42 @@ val copyMavenScripts by tasks.registering(Copy::class) {
// local variable required for configuration cache compatibility
// https://docs.gradle.org/current/userguide/configuration_cache.html#config_cache:not_yet_implemented:accessing_top_level_at_execution
val releaseVersion = releaseVersion
val buildScanSummaryVersion = buildScanSummaryVersion

inputs.property("project.version", releaseVersion)
etiennestuder marked this conversation as resolved.
Show resolved Hide resolved
inputs.property("summary.version", buildScanSummaryVersion)

from(layout.projectDirectory.file("LICENSE"))
from(layout.projectDirectory.dir("release").file("version.txt"))
rename("version.txt", "VERSION")

from(layout.projectDirectory.dir("components/scripts/maven")) {
filter { line: String -> line.replace("<HEAD>", releaseVersion.get()) }
filter { line: String -> line.replace("<SUMMARY_VERSION>", buildScanSummaryVersion) }
}
from(layout.projectDirectory.dir("components/scripts/")) {
include("README.md")
include("mapping.example")
include("network.settings")
include("lib/**")
exclude("lib/cli-parsers")
filter { line: String -> line.replace("<HEAD>", releaseVersion.get()) }
filter { line: String -> line.replace("<SUMMARY_VERSION>", buildScanSummaryVersion) }
}
from(layout.projectDirectory.dir("components/scripts/lib")) {
include("**")
exclude("cli-parsers")
filter { line: String -> line.replace("<HEAD>", releaseVersion.get()) }
filter { line: String -> line.replace("<SUMMARY_VERSION>", buildScanSummaryVersion) }
into("lib/scripts/")
}
from(generateBashCliParsers.map { it.outputDir.file("lib/cli-parsers/maven") }) {
into("lib/")
into("lib/scripts/")
}
from(commonComponents) {
into("lib/build-scan-clients/")
from(layout.projectDirectory.dir("components/develocity")) {
include("build-scan-summary-${buildScanSummaryVersion}.jar")
into("lib/develocity/")
}
from(mavenComponents) {
into("lib/maven-libs/")
into("lib/scripts/maven-libs/")
}
into(layout.buildDirectory.dir("scripts/maven"))
}
Expand Down Expand Up @@ -206,8 +227,8 @@ val shellcheckGradleScripts by tasks.registering(Shellcheck::class) {
description = "Perform quality checks on Gradle build validation scripts using Shellcheck."
sourceFiles = copyGradleScripts.get().outputs.files.asFileTree.matching {
include("**/*.sh")
// scripts in lib/ are checked when Shellcheck checks the top-level scripts because the top-level scripts include (source) the scripts in lib/
exclude("lib/")
// scripts in lib/scripts/ are checked when Shellcheck checks the top-level scripts because the top-level scripts include (source) the scripts in lib/
exclude("lib/scripts/")
}
// scripts in lib/ are still inputs to this task (we want shellcheck to run if they change) even though we don't include them explicitly in sourceFiles
inputs.files(copyGradleScripts.get().outputs.files.asFileTree.matching {
Expand All @@ -227,8 +248,8 @@ val shellcheckMavenScripts by tasks.registering(Shellcheck::class) {
description = "Perform quality checks on Maven build validation scripts using Shellcheck."
sourceFiles = copyMavenScripts.get().outputs.files.asFileTree.matching {
include("**/*.sh")
// scripts in lib/ are checked when Shellcheck checks the top-level scripts because the top-level scripts include (source) the scripts in lib/
exclude("lib/")
// scripts in lib/scripts/ are checked when Shellcheck checks the top-level scripts because the top-level scripts include (source) the scripts in lib/
exclude("lib/scripts/")
}
// scripts in lib/ are still inputs to this task (we want shellcheck to run if they change) even though we don't include them explicitly in sourceFiles
inputs.files(copyMavenScripts.get().outputs.files.asFileTree.matching {
Expand Down Expand Up @@ -300,4 +321,4 @@ fun releaseVersion(): Provider<String> {
fun releaseNotes(): Provider<String> {
val releaseNotesFile = layout.projectDirectory.file("release/changes.md")
return providers.fileContents(releaseNotesFile).asText.map { it.trim() }
}
}
Binary file not shown.

This file was deleted.

79 changes: 0 additions & 79 deletions components/fetch-build-scan-data-cmdline-tool/build.gradle.kts

This file was deleted.

This file was deleted.

This file was deleted.