From b1dfb960a5613fc3d83df807491414cab8c0c0cc Mon Sep 17 00:00:00 2001 From: Marko Arsic Date: Sat, 1 Oct 2016 16:15:25 +0200 Subject: [PATCH 1/2] Update how multiple proguard files are included --- README.md | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8f96a97..925adc1 100644 --- a/README.md +++ b/README.md @@ -30,10 +30,31 @@ android { } ``` -Instead of declaring each configuration file manually, you could also store them in a seperate directory and include them all at once: +Instead of declaring each configuration file manually, you could also store them in a `proguard` directory under your application module and include them all at once in default config: ```groovy -FileCollection proGuardFileCollection = files { file('./proguard').listFiles() } -proguardFiles(proGuardFileCollection) +android { + defaultConfig { + ... + // Add default progurad file + proguardFile getDefaultProguardFile('proguard-android.txt') + // include all proguard rules from proguard folder in your module dir + proguardFiles fileTree(include: ['*.pro'], dir: 'proguard') + } +} + +buildTypes { + debug { + debuggable true + minifyEnabled false + shrinkResources false + } + release { + debuggable false + minifyEnabled true + shrinkResources true + } +} + ``` ### Libraries From e38dbc675ab1b9fae682d60a5db36bee5bd90a90 Mon Sep 17 00:00:00 2001 From: Marko Arsic Date: Wed, 23 Nov 2016 08:28:09 +0100 Subject: [PATCH 2/2] Update README.md Update how multiple files are included for android gradle plugin v2.2.2 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 925adc1..ccad8ea 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ android { // Add default progurad file proguardFile getDefaultProguardFile('proguard-android.txt') // include all proguard rules from proguard folder in your module dir - proguardFiles fileTree(include: ['*.pro'], dir: 'proguard') + proguardFiles fileTree(include: ['*.pro'], dir: 'proguard').asList().toArray() } }