Skip to content

Commit ef907cf

Browse files
authored
Update proguard rules and build configuration (#196)
1 parent 504be06 commit ef907cf

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

gradle/libs.versions.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[versions]
2-
agp = "8.7.3"
2+
agp = "8.9.1"
33
android-desugar = "2.1.5"
44
androidx-core = "1.16.0"
55
androidx-test-rules = "1.6.1"

lib/build.gradle.kts

+12
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ android {
2424
aarMetadata {
2525
minCompileSdk = 29
2626
}
27+
28+
// These ProGuard/R8 rules will be included in the final APK.
29+
consumerProguardFiles("consumer-rules.pro")
2730
}
2831

2932
compileOptions {
@@ -51,6 +54,15 @@ android {
5154
}
5255
}
5356

57+
buildTypes {
58+
release {
59+
// Android libraries shouldn't be minified:
60+
// https://developer.android.com/studio/projects/android-library#Considerations
61+
isMinifyEnabled = false
62+
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"))
63+
}
64+
}
65+
5466
lint {
5567
disable += listOf("AllowBackup", "InvalidPackage")
5668
}

lib/consumer-rules.pro

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
# keep all iCalendar properties/parameters (used via reflection)
3+
-keep class net.fortuna.ical4j.** { *; }
4+
5+
# don't warn when these are missing
6+
-dontwarn com.github.erosb.jsonsKema.**
7+
-dontwarn groovy.**
8+
-dontwarn java.beans.Transient
9+
-dontwarn javax.cache.**
10+
-dontwarn org.codehaus.groovy.**
11+
-dontwarn org.jparsec.**

0 commit comments

Comments
 (0)