mirror of
https://github.com/ultrasonic/ultrasonic
synced 2025-02-05 19:47:33 +01:00
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:
|
||||
name: checkstyle
|
||||
command: ./gradlew -Pqc ktlintCheck
|
||||
- run:
|
||||
name: static analysis
|
||||
command: ./gradlew -Pqc detektCheck
|
||||
- run:
|
||||
name: build
|
||||
command: ./gradlew assembleDebug
|
||||
@ -29,8 +32,8 @@ jobs:
|
||||
name: lint
|
||||
command: ./gradlew lint
|
||||
- run:
|
||||
name: static analysis
|
||||
command: ./gradlew -Pqc detektCheck
|
||||
name: assemble release build
|
||||
command: ./gradlew assembleRelease
|
||||
- save_cache:
|
||||
paths:
|
||||
- ~/.gradle
|
||||
|
@ -19,8 +19,11 @@ android {
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'),
|
||||
'minify/proguard-okhttp.pro',
|
||||
'minify/proguard-retrofit.pro',
|
||||
'minify/proguard-jackson.pro'
|
||||
}
|
||||
debug {
|
||||
minifyEnabled false
|
||||
|
11
ultrasonic/minify/proguard-jackson.pro
Normal file
11
ultrasonic/minify/proguard-jackson.pro
Normal file
@ -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.** { *; }
|
8
ultrasonic/minify/proguard-okhttp.pro
Normal file
8
ultrasonic/minify/proguard-okhttp.pro
Normal file
@ -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
|
10
ultrasonic/minify/proguard-retrofit.pro
Normal file
10
ultrasonic/minify/proguard-retrofit.pro
Normal file
@ -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…
x
Reference in New Issue
Block a user