Skip to content

Commit 6515f5a

Browse files
committed
Fix check for proguard-android.txt to replace it with proguard-android-optimize.txt
1 parent a4fc8f9 commit 6515f5a

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

Sources/SkipDrive/GradleHarness.swift

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -492,20 +492,13 @@ public struct AppBuildGradleAGPIssue {
492492
// AGP 9 no longer ships the default proguard-android.txt that earlier SkipProject defaults referenced
493493
// in the line: proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro")
494494
AppBuildGradleAGPIssue(trigger: #"getDefaultProguardFile("proguard-android.txt")"#,
495-
message: #"remove the getDefaultProguardFile("proguard-android.txt") section to be compliant with Android Gradle Plugin (AGP) version 9. Details: https://forums.skip.dev/categories/announcements"#,
495+
message: #"change the getDefaultProguardFile("proguard-android.txt") section to getDefaultProguardFile("proguard-android-optimize.txt") be compliant with Android Gradle Plugin (AGP) version 9. Details: https://forums.skip.dev/categories/announcements"#,
496496
removingIssue: { contents in
497497
// remove the getDefaultProguardFile(…) argument from active proguardFiles lines, keeping the rest
498498
contents.gradleLines().map { line in
499499
guard line.activelyContains(#"getDefaultProguardFile("proguard-android.txt")"#) else { return line }
500500
var fixed = line
501-
for variant in [
502-
#"getDefaultProguardFile("proguard-android.txt"), "#,
503-
#"getDefaultProguardFile("proguard-android.txt"),"#,
504-
#", getDefaultProguardFile("proguard-android.txt")"#,
505-
#"getDefaultProguardFile("proguard-android.txt")"#,
506-
] {
507-
fixed = fixed.replacingOccurrences(of: variant, with: "")
508-
}
501+
fixed = fixed.replacingOccurrences(of: #"getDefaultProguardFile("proguard-android.txt")"#, with: #"getDefaultProguardFile("proguard-android-optimize.txt")"#)
509502
return fixed
510503
}.joined(separator: "\n")
511504
}),

0 commit comments

Comments
 (0)