diff --git a/app/build.gradle b/app/build.gradle index 491708f9..01395eae 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -2,6 +2,15 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' +apply plugin: "ru.cleverpumpkin.proguard-dictionaries-generator" + +proguardDictionaries { + dictionaryNames = [ + "build/class-dictionary", + "build/package-dictionary", + "build/obfuscation-dictionary" + ] +} android { compileSdkVersion 29 diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 9eec6824..61ee1d62 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -67,4 +67,12 @@ -keep class code.name.monkey.retromusic.cast.CastOptionsProvider { *; } -keep class android.support.** { *; } -keep class com.google.** { *; } --keep class java.nio.file.** { *; } \ No newline at end of file +-keep class java.nio.file.** { *; } + +-obfuscationdictionary build/obfuscation-dictionary.txt +-classobfuscationdictionary build/class-dictionary.txt +-packageobfuscationdictionary build/package-dictionary.txt + +# Move all classes and packages into the root package. +-repackageclasses '' +-flattenpackagehierarchy \ No newline at end of file diff --git a/build.gradle b/build.gradle index 670ff309..188603a5 100644 --- a/build.gradle +++ b/build.gradle @@ -5,11 +5,15 @@ buildscript { repositories { jcenter() google() + maven { + url "https://plugins.gradle.org/m2/" + } } dependencies { classpath 'com.android.tools.build:gradle:3.5.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.android.tools.build:bundletool:0.9.0' + classpath "gradle.plugin.ru.cleverpumpkin.proguard-dictionaries-generator:plugin:1.0.7" } }