Skip to content

Commit 4958150

Browse files
committed
chore: reject AGP updates with versions <= 9.3.1
1 parent 5d2c984 commit 4958150

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

build.gradle.kts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,19 @@ fun notFromFirebase(candidate: ModuleComponentIdentifier): Boolean {
4545
return candidate.group != "com.google.firebase"
4646
}
4747

48+
// TODO(b/522845800): remove this once the bug with AGP 9.3.x and lint has been fixed
49+
fun isBuggyAGP(candidate: ModuleComponentIdentifier): Boolean {
50+
// Skip versions <= 9.3.1
51+
val candidateName = candidate.toString().lowercase()
52+
return (candidateName.contains("com.android.application") ||
53+
candidateName.contains("com.android.library")) &&
54+
candidate.version.replace(".", "").toInt() <= 931
55+
}
56+
4857
tasks.withType<DependencyUpdatesTask> {
4958
rejectVersionIf {
50-
(isNonStable(candidate) && notFromFirebase(candidate)) || isBlockListed(candidate)
59+
(isNonStable(candidate) && notFromFirebase(candidate)) || isBlockListed(candidate) ||
60+
isBuggyAGP(candidate)
5161
}
5262
}
5363

0 commit comments

Comments
 (0)