Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ android {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
consumerProguardFiles 'consumer-rules.pro'
}
}

Expand Down
22 changes: 22 additions & 0 deletions library/consumer-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Constructor.io Android SDK - Consumer ProGuard Rules
# These rules are bundled with the AAR and applied automatically to consuming apps

####--------Moshi---------####
# Keep Moshi annotations so @FromJson/@ToJson reflective adapter discovery works
-keepclassmembers class * {
@com.squareup.moshi.FromJson <methods>;
@com.squareup.moshi.ToJson <methods>;
}
-keep @com.squareup.moshi.JsonQualifier interface *

# Keep Kotlin metadata for Moshi reflection
-keepclassmembers class kotlin.Metadata {
public <methods>;
}

####-----Constructor.io SDK-----####
# Keep SDK model classes (serialization via Moshi)
-keep class io.constructor.data.model.** { *; }

# Keep custom Moshi adapters
-keep class io.constructor.data.model.dataadapter.** { *; }
4 changes: 2 additions & 2 deletions library/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}

####-----Model Classes---####
-keep class constructor.io.data.model.** { *; }
-keep class io.constructor.data.model.** { *; }

####-----Sample Classes---####
-keep class constructor.io.sample.** { *; }
-keep class io.constructor.sample.** { *; }