Index: adblockplussbrowser/build.gradle |
=================================================================== |
--- a/adblockplussbrowser/build.gradle |
+++ b/adblockplussbrowser/build.gradle |
@@ -1,8 +1,9 @@ |
+ |
anton
2017/07/06 06:40:24
this change (new line) is not required
jens
2017/07/06 07:54:16
Acknowledged.
|
apply plugin: 'com.android.application' |
android { |
compileSdkVersion rootProject.ext.compileSdkVersion |
buildToolsVersion rootProject.ext.buildToolsVersion |
compileOptions { |
sourceCompatibility = rootProject.ext.sourceCompatibilityVersion |
@@ -29,13 +30,27 @@ android { |
release { |
minifyEnabled true |
proguardFiles getDefaultProguardFile('proguard-android.txt') |
lintOptions { |
disable 'MissingTranslation' |
} |
} |
} |
+ |
+ // update bundles lists when running a release build |
+ afterEvaluate { project -> |
+ project.tasks.prepareReleaseDependencies << { |
+ updateBundledLists() |
anton
2017/07/06 06:40:24
it would be great to output that the lists are upd
jens
2017/07/06 07:54:16
Good idea, I will add a console output message.
|
+ } |
+ } |
+} |
+ |
+def updateBundledLists() { |
+ new URL(rootProject.ext.easyListUpdateUrl).withInputStream{ |
+ i -> new File(rootProject.ext.easyListFilePath).withOutputStream{ it << i }} |
+ new URL(rootProject.ext.exceptionRulesUpdateUrl).withInputStream{ i |
+ -> new File(rootProject.ext.exceptionRulesFilePath).withOutputStream{ it << i }} |
} |
dependencies { |
compile "com.android.support:support-v4:$rootProject.ext.androidSupportLibraryVersion" |
} |