From fc4debc4cb4dd35e7eeba83ee139aa439871d76b Mon Sep 17 00:00:00 2001 From: skydoves Date: Wed, 14 Aug 2024 19:42:07 +0900 Subject: [PATCH] Add consumers rule for arrow --- retrofit-adapters-arrow/build.gradle.kts | 25 +++++++++++++++++++++- retrofit-adapters-arrow/consumer-rules.pro | 2 ++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 retrofit-adapters-arrow/consumer-rules.pro diff --git a/retrofit-adapters-arrow/build.gradle.kts b/retrofit-adapters-arrow/build.gradle.kts index 5aa81ee..719c237 100644 --- a/retrofit-adapters-arrow/build.gradle.kts +++ b/retrofit-adapters-arrow/build.gradle.kts @@ -17,7 +17,8 @@ import com.skydoves.retrofit.adapters.Configuration import com.skydoves.retrofit.adapters.Dependencies plugins { - id("kotlin") + id(libs.plugins.android.library.get().pluginId) + id(libs.plugins.kotlin.android.get().pluginId) id(libs.plugins.kotlin.serialization.get().pluginId) id(libs.plugins.nexus.plugin.get().pluginId) } @@ -41,6 +42,28 @@ mavenPublishing { } } +android { + compileSdk = Configuration.compileSdk + namespace = "com.skydoves.retrofit.adapters.arrow" + defaultConfig { + minSdk = Configuration.minSdk + consumerProguardFiles("consumer-rules.pro") + } + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = "11" + } + + lint { + abortOnError = false + } +} + dependencies { implementation(libs.coroutines) implementation(libs.okhttp) diff --git a/retrofit-adapters-arrow/consumer-rules.pro b/retrofit-adapters-arrow/consumer-rules.pro new file mode 100644 index 0000000..c10ddba --- /dev/null +++ b/retrofit-adapters-arrow/consumer-rules.pro @@ -0,0 +1,2 @@ +# R8 full mode strips signatures from non-kept items. +-keep,allowobfuscation,allowshrinking class arrow.core.Either \ No newline at end of file