OLD | NEW |
1 import java.util.regex.Matcher | 1 import java.util.regex.Matcher |
2 import java.util.regex.Pattern | 2 import java.util.regex.Pattern |
3 | 3 |
4 // ABI flavor of "libadblockplus-android" module | 4 // ABI flavor of "adblock-android" module |
5 def getAbiFlavor() { | 5 def getAbiFlavor() { |
6 Gradle gradle = getGradle() | 6 Gradle gradle = getGradle() |
7 String taskReqStr = gradle.getStartParameter().getTaskRequests().toString() | 7 String taskReqStr = gradle.getStartParameter().getTaskRequests().toString() |
8 | 8 |
9 Pattern pattern; | 9 Pattern pattern; |
10 | 10 |
11 if (taskReqStr.contains("assemble")) { | 11 if (taskReqStr.contains("assemble")) { |
12 pattern = Pattern.compile("assemble(Abi_\\w{2,3})(Release|Debug)*(\\w*)") | 12 pattern = Pattern.compile("assemble(Abi_\\w{2,3})(Release|Debug)*(\\w*)") |
13 } else { | 13 } else { |
14 pattern = Pattern.compile("generate(Abi_\\w{2,3})(Release|Debug)*(\\w*)") | 14 pattern = Pattern.compile("generate(Abi_\\w{2,3})(Release|Debug)*(\\w*)") |
(...skipping 24 matching lines...) Expand all Loading... |
39 println "[Configuration] Building project in ${gradleBuildDir}" | 39 println "[Configuration] Building project in ${gradleBuildDir}" |
40 allprojects { | 40 allprojects { |
41 buildDir = "${gradleBuildDir}/${project.name}" | 41 buildDir = "${gradleBuildDir}/${project.name}" |
42 } | 42 } |
43 } | 43 } |
44 | 44 |
45 subprojects { | 45 subprojects { |
46 task listAllDependencies(type: DependencyReportTask) {} | 46 task listAllDependencies(type: DependencyReportTask) {} |
47 } | 47 } |
48 | 48 |
49 println "[Configuration] Using libadblockplus-android ABI flavor: " + getAbiFlav
or() | 49 println "[Configuration] Using adblock-android ABI flavor: " + getAbiFlavor() |
OLD | NEW |