Skip to content

Commit 0a7d1c8

Browse files
committed
update proguard
1 parent d4ce717 commit 0a7d1c8

File tree

6 files changed

+38
-24
lines changed

6 files changed

+38
-24
lines changed

README.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -271,30 +271,12 @@ secretChamber.openVaultFile(File file,boolean deleteOldFile);
271271

272272
## Proguard
273273
```proguard
274-
-keep,allowobfuscation @interface com.facebook.crypto.proguard.annotations.DoNotStrip
275-
-keep,allowobfuscation @interface com.facebook.crypto.proguard.annotations.KeepGettersAndSetters
276-
277-
# Do not strip any method/class that is annotated with @DoNotStrip
278-
-keep @com.facebook.crypto.proguard.annotations.DoNotStrip class *
279-
-keepclassmembers class * {
280-
@com.facebook.crypto.proguard.annotations.DoNotStrip *;
281-
}
282-
283-
-keepclassmembers @com.facebook.crypto.proguard.annotations.KeepGettersAndSetters class * {
284-
void set*(***);
285-
*** get*();
286-
}
287-
```
288-
289-
Or more simpler proguard
290-
291-
```proguard
292-
-keep class com.facebook.** { *; }
293-
-keep interface com.facebook.** { *; }
274+
-keep class com.facebook.crypto.** { *; }
275+
-keep class com.facebook.jni.** { *; }
276+
-keepclassmembers class com.facebook.cipher.jni.** { *; }
294277
-dontwarn com.facebook.**
295278
```
296279

297-
298280
# TODO
299281
1. Set Preferences for specific user
300282
2. Able to switch Preferences between user

app/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
apply plugin: 'com.android.application'
2+
apply from : 'signing.gradle'
23

34
android {
45
compileSdkVersion 27
@@ -50,5 +51,5 @@ dependencies {
5051
exclude group: 'com.google.code.gson', module: 'gson'
5152
}
5253

53-
compile 'com.google.code.gson:gson:2.8.2'
54+
implementation 'com.google.code.gson:gson:2.8.2'
5455
}

app/proguard-rules.pro

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,8 @@
2323
# If you keep the line number information, uncomment this to
2424
# hide the original source file name.
2525
#-renamesourcefileattribute SourceFile
26+
27+
-keep class com.facebook.crypto.** { *; }
28+
-keep class com.facebook.jni.** { *; }
29+
-keepclassmembers class com.facebook.cipher.jni.** { *; }
30+
-dontwarn com.facebook.**

app/signing.gradle

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
def alias = "sharedChamber"
2+
def key_password = "sharedChamber"
3+
def store_password = "sharedChamber"
4+
def store_file = "../keystore.jks"
5+
6+
if (alias && key_password && store_password && file(store_file).exists()) {
7+
android {
8+
signingConfigs {
9+
release {
10+
keyAlias alias
11+
keyPassword key_password
12+
storeFile file(store_file)
13+
storePassword store_password
14+
}
15+
}
16+
17+
buildTypes {
18+
release {
19+
signingConfig signingConfigs.release
20+
}
21+
}
22+
}
23+
}

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip

library/proguard-rules.pro

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,7 @@
3939
#-assumenosideeffects class android.util.Log { *; }
4040
#
4141
#
42-
#-keep class com.chamber.java.library.model.Constant { *; }
42+
#-keep class com.chamber.java.library.model.Constant { *; }
43+
44+
45+
-keep class com.chamber.java.library.model.** {*;}

0 commit comments

Comments
 (0)