From c0f413ddf7817f9c8fc62630922d8059f5ed9280 Mon Sep 17 00:00:00 2001 From: Jendrik Johannes Date: Thu, 29 Jun 2023 13:41:03 +0200 Subject: [PATCH] Remove annotation-only Jars from runtime classpath (in Gradle) --- guava/module.json | 42 ----------------------- integration-tests/gradle/build.gradle.kts | 21 +++++++----- 2 files changed, 12 insertions(+), 51 deletions(-) diff --git a/guava/module.json b/guava/module.json index 0e7e5d85d087..29d2903d7ea4 100644 --- a/guava/module.json +++ b/guava/module.json @@ -112,27 +112,6 @@ "version": { "requires": "9999.0-empty-to-avoid-conflict-with-guava" } - }, - { - "group": "com.google.code.findbugs", - "module": "jsr305", - "version": { - "requires": "${jsr305.version}" - } - }, - { - "group": "org.checkerframework", - "module": "checker-qual", - "version": { - "requires": "${checker.version}" - } - }, - { - "group": "com.google.errorprone", - "module": "error_prone_annotations", - "version": { - "requires": "${errorprone.version}" - } } ], "files": [ @@ -251,27 +230,6 @@ "version": { "requires": "9999.0-empty-to-avoid-conflict-with-guava" } - }, - { - "group": "com.google.code.findbugs", - "module": "jsr305", - "version": { - "requires": "${jsr305.version}" - } - }, - { - "group": "org.checkerframework", - "module": "checker-qual", - "version": { - "requires": "${checker.version}" - } - }, - { - "group": "com.google.errorprone", - "module": "error_prone_annotations", - "version": { - "requires": "${errorprone.version}" - } } ], "files": [ diff --git a/integration-tests/gradle/build.gradle.kts b/integration-tests/gradle/build.gradle.kts index 963b7187329f..ee52d16be6d6 100644 --- a/integration-tests/gradle/build.gradle.kts +++ b/integration-tests/gradle/build.gradle.kts @@ -7,25 +7,28 @@ val guavaVersionJre = val expectedReducedRuntimeClasspathAndroidVersion = setOf( "guava-${guavaVersionJre.replace("jre", "android")}.jar", - "failureaccess-1.0.2.jar", - "jsr305-3.0.2.jar", - "checker-qual-3.41.0.jar", - "error_prone_annotations-2.23.0.jar", - "listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" + "failureaccess-1.0.2.jar" ) val expectedReducedRuntimeClasspathJreVersion = setOf( "guava-$guavaVersionJre.jar", - "failureaccess-1.0.2.jar", + "failureaccess-1.0.2.jar" + ) +val expectedCompileClasspathAndroidVersion = + expectedReducedRuntimeClasspathAndroidVersion + setOf( + "j2objc-annotations-2.8.jar", "jsr305-3.0.2.jar", "checker-qual-3.41.0.jar", "error_prone_annotations-2.23.0.jar", "listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar" ) -val expectedCompileClasspathAndroidVersion = - expectedReducedRuntimeClasspathAndroidVersion + setOf("j2objc-annotations-2.8.jar") val expectedCompileClasspathJreVersion = - expectedReducedRuntimeClasspathJreVersion + setOf("j2objc-annotations-2.8.jar") + expectedReducedRuntimeClasspathJreVersion + setOf( + "j2objc-annotations-2.8.jar", + "jsr305-3.0.2.jar", + "checker-qual-3.33.0.jar", + "error_prone_annotations-2.18.0.jar" + ) val extraLegacyDependencies = setOf("google-collections-1.0.jar")