Skip to content

Resolve build scan summary dependencies #617

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

Merged
merged 4 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
34 changes: 25 additions & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,53 @@ repositories {
}
}
mavenCentral()
maven("file://${layout.projectDirectory.dir("components/develocity").asFile.path}")
Copy link
Member

Choose a reason for hiding this comment

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

Can we add a content exclusion so Gradle does not attempt to resolve build-scan-summary from Maven Central?

https://ge.solutions-team.gradle.com/s/m6invvi5asxg2/performance/network-activity#network-requests-all-0

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

}

val isDevelopmentRelease = !hasProperty("finalRelease")
val releaseVersion = releaseVersion()
val releaseNotes = releaseNotes()
val distributionVersion = distributionVersion()
val buildScanSummaryVersion = "0.9-2024.1.2-20240515173555"
val buildScanSummaryVersion = "0.9-2024.1.2-prerelease"

allprojects {
version = releaseVersion.get()
}

val argbash by configurations.creating
val mavenComponents by configurations.creating
val buildScanSummaryComponent by configurations.creating {
attributes.attribute(
TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE,
project.objects.named(TargetJvmEnvironment.STANDARD_JVM)
Copy link
Member

@erichaagdev erichaagdev May 17, 2024

Choose a reason for hiding this comment

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

Suggested change
project.objects.named(TargetJvmEnvironment.STANDARD_JVM)
objects.named(TargetJvmEnvironment.STANDARD_JVM)

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

)
}

dependencies {
argbash("argbash:argbash:2.10.0@zip")
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")
buildScanSummaryComponent("com.gradle.develocity:build-scan-summary:$buildScanSummaryVersion")
Copy link
Member

Choose a reason for hiding this comment

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

Should the group be com.gradle like the other things we publish? I see the build-scan-summary is published under the com.gradle.develocity group too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

}

shellcheck {
additionalArguments = "-a -x"
shellcheckVersion = "v0.10.0"
}

val copyDevelocityComponents by tasks.registering(Sync::class) {
from(buildScanSummaryComponent)
into(project.layout.buildDirectory.dir("components/develocity"))
include("build-scan-summary-$buildScanSummaryVersion.jar")
}

val copyThirdPartyComponents by tasks.registering(Sync::class) {
from(buildScanSummaryComponent)
into(project.layout.buildDirectory.dir("components/third-party"))
exclude("build-scan-summary-$buildScanSummaryVersion.jar")
}

val unpackArgbash by tasks.registering(Copy::class) {
group = "argbash"
description = "Unpacks Argbash."
Expand Down Expand Up @@ -129,12 +149,10 @@ val copyGradleScripts by tasks.registering(Copy::class) {
from(generateBashCliParsers.map { it.outputDir.file("lib/cli-parsers/gradle") }) {
into("lib/scripts/")
}
from(layout.projectDirectory.dir("components/develocity")) {
include("build-scan-summary-${buildScanSummaryVersion}.jar")
from(copyDevelocityComponents) {
into("lib/develocity/")
}
from(layout.projectDirectory.dir("components/third-party")) {
include("build-scan-summary-dependencies-${buildScanSummaryVersion}.jar")
from(copyThirdPartyComponents) {
into("lib/third-party/")
}
into(layout.buildDirectory.dir("scripts/gradle"))
Expand Down Expand Up @@ -177,12 +195,10 @@ val copyMavenScripts by tasks.registering(Copy::class) {
from(generateBashCliParsers.map { it.outputDir.file("lib/cli-parsers/maven") }) {
into("lib/scripts/")
}
from(layout.projectDirectory.dir("components/develocity")) {
include("build-scan-summary-${buildScanSummaryVersion}.jar")
from(copyDevelocityComponents) {
into("lib/develocity/")
}
from(layout.projectDirectory.dir("components/third-party")) {
include("build-scan-summary-dependencies-${buildScanSummaryVersion}.jar")
from(copyThirdPartyComponents) {
into("lib/third-party/")
}
from(mavenComponents) {
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- This module was also published with a richer model, Gradle metadata, -->
<!-- which should be used instead. Do not delete the following line which -->
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
<!-- that they should prefer consuming it instead. -->
<!-- do_not_remove: published-with-gradle-metadata -->
<modelVersion>4.0.0</modelVersion>
<groupId>com.gradle.develocity</groupId>
<artifactId>build-scan-summary</artifactId>
<version>0.9-2024.1.2-prerelease</version>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.0.0-jre</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>com.google.code.findbugs</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>4.10.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp-tls</artifactId>
<version>4.11.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.gsonfire</groupId>
<artifactId>gson-fire</artifactId>
<version>1.8.5</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>logging-interceptor</artifactId>
<version>4.10.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<artifactId>swagger-annotations</artifactId>
<version>1.6.10</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.1.1</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>info.picocli</groupId>
<artifactId>picocli</artifactId>
<version>4.7.5</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</project>