Skip to content

Commit

Permalink
Merge pull request #474 from rnc/BR1
Browse files Browse the repository at this point in the history
Add gradle 8.12
  • Loading branch information
rnc authored Jan 21, 2025
2 parents 7ee4ca3 + 26caa0c commit 61b41b9
Show file tree
Hide file tree
Showing 18 changed files with 26 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
strategy:
fail-fast: false
matrix:
gradle: [4.10.3, "5.0", 5.1.1, 5.2.1, 5.3.1, 5.4.1, 5.5.1, 5.6.4, 6.0.1, 6.1.1, 6.2.2, 6.3, 6.4.1, 6.5.1, 6.6.1, 6.7.1, 6.8.3, 6.9.4, 7.0.2, 7.1.1, 7.2, 7.3.3, 7.4.2, 7.5.1, 7.6.3, 8.0.2, 8.1.1, 8.2.1, 8.3, 8.4, 8.5, 8.8, "8.10.2"]
gradle: [4.10.3, "5.0", 5.1.1, 5.2.1, 5.3.1, 5.4.1, 5.5.1, 5.6.4, 6.0.1, 6.1.1, 6.2.2, 6.3, 6.4.1, 6.5.1, 6.6.1, 6.7.1, 6.8.3, 6.9.4, 7.0.2, 7.1.1, 7.2, 7.3.3, 7.4.2, 7.5.1, 7.6.3, 8.0.2, 8.1.1, 8.2.1, 8.3, 8.4, 8.5, 8.8, "8.10.2", "8.12"]
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idif
if: github.repository == 'project-ncl/gradle-manipulator' && github.event_name == 'pull_request'
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,6 @@ public void verifyOpenTelemetryKotlin() throws IOException, URISyntaxException,
public void verifyOpenTelemetryJavaInstrumentationKotlin() throws Exception {
// XXX: Kotlin requirements
assumeTrue(GradleVersion.current().compareTo(GradleVersion.version("7.5")) >= 0);
// XXX: Caused by: org.gradle.api.GradleException: Dependencies can not be declared against the `compileClasspath` configuration.
assumeTrue(GradleVersion.current().compareTo(GradleVersion.version("8.0")) < 0);

final Map<String, String> map = new HashMap<>();
map.put("-DoverrideTransitive", "false");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ afterEvaluate {
}

// Version to use to compile code and run tests.
val DEFAULT_JAVA_VERSION = JavaVersion.VERSION_17
val DEFAULT_JAVA_VERSION = JavaVersion.VERSION_11

java {
toolchain {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ dependencies {
}

otelJava {
minJavaVersionSupported.set(JavaVersion.VERSION_11)
minJavaVersionSupported.set(JavaVersion.VERSION_1_8)
}

// We cannot use "--release" javac option here because that will forbid exporting com.sun.tools package.
// We also can't seem to use the toolchain without the "--release" option. So disable everything.

java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
toolchain {
languageVersion.set(null as JavaLanguageVersion?)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ tasks {

withType<JavaCompile>().configureEach {
with(options) {
release.set(8)
release.set(11)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
org.gradle.parallel=true

org.gradle.priority=low

# Gradle default is 256m which causes issues with our build - https://docs.gradle.org/current/userguide/build_environment.html#sec:configuring_jvm_memory
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m

# Try to reduce CI failures due to maven central flakiness
# in particular this has been a problem for maven-metadata.xml files, which are TTL'd quickly out of
# the gradle cache since they contain the latest versions available in maven central
systemProp.org.gradle.internal.http.connectionTimeout=120000
systemProp.org.gradle.internal.http.socketTimeout=120000
systemProp.org.gradle.internal.repository.max.retries=10
systemProp.org.gradle.internal.repository.initial.backoff=500

kotlin.daemon.jvmargs=-Xmx1g
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins {
id("org.xbib.gradle.plugin.jflex")

id("otel.java-conventions")
id("otel.animalsniffer-conventions")
id("otel.jacoco-conventions")
id("otel.japicmp-conventions")
id("otel.publish-conventions")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import net.ltgt.gradle.errorprone.errorprone

plugins {
id("otel.java-conventions")
id("otel.animalsniffer-conventions")
id("otel.jacoco-conventions")
id("otel.japicmp-conventions")
id("otel.publish-conventions")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,6 @@ include(":smoke-tests:images:quarkus")
// include(":instrumentation:vibur-dbcp-11.0:testing")
// include(":instrumentation:wicket-8.0:javaagent")

// // benchmark
// benchmark
include(":benchmark-overhead-jmh")
// include(":benchmark-jfr-analyzer")
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ plugins {
id("otel.publish-conventions")

id("otel.jmh-conventions")
id("otel.animalsniffer-conventions")
}

description = "OpenTelemetry API"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ plugins {
id("otel.publish-conventions")

id("otel.jmh-conventions")
id("otel.animalsniffer-conventions")
}

description = "OpenTelemetry API Incubator"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ plugins {
id("otel.publish-conventions")

id("otel.jmh-conventions")
id("otel.animalsniffer-conventions")
}

description = "OpenTelemetry Context (Incubator)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ plugins {

id("otel.jmh-conventions")
id("org.jetbrains.kotlin.jvm")
id("otel.animalsniffer-conventions")
}

description = "OpenTelemetry Kotlin Extensions"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ plugins {
id("otel.java-conventions")
id("otel.publish-conventions")

id("otel.animalsniffer-conventions")
id("otel.jmh-conventions")
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
plugins {
id("otel.java-conventions")
id("otel.publish-conventions")

id("otel.animalsniffer-conventions")
}

base {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ plugins {
id("otel.publish-conventions")
// TODO: re-enable japicmp when artifact is stable
// id("otel.japicmp-conventions")

id("otel.animalsniffer-conventions")
}

base {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -685,14 +685,13 @@ private Map<RelaxedProjectVersionRef, ProjectVersionRef> getDependencies(Project
if (!cache.isConstraints()) {
logger.debug("Recursively copying configuration for {}", configuration.getName());
copy = configuration.copyRecursive();
lenient = copy.getResolvedConfiguration().getLenientConfiguration();
} else {
logger.debug(
"DefaultProjectDependencyConstraint found, not recursively copying configuration for {}",
configuration.getName());
copy = configuration.copy();
lenient = copy.getResolvedConfiguration().getLenientConfiguration();
}
lenient = copy.getResolvedConfiguration().getLenientConfiguration();

// We don't care about modules of the project being unresolvable at this stage. Had we not excluded them,
// we would get false negatives
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public static void setupJVM() throws IOException {
@Test
public void testOpenTelemetryJavaInstrumentation() throws IOException, URISyntaxException, GitAPIException {
assumeTrue(GradleVersion.current().compareTo(GradleVersion.version("8.8")) >= 0);
// Avoid problems with animal-sniffer in later versions.
assumeTrue(GradleVersion.current().compareTo(GradleVersion.version("8.12")) < 0);

final File opentelemetryProjectRoot = tempDir.newFolder("opentelemetry-java-instrumentation-project");

Expand Down

0 comments on commit 61b41b9

Please sign in to comment.