From 1ba2a40f52be1fc3298e656a88e8685cd152bcba Mon Sep 17 00:00:00 2001 From: Ivan Alvarado Date: Fri, 17 May 2024 14:24:12 -0700 Subject: [PATCH] Revert "chore: bump dependencies, delete unused catalog entries." This reverts commit c1579652d6022b518bb87fe7c481948b50592d4f. --- build-logic/settings.gradle.kts | 2 +- build.gradle.kts | 7 ----- gradle/libs.versions.toml | 31 ++++++++++--------- gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle.kts | 4 +-- .../kit/gradle/dependencies/Plugins.kt | 2 +- .../gradle-testkit-plugin/build.gradle.kts | 8 +++++ .../kit/truth/BuildTaskListSubject.kt | 20 ++++++------ testkit/settings.gradle.kts | 4 +-- 9 files changed, 41 insertions(+), 39 deletions(-) diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts index d94d673e4..bc572d830 100644 --- a/build-logic/settings.gradle.kts +++ b/build-logic/settings.gradle.kts @@ -8,7 +8,7 @@ pluginManagement { mavenCentral() } plugins { - id("org.jetbrains.kotlin.jvm") version "1.9.22" + id("org.jetbrains.kotlin.jvm") version "1.9.10" } } diff --git a/build.gradle.kts b/build.gradle.kts index 35df7564b..3d57d194a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -99,7 +99,6 @@ gradleTestKitSupport { dependencies { implementation(platform(libs.kotlin.bom)) - implementation(platform(libs.okio.bom)) api(libs.guava) { because("Graphs") @@ -318,12 +317,6 @@ dependencyAnalysis { includeDependency("org.jetbrains.kotlin:kotlin-gradle-plugin") includeDependency("org.jetbrains.kotlin:kotlin-gradle-plugin-api") } - bundle("truth") { - includeDependency(libs.truth) - // Truth's Subject class makes use of the @Nullable annotation from this library when creating `Factory`s. It ends - // up in the bytecode, but I don't really have any control over that. - includeDependency("org.checkerframework:checker-qual") - } } abi { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 61b471610..9ee283840 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,24 +1,24 @@ [versions] antlr-shadowed = "4.10.1.6" asm-relocated = "9.6.0.1" -caffeine = "3.1.8" -commons-io = "2.16.0" +caffeine = "3.1.0" +commons-io = "2.11.0" dagp = "1.31.0" -error-prone = "2.26.1" +error-prone = "2.11.0" gradle-publish-plugin = "1.1.0" grammar = "0.3" -guava = "33.1.0-jre" +guava = "31.1-jre" java = "11" -junit = "5.10.2" -kotlin = "1.9.22" -kotlinx-metadata = "0.9.0" -moshi = "1.15.1" -moshix = "0.25.1" -okhttp = "4.12.0" -okio = "3.9.0" -retrofit = "2.11.0" -spock = "2.3-groovy-3.0" -truth = "1.4.2" +junit = "5.8.2" +kotlin = "1.9.10" +kotlinx-metadata = "0.8.0" +moshi = "1.14.0" +moshix = "0.19.0" +okhttp = "4.9.0" +okio = "2.10.0" +retrofit = "2.9.0" +spock = "2.1-groovy-3.0" +truth = "1.1.3" agp = "8.0.2" #agp = "8.1.4 @@ -49,13 +49,14 @@ kotlinx-metadata-jvm = { module = "org.jetbrains.kotlinx:kotlinx-metadata-jvm", moshi-core = { module = "com.squareup.moshi:moshi", version.ref = "moshi" } moshi-kotlin = { module = "com.squareup.moshi:moshi-kotlin", version.ref = "moshi" } +moshi-adapters = { module = "com.squareup.moshi:moshi-adapters", version.ref = "moshi" } +moshix-ksp = { module = "dev.zacsweers.moshix:moshi-ksp", version.ref = "moshix" } moshix-sealed-reflect = { module = "dev.zacsweers.moshix:moshi-sealed-reflect", version.ref = "moshix" } moshix-sealed-runtime = { module = "dev.zacsweers.moshix:moshi-sealed-runtime", version.ref = "moshix" } okhttp3 = { module = "com.squareup.okhttp3:okhttp", version.ref = "okhttp" } okio = { module = "com.squareup.okio:okio", version.ref = "okio" } -okio-bom = { module = "com.squareup.okio:okio-bom", version.ref = "okio" } relocated-antlr = { module = "com.autonomousapps:antlr", version.ref = "antlr-shadowed" } relocated-asm = { module = "com.autonomousapps:asm-relocated", version.ref = "asm-relocated" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 135d5db0f..0169a7a41 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -2,7 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/settings.gradle.kts b/settings.gradle.kts index 57aacca2d..cf87fbd9a 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -31,8 +31,8 @@ pluginManagement { id("com.github.johnrengelman.shadow") version "8.1.1" id("com.gradle.enterprise") version "3.15.1" id("com.gradle.plugin-publish") version "1.1.0" - id("org.jetbrains.kotlin.jvm") version "1.9.22" - id("org.jetbrains.dokka") version "1.9.20" + id("org.jetbrains.kotlin.jvm") version "1.9.10" + id("org.jetbrains.dokka") version "1.9.0" } } diff --git a/src/functionalTest/kotlin/com/autonomousapps/kit/gradle/dependencies/Plugins.kt b/src/functionalTest/kotlin/com/autonomousapps/kit/gradle/dependencies/Plugins.kt index 3dc1ad953..cc2a9d709 100644 --- a/src/functionalTest/kotlin/com/autonomousapps/kit/gradle/dependencies/Plugins.kt +++ b/src/functionalTest/kotlin/com/autonomousapps/kit/gradle/dependencies/Plugins.kt @@ -6,7 +6,7 @@ import com.autonomousapps.kit.AbstractGradleProject import com.autonomousapps.kit.gradle.Plugin object Plugins { - @JvmStatic val KOTLIN_VERSION: String = "1.9.22" + @JvmStatic val KOTLIN_VERSION: String = "1.9.0" @JvmStatic val dagpId: String = "com.autonomousapps.dependency-analysis" @JvmStatic val dependencyAnalysis: Plugin = Plugin(dagpId, AbstractGradleProject.PLUGIN_UNDER_TEST_VERSION) diff --git a/testkit/gradle-testkit-plugin/build.gradle.kts b/testkit/gradle-testkit-plugin/build.gradle.kts index c45f56337..61858ddb9 100644 --- a/testkit/gradle-testkit-plugin/build.gradle.kts +++ b/testkit/gradle-testkit-plugin/build.gradle.kts @@ -103,3 +103,11 @@ tasks.register("publishEverywhere") { group = "publishing" description = "Publishes to Plugin Portal and Maven Central" } + +dependencyAnalysis { + issues { + onAny { + severity("fail") + } + } +} diff --git a/testkit/gradle-testkit-truth/src/main/kotlin/com/autonomousapps/kit/truth/BuildTaskListSubject.kt b/testkit/gradle-testkit-truth/src/main/kotlin/com/autonomousapps/kit/truth/BuildTaskListSubject.kt index 120cd337c..be364fa77 100644 --- a/testkit/gradle-testkit-truth/src/main/kotlin/com/autonomousapps/kit/truth/BuildTaskListSubject.kt +++ b/testkit/gradle-testkit-truth/src/main/kotlin/com/autonomousapps/kit/truth/BuildTaskListSubject.kt @@ -13,8 +13,8 @@ import org.gradle.testkit.runner.TaskOutcome public class BuildTaskListSubject private constructor( failureMetadata: FailureMetadata, - private val actual: List? -) : IterableSubject(failureMetadata, actual?.map { it.path }) { + private val actual: List +) : IterableSubject(failureMetadata, actual.map { it.path }) { public companion object { private val BUILD_TASK_LIST_SUBJECT_FACTORY: Factory> = @@ -32,49 +32,49 @@ public class BuildTaskListSubject private constructor( @CanIgnoreReturnValue public fun containsExactlyPathsIn(expected: Iterable): Ordered { - val actualPaths = actual?.map { it.path } + val actualPaths = actual.map { it.path } return assertThat(actualPaths).containsExactlyElementsIn(expected) } @CanIgnoreReturnValue public fun containsExactlyPathsIn(vararg expected: String): Ordered { - val actualPaths = actual?.map { it.path } + val actualPaths = actual.map { it.path } return assertThat(actualPaths).containsExactlyElementsIn(expected) } @CanIgnoreReturnValue public fun containsAtLeastPathsIn(expected: Iterable): Ordered { - val actualPaths = actual?.map { it.path } + val actualPaths = actual.map { it.path } return assertThat(actualPaths).containsAtLeastElementsIn(expected) } @CanIgnoreReturnValue public fun containsAtLeastPathsIn(vararg expected: String): Ordered { - val actualPaths = actual?.map { it.path } + val actualPaths = actual.map { it.path } return assertThat(actualPaths).containsAtLeastElementsIn(expected) } @CanIgnoreReturnValue public fun containsExactlyOutcomesIn(expected: Iterable): Ordered { - val actualOutcomes = actual?.map { it.outcome } + val actualOutcomes = actual.map { it.outcome } return assertThat(actualOutcomes).containsExactlyElementsIn(expected) } @CanIgnoreReturnValue public fun containsExactlyOutcomesIn(vararg expected: TaskOutcome): Ordered { - val actualOutcomes = actual?.map { it.outcome } + val actualOutcomes = actual.map { it.outcome } return assertThat(actualOutcomes).containsExactlyElementsIn(expected) } @CanIgnoreReturnValue public fun doesNotContain(expected: Iterable) { - val actualPaths = actual?.map { it.path } + val actualPaths = actual.map { it.path } return assertThat(actualPaths).containsNoneIn(expected) } @CanIgnoreReturnValue public fun doesNotContain(vararg expected: String) { - val actualPaths = actual?.map { it.path } + val actualPaths = actual.map { it.path } return assertThat(actualPaths).containsNoneIn(expected) } } diff --git a/testkit/settings.gradle.kts b/testkit/settings.gradle.kts index e988ee8c0..c40e845ce 100644 --- a/testkit/settings.gradle.kts +++ b/testkit/settings.gradle.kts @@ -28,8 +28,8 @@ pluginManagement { id("com.github.johnrengelman.shadow") version "8.1.1" id("com.gradle.enterprise") version "3.15.1" id("com.gradle.plugin-publish") version "1.1.0" - id("org.jetbrains.kotlin.jvm") version "1.9.22" - id("org.jetbrains.dokka") version "1.9.20" + id("org.jetbrains.kotlin.jvm") version "1.9.10" + id("org.jetbrains.dokka") version "1.9.0" } }