Skip to content

Commit

Permalink
Use DAGP 1.23.1 and fix buildHealth issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
autonomousapps committed Sep 29, 2023
1 parent ea94054 commit e61cdfc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
25 changes: 11 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
@file:Suppress("UnstableApiUsage", "HasPlatformType", "PropertyName")

import org.jetbrains.kotlin.cli.common.toBooleanLenient
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
`java-gradle-plugin`
Expand Down Expand Up @@ -75,6 +74,7 @@ val functionalTestSourceSet = sourceSets.create("functionalTest") {
val functionalTestImplementation = configurations
.getByName("functionalTestImplementation")
.extendsFrom(configurations.getByName("testImplementation"))
val functionalTestApi = configurations.getByName("functionalTestApi")

val compileFunctionalTestKotlin = tasks.named("compileFunctionalTestKotlin")
tasks.named<AbstractCompile>("compileFunctionalTestGroovy") {
Expand All @@ -100,6 +100,9 @@ configurations.all {
dependencies {
implementation(platform(libs.kotlin.bom))

api(libs.guava) {
because("Graphs")
}
api(libs.javax.inject)
api(libs.moshi.core)
api(libs.moshix.sealed.runtime)
Expand All @@ -120,9 +123,6 @@ dependencies {
implementation(libs.caffeine) {
because("High performance, concurrent cache")
}
implementation(libs.guava) {
because("Graphs")
}
implementation(libs.relocated.antlr)
implementation(libs.relocated.asm)

Expand Down Expand Up @@ -150,7 +150,10 @@ dependencies {
testImplementation(libs.truth)
testRuntimeOnly(libs.junit.engine)

functionalTestImplementation(project(":testkit"))
// KGP automatically adds an 'api' to all source sets even when it makes no sense. To appease DAGP, we respect that.
// This might go away with Kotlin 2.0.
functionalTestApi(project(":testkit"))
functionalTestImplementation(project(":testkit-truth"))
functionalTestImplementation(libs.commons.io) {
because("For FileUtils.deleteDirectory()")
}
Expand Down Expand Up @@ -346,17 +349,11 @@ dependencyAnalysis {
includeDependency("org.jetbrains.kotlin:kotlin-gradle-plugin-api")
}
}

issues {
all {
onUsedTransitiveDependencies {
exclude(
"xml-apis:xml-apis", // org.w3c.dom, also provided transitively via AGP 4.2.2!
)
}
onIncorrectConfiguration {
exclude(
"com.google.guava:guava" // exposes Graph. Would rather not change to `api`.
)
onAny {
severity("fail")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pluginManagement {
}
}
plugins {
id("com.autonomousapps.dependency-analysis") version "1.22.0"//latestSnapshot
id("com.autonomousapps.dependency-analysis") version "1.23.1"//latestSnapshot
id("com.github.johnrengelman.shadow") version "8.1.1"
id("com.gradle.enterprise") version "3.10.2"
id("com.gradle.plugin-publish") version "1.1.0"
Expand Down

0 comments on commit e61cdfc

Please sign in to comment.