-
Gradle Task to display build environment Tree
./gradlew buildEnvironment
-
Substitute with GuardSquare proguard
buildscript { ... configurations.all { resolutionStrategy { dependencySubstitution { substitute module('net.sf.proguard:proguard-gradle') with module('com.guardsquare:proguard-gradle:7.0.0') } } } } -
Upgrading with custom
proguard// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ... dependencies { //classpath 'net.sf.proguard:proguard-gradle:6.1.1' // <-- Add this line classpath 'com.guardsquare:proguard-gradle:7.0.0' ... } }
Last active
June 11, 2020 10:00
-
-
Save ckarthickit2/c421944c41b1756aa5a679494a61d010 to your computer and use it in GitHub Desktop.
Kotlin Proguard Experiment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # First 3 stages need Entry Points to be defined via -keep option | |
| # Entry Points | |
| #-printconfiguration | |
| #-keep class com.example.product.* { *; } | |
| #-keep class * extends kotlin.jvm.internal.* { *; } | |
| #-keep class * extends kotlin.coroutines.jvm.internal.ContinuationImpl { *; } | |
| #-keep class * implements kotlin.jvm.internal.* { *; } | |
| #-keep !class **.internal.*.** {*;} | |
| #-keep !public final class **.internal.* {*;} | |
| -keep public interface * {*;} | |
| -keep public enum * {*;} | |
| -keep public abstract class * {*;} | |
| --keep !class **.internal.** {*;} | |
| -keep public final class * {*;} | |
| -keep public class **Utils {*;} | |
| -keep public class com.example.product.util.StateMachine** {*;} | |
| -keep public class com.example.product.async.*.** {*;} | |
| #-keep !public class **.internal.**$Companion {*;} | |
| -keep public class **$Companion {*;} | |
| -keep public class **$DefaultImpls {*;} | |
| -keep public class * extends **Throwable {*;} | |
| --keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,*Annotation*,EnclosingMethod | |
| -#-keeppackagenames com.example.vstb7 | |
| --printseeds build/outputs/mapping/proguard-seeds.log | |
| -keepattributes LocalVariableTable,LocalVariableTypeTable,Exceptions,InnerClasses,Signature,Deprecated,SourceFile, | |
| LineNumberTable,*Annotation*,EnclosingMethod | |
| -keeppackagenames com.example.vstb7 | |
| # Android Specific | |
| -assumenosideeffects class android.util.Log { | |
| public static *** v(...); | |
| } | |
| -keep public class * extends com.squareup.moshi.JsonAdapter { | |
| <init>(...); | |
| <fields>; | |
| } | |
| #Kotlin Specific | |
| -keep class kotlin.Metadata { *; } | |
| -keepclassmembers public class com.example.vstb7.* { | |
| public <methods>; | |
| } | |
| -keepparameternames | |
| -assumenosideeffects class kotlin.jvm.internal.Intrinsics { | |
| static void checkParameterIsNotNull(java.lang.Object, java.lang.String); | |
| static void checkExpressionValueIsNotNull(java.lang.Object, java.lang.String); | |
| static void checkNotNullExpressionValue(java.lang.Object, java.lang.String); | |
| static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String, java.lang.String); | |
| static void checkReturnedValueIsNotNull(java.lang.Object, java.lang.String); | |
| static void checkFieldIsNotNull(java.lang.Object, java.lang.String, java.lang.String); | |
| static void checkFieldIsNotNull(java.lang.Object, java.lang.String); | |
| static void checkNotNull(java.lang.Object, java.lang.String); | |
| static void checkNotNullParameter(java.lang.Object, java.lang.String); | |
| } | |
| # JSR 305 annotations are for embedding nullability information. | |
| -dontwarn javax.annotation.** | |
| # A resource is loaded with a relative path so the package of this class must be preserved. | |
| -keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase | |
| # Animal Sniffer compileOnly dependency to ensure APIs are compatible with older versions of Java. | |
| -dontwarn org.codehaus.mojo.animal_sniffer.* | |
| # OkHttp platform used only on JVM and when Conscrypt dependency is available. | |
| -dontwarn okhttp3.internal.platform.ConscryptPlatform | |
| -printseeds build/outputs/mapping/proguard-seeds.log | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment