diff --git a/README.md b/README.md index 9627ad7..783f587 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,9 @@ [![Documentation](https://img.shields.io/badge/documentation-kdoc-brightgreen)](https://bitfireat.github.io/vcard4android/) [![Jitpack link](https://img.shields.io/jitpack/version/com.github.bitfireAT/vcard4android)](https://jitpack.io/#bitfireAT/vcard4android) +_This software is not affiliated to, nor has it been authorized, sponsored or otherwise approved +by Google LLC. Android is a trademark of Google LLC._ + # vcard4android @@ -13,15 +16,15 @@ It's a framework for from/into data classes that are compatible with the Android Contacts Provider, and * accessing the Android Contacts Provider by a unified API. -It has been primarily developed for [DAVx⁵](https://www.davx5.com) and is currently intended -to be used as git submodule. +It has been primarily developed for [DAVx⁵](https://www.davx5.com). -_This software is not affiliated to, nor has it been authorized, sponsored or otherwise approved -by Google LLC. Android is a trademark of Google LLC._ +To view the available gradle tasks for the library: `./gradlew vcard4android:tasks` +(the `vcard4android` module is defined in `settings.gradle`). Generated KDoc: https://bitfireat.github.io/vcard4android/ + ## Contact ``` diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 4aa54cc..d8cf0bd 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,13 +1,13 @@ [versions] -agp = "8.7.1" -androidx-annotation = "1.8.2" +agp = "8.9.1" +androidx-annotation = "1.9.1" androidx-test-runner = "1.6.2" androidx-rest-rules = "1.6.1" -desugar = "2.1.2" +desugar = "2.1.5" dokka = "1.9.20" ezvcard = "0.12.1" -guava = "33.3.1-android" -kotlin = "2.0.21" +guava = "33.4.8-android" +kotlin = "2.1.20" junit = "4.13.2" [libraries] diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index f34689c..8c06312 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists \ No newline at end of file diff --git a/lib/build.gradle.kts b/lib/build.gradle.kts index a7059bc..117cd23 100644 --- a/lib/build.gradle.kts +++ b/lib/build.gradle.kts @@ -16,6 +16,9 @@ android { aarMetadata { minCompileSdk = 29 } + + // These ProGuard/R8 rules will be included in the final APK. + consumerProguardFiles("consumer-rules.pro") } compileOptions { @@ -25,18 +28,21 @@ android { jvmToolchain(21) } - buildTypes { - release { - isMinifyEnabled = false - } - } - packaging { resources { excludes += listOf("LICENSE", "META-INF/LICENSE.txt", "META-INF/NOTICE.txt") } } + buildTypes { + release { + // Android libraries shouldn't be minified: + // https://developer.android.com/studio/projects/android-library#Considerations + isMinifyEnabled = false + proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt")) + } + } + lint { disable += listOf("AllowBackup", "InvalidPackage") } diff --git a/lib/consumer-rules.pro b/lib/consumer-rules.pro new file mode 100644 index 0000000..57c8150 --- /dev/null +++ b/lib/consumer-rules.pro @@ -0,0 +1,8 @@ + +# keep all vCard properties/parameters (used via reflection) +-keep class ezvcard.io.scribe.** { *; } +-keep class ezvcard.property.** { *; } +-keep class ezvcard.parameter.** { *; } + +# AGP seems to remove this class, but ezvcard.io uses it. See https://github.com/bitfireAT/davx5/issues/499 +-keep class javax.xml.namespace.QName { *; } diff --git a/settings.gradle.kts b/settings.gradle.kts index f1b8ded..cea4207 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -14,6 +14,6 @@ dependencyResolutionManagement { } } -rootProject.name = "vcard4android" -include (":lib") +rootProject.name = "root" +include(":lib") project(":lib").name = "vcard4android"