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

Unified Diff: adblockplussbrowser/build.gradle

Issue 29757571: Issue 6591 - Bundle ABP for Samsung Internet China with Easylist for China (Closed)
Patch Set: Adjustments regarding Anton's comments Created April 20, 2018, 3:13 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 | adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/engine/Engine.java » ('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
@@ -17,6 +17,8 @@
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 14
versionName '1.1.4'
+ buildConfigField "String", "FLAVOR_REGION_WORLD", '"world"'
+ buildConfigField "String", "FLAVOR_REGION_CHINA", '"china"'
}
sourceSets {
@@ -43,7 +45,7 @@
dimension "region"
}
- cn {
+ china {
dimension "region"
applicationIdSuffix ".cn"
}
@@ -60,7 +62,7 @@
project.tasks.all { task ->
if (task.name.matches("generate.*Release.*Resources")) {
task.doLast {
- updateBundledLists()
+ updateBundledLists(task.name)
println('Bundled lists updated at ' + new Date().format('dd MMM yyyy, HH:mm:ss zzz'))
}
}
@@ -68,8 +70,10 @@
}
}
-def updateBundledLists() {
- new URL(rootProject.ext.easyListUpdateUrl).withInputStream {
+def updateBundledLists(taskName) {
+ def easylistUrl = taskName.contains("China") ?
+ rootProject.ext.easyListChinaUpdateUrl : rootProject.ext.easyListDefaultUpdateUrl
+ new URL(easylistUrl).withInputStream {
i -> new File(rootProject.ext.easyListFilePath).withOutputStream { it << i }
}
new URL(rootProject.ext.exceptionRulesUpdateUrl).withInputStream {
« no previous file with comments | « no previous file | adblockplussbrowser/src/main/java/org/adblockplus/sbrowser/contentblocker/engine/Engine.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld