Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: adblockplussbrowser/build.gradle

Issue 29479601: Issue 5273 - Automatically update bundled lists (Closed)
Patch Set: Created July 4, 2017, 12:50 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build.gradle » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
}
« no previous file with comments | « no previous file | build.gradle » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld