Merge pull request #175 from ultrasonic/enable-minify-for-release
Enable minify for release
This commit is contained in:
commit
bf6026087a
|
@ -16,6 +16,9 @@ jobs:
|
||||||
- run:
|
- run:
|
||||||
name: checkstyle
|
name: checkstyle
|
||||||
command: ./gradlew -Pqc ktlintCheck
|
command: ./gradlew -Pqc ktlintCheck
|
||||||
|
- run:
|
||||||
|
name: static analysis
|
||||||
|
command: ./gradlew -Pqc detektCheck
|
||||||
- run:
|
- run:
|
||||||
name: build
|
name: build
|
||||||
command: ./gradlew assembleDebug
|
command: ./gradlew assembleDebug
|
||||||
|
@ -29,8 +32,8 @@ jobs:
|
||||||
name: lint
|
name: lint
|
||||||
command: ./gradlew lint
|
command: ./gradlew lint
|
||||||
- run:
|
- run:
|
||||||
name: static analysis
|
name: assemble release build
|
||||||
command: ./gradlew -Pqc detektCheck
|
command: ./gradlew assembleRelease
|
||||||
- save_cache:
|
- save_cache:
|
||||||
paths:
|
paths:
|
||||||
- ~/.gradle
|
- ~/.gradle
|
||||||
|
|
|
@ -19,8 +19,11 @@ android {
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
release {
|
||||||
minifyEnabled false
|
minifyEnabled true
|
||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'),
|
||||||
|
'minify/proguard-okhttp.pro',
|
||||||
|
'minify/proguard-retrofit.pro',
|
||||||
|
'minify/proguard-jackson.pro'
|
||||||
}
|
}
|
||||||
debug {
|
debug {
|
||||||
minifyEnabled false
|
minifyEnabled false
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
#### From Jackson
|
||||||
|
|
||||||
|
-keepattributes *Annotation*,EnclosingMethod,Signature
|
||||||
|
-keepnames class com.fasterxml.jackson.** {
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
-keepnames interface com.fasterxml.jackson.** {
|
||||||
|
*;
|
||||||
|
}
|
||||||
|
-dontwarn com.fasterxml.jackson.databind.**
|
||||||
|
-keep class org.codehaus.** { *; }
|
|
@ -0,0 +1,8 @@
|
||||||
|
#### From okhttp
|
||||||
|
|
||||||
|
-dontwarn okhttp3.**
|
||||||
|
-dontwarn okio.**
|
||||||
|
-dontwarn javax.annotation.**
|
||||||
|
-dontwarn org.conscrypt.**
|
||||||
|
# A resource is loaded with a relative path so the package of this class must be preserved.
|
||||||
|
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase
|
|
@ -0,0 +1,10 @@
|
||||||
|
#### From retrofit
|
||||||
|
|
||||||
|
# Retain generic type information for use by reflection by converters and adapters.
|
||||||
|
-keepattributes Signature
|
||||||
|
# Retain service method parameters.
|
||||||
|
-keepclassmembernames,allowobfuscation interface * {
|
||||||
|
@retrofit2.http.* <methods>;
|
||||||
|
}
|
||||||
|
# Ignore annotation used for build tooling.
|
||||||
|
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
|
Loading…
Reference in New Issue