Skip to content

Commit

Permalink
[MS-742] Use a single ProGuard Rules File
Browse files Browse the repository at this point in the history
  • Loading branch information
meladRaouf committed Sep 27, 2024
1 parent 6d7a34b commit 3739da9
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 117 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,20 @@ class AndroidLibraryConventionPlugin : Plugin<Project> {
}

buildFeatures.buildConfig = true
buildTypes {
getByName(BuildTypes.release) {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"$rootDir/build-logic/proguard-rules.pro"
)
}
create(BuildTypes.staging) {
isMinifyEnabled = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"$rootDir/build-logic/proguard-rules.pro"
)
}
getByName(BuildTypes.debug) {
isMinifyEnabled = false
buildTypes {
// In a library module, we generally don’t need to
// add any specific configurations here because the app module handles shrinking,
// obfuscation, and signing. Leaving this block empty means the default behavior is inherited.
getByName(BuildTypes.release) {
}

create(BuildTypes.staging) {
}

getByName(BuildTypes.debug) {
}
configureDebugModeBuildTypes()
}
configureDebugModeBuildTypes()
}
}

dependencies {
Expand Down
25 changes: 0 additions & 25 deletions build-logic/proguard-rules.pro

This file was deleted.

3 changes: 0 additions & 3 deletions fingerprint/infra/scanner/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ plugins {
android {
namespace = "com.simprints.fingerprint.infra.scanner"

defaultConfig {
consumerProguardFiles("consumer-rules.pro")
}
}

dependencies {
Expand Down
22 changes: 0 additions & 22 deletions fingerprint/infra/scanner/consumer-rules.pro

This file was deleted.

4 changes: 0 additions & 4 deletions fingerprint/infra/simafis-wrapper/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ plugins {

android {
namespace = "com.simprints.fingerprint.infra.simafiswrapper"

defaultConfig {
consumerProguardFiles("consumer-rules.pro")
}
}

dependencies {
Expand Down
20 changes: 0 additions & 20 deletions fingerprint/infra/simafis-wrapper/consumer-rules.pro

This file was deleted.

8 changes: 8 additions & 0 deletions id/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
#net.zetetic:android-database-sqlcipher
-keep class net.sqlcipher.** { *; }

# Dont warn about the missing files during the obfuscation
-dontwarn com.simprints.**

# Do not obfuscate names in simprints package
-keep class com.simprints.** { *; }
# Keep all marshallable classes as-is
Expand Down Expand Up @@ -88,3 +91,8 @@
# Keep Hilt components and related Dagger generated code
-keep class * extends dagger.hilt.internal.GeneratedComponentManager { *; }
-keep class * extends dagger.hilt.internal.GeneratedComponent { *; }
-keep class **.hilt_aggregated_deps.** { *; }

-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite {
<fields>;
}
3 changes: 0 additions & 3 deletions infra/config-store/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ plugins {
android {
namespace = "com.simprints.infra.config.store"

defaultConfig {
consumerProguardFiles("consumer-rules.pro")
}
}

dependencies {
Expand Down
4 changes: 0 additions & 4 deletions infra/config-store/consumer-rules.pro

This file was deleted.

4 changes: 0 additions & 4 deletions infra/config-sync/consumer-rules.pro

This file was deleted.

5 changes: 0 additions & 5 deletions infra/recent-user-activity/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,8 @@ plugins {

android {
namespace = "com.simprints.infra.recent.user.activity"

defaultConfig {
consumerProguardFiles("consumer-rules.pro")
}
}


dependencies {
implementation(libs.datastore)
}
4 changes: 0 additions & 4 deletions infra/recent-user-activity/consumer-rules.pro

This file was deleted.

4 changes: 0 additions & 4 deletions infra/sync/consumer-rules.pro

This file was deleted.

0 comments on commit 3739da9

Please sign in to comment.