File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,10 @@ buildscript {
44 mavenCentral()
55 }
66 dependencies {
7- classpath(" com.android.tools.build:gradle:9.1.0" )
7+ // Lint API version tracks AGP: AGP 9.1.1 → Lint 32.1.1
8+ // in module lint:
9+ // val lintVersion = "32.1.1"
10+ classpath(" com.android.tools.build:gradle:9.1.1" )
811 classpath(" com.github.dcendents:android-maven-gradle-plugin:2.1" )
912 classpath(" org.jetbrains.kotlin:kotlin-gradle-plugin:2.3.20" )
1013 }
Original file line number Diff line number Diff line change @@ -50,7 +50,8 @@ android {
5050}
5151
5252dependencies {
53- lintChecks(project(" :lint" ))
53+ lintChecks(project(" :lint" )) // applies locally
54+ lintPublish(project(path = " :lint" , configuration = " lintJar" )) // embeds in published AAR
5455
5556 implementation(" androidx.annotation:annotation:1.10.0" )
5657 implementation(" androidx.core:core:1.18.0" )
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ tasks.withType<KotlinCompile>().configureEach {
1616 }
1717}
1818
19- // Lint API version tracks AGP: AGP 9.1.0 → Lint 32.1.0
20- val lintVersion = " 32.1.0 "
19+ // Lint API version tracks AGP: AGP 9.1.1 → Lint 32.1.1
20+ val lintVersion = " 32.1.1 "
2121
2222dependencies {
2323 compileOnly(" com.android.tools.lint:lint-api:$lintVersion " )
@@ -35,3 +35,12 @@ tasks.jar {
3535 }
3636}
3737
38+ // Expose a single-artifact configuration so library modules can use lintPublish.
39+ // lintPublish requires exactly one JAR — the default project() dependency
40+ // resolves to multiple artifacts and causes "Found more than one jar" errors.
41+ configurations {
42+ create(" lintJar" )
43+ }
44+ artifacts {
45+ add(" lintJar" , tasks.named(" jar" ))
46+ }
You can’t perform that action at this time.
0 commit comments