Skip to content

Commit 079ab9d

Browse files
committed
fix the runtime classpath for the plugin
1 parent 2cfe650 commit 079ab9d

113 files changed

Lines changed: 973 additions & 2310 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

build-logic/mcbuild/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,21 @@ val kotlinVersion = libs.versions.kotlin.get()
3030
dependencies {
3131

3232
compileOnly(gradleApi())
33+
compileOnly(libs.kotlin.gradle.plug)
3334

3435
implementation(libs.benManes.gradle)
3536
implementation(libs.detekt.gradle)
36-
implementation(libs.dropbox.dependencyGuard)
3737
implementation(libs.dokka.gradle)
38+
implementation(libs.dropbox.dependencyGuard)
3839
implementation(libs.google.dagger.api)
3940
implementation(libs.google.ksp)
4041
implementation(libs.kotlin.compiler)
41-
implementation(libs.kotlin.gradle.plug)
4242
implementation(libs.kotlinx.knit)
4343
implementation(libs.ktlint.gradle)
4444
implementation(libs.scabbard)
4545
implementation(libs.square.anvil.gradle)
46-
implementation(libs.vanniktech.publish)
4746
implementation(libs.square.moshi)
47+
implementation(libs.vanniktech.publish)
4848

4949
ksp(libs.square.moshi.codegen)
5050
}

build-logic/mcbuild/src/main/kotlin/mcbuild.clean.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ plugins {
2020
// delete any empty directories
2121
tasks.withType<Delete> {
2222

23+
notCompatibleWithConfigurationCache("Delete does not support configuration cache")
24+
2325
doLast {
2426

2527
val subprojectDirs = subprojects

build-logic/mcbuild/src/main/kotlin/modulecheck/builds/anvil.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ fun Project.applyAnvil(anvil: Boolean, dagger: Boolean) {
3737

3838
dependencies {
3939
"compileOnly"(project.libsCatalog.dependency("javax-inject"))
40-
"implementation"(project.libsCatalog.dependency("google-dagger-api"))
40+
"compileOnly"(project.libsCatalog.dependency("google-dagger-api"))
4141
}
4242
}

build-logic/mcbuild/src/main/kotlin/modulecheck/builds/dagger.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fun Project.applyDagger(anvil: Boolean, dagger: Boolean) {
3333

3434
dependencies {
3535
"compileOnly"(project.libsCatalog.dependency("javax-inject"))
36-
"implementation"(project.libsCatalog.dependency("google-dagger-api"))
36+
"compileOnly"(project.libsCatalog.dependency("google-dagger-api"))
3737
"kapt"(project.libsCatalog.dependency("google-dagger-compiler"))
3838
}
3939
}

build-logic/mcbuild/src/main/kotlin/modulecheck/builds/publishing.kt

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,13 @@ import com.vanniktech.maven.publish.JavadocJar.Dokka
2020
import com.vanniktech.maven.publish.KotlinJvm
2121
import com.vanniktech.maven.publish.MavenPublishBaseExtension
2222
import com.vanniktech.maven.publish.SonatypeHost.DEFAULT
23+
import com.vanniktech.maven.publish.tasks.JavadocJar
24+
import com.vanniktech.maven.publish.tasks.SourcesJar
2325
import org.gradle.api.Project
2426
import org.gradle.api.publish.PublishingExtension
2527
import org.gradle.api.publish.maven.MavenPublication
28+
import org.gradle.api.publish.maven.tasks.PublishToMavenRepository
29+
import org.gradle.api.tasks.bundling.Jar
2630
import org.gradle.kotlin.dsl.apply
2731
import org.gradle.kotlin.dsl.configure
2832
import org.gradle.plugins.signing.Sign
@@ -85,10 +89,6 @@ fun Project.configurePublishing(
8589
}
8690
}
8791

88-
tasks.withType(Sign::class.java) {
89-
notCompatibleWithConfigurationCache("Signing cannot be cached")
90-
}
91-
9292
tasks.register("checkVersionIsSnapshot") {
9393
doLast {
9494
val expected = "-SNAPSHOT"
@@ -98,4 +98,21 @@ fun Project.configurePublishing(
9898
}
9999
}
100100
}
101+
102+
tasks.withType(PublishToMavenRepository::class.java).configureEach {
103+
notCompatibleWithConfigurationCache("See https://github.com/gradle/gradle/issues/13468")
104+
}
105+
106+
tasks.withType(Jar::class.java).configureEach {
107+
notCompatibleWithConfigurationCache("")
108+
}
109+
tasks.withType(SourcesJar::class.java).configureEach {
110+
notCompatibleWithConfigurationCache("")
111+
}
112+
tasks.withType(JavadocJar::class.java).configureEach {
113+
notCompatibleWithConfigurationCache("")
114+
}
115+
tasks.withType(Sign::class.java).configureEach {
116+
notCompatibleWithConfigurationCache("")
117+
}
101118
}

build.gradle.kts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ moduleCheck {
6060
}
6161
}
6262

63+
// Hack for ensuring that when 'publishToMavenLocal' is invoked from the root project,
64+
// all subprojects are published. This is used in plugin tests.
65+
val publishToMavenLocal by tasks.registering {
66+
subprojects.forEach { sub ->
67+
dependsOn(sub.tasks.matching { it.name == "publishToMavenLocal" })
68+
}
69+
}
70+
6371
tasks.matching { it.name == "ktlintFormat" }.configureEach {
6472
dependsOn(gradle.includedBuild("build-logic").task(":ktlintFormat"))
6573
}

detekt/detekt-config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ style:
507507
customMessage: ''
508508
ForbiddenImport:
509509
active: true
510-
imports: [ 'groovy.xml.XmlParser' ]
510+
imports: [ 'groovy.xml.XmlParser', 'com.android.build.*' ]
511511
forbiddenPatterns: ''
512512
ForbiddenMethodCall:
513513
active: false

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[versions]
22

3-
androidTools = "7.2.0"
3+
androidTools = "7.1.3"
44

55
androidx-compose = "1.1.0-alpha04"
66
androidx-fragment = "1.3.6"

modulecheck-api/build.gradle.kts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,8 @@ mcbuild {
2424

2525
dependencies {
2626

27-
api(libs.kotlin.compiler)
2827
api(libs.kotlinx.coroutines.core)
2928
api(libs.kotlinx.coroutines.jvm)
30-
api(libs.rickBusarow.dispatch.core)
31-
api(libs.semVer)
3229

3330
api(project(path = ":modulecheck-finding:api"))
3431
api(project(path = ":modulecheck-finding:name"))
@@ -38,9 +35,7 @@ dependencies {
3835
api(project(path = ":modulecheck-project:api"))
3936
api(project(path = ":modulecheck-utils"))
4037

41-
implementation(libs.groovy)
42-
implementation(libs.groovyXml)
43-
implementation(libs.kotlin.reflect)
38+
implementation(libs.kotlin.compiler)
4439

4540
testImplementation(libs.bundles.hermit)
4641
testImplementation(libs.bundles.jUnit)

modulecheck-api/dependencies/runtimeClasspath.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
com.google.dagger:dagger:2.42
21
com.rickbusarow.dispatch:dispatch-core:1.0.0-beta10
32
com.squareup.anvil:annotations:2.4.0
43
javax.inject:javax.inject:1

0 commit comments

Comments
 (0)