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

Side by Side Diff: build.gradle

Issue 29784577: Issue 6205 - Upload artifacs to maven repository (Closed)
Patch Set: Adjustments regarding comments Created July 10, 2018, 12:39 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 import java.util.regex.Matcher 1 buildscript {
2 import java.util.regex.Pattern 2 repositories {
3 3 google()
4 // ABI flavor of "adblock-android" module 4 jcenter()
5 def getAbiFlavor() {
6 Gradle gradle = getGradle()
7 String taskReqStr = gradle.getStartParameter().getTaskRequests().toString()
8
9 Pattern pattern;
10
11 if (taskReqStr.contains("assemble")) {
12 pattern = Pattern.compile("assemble(Abi_\\w{2,3})(Release|Debug)*(\\w*)")
13 } else {
14 pattern = Pattern.compile("generate(Abi_\\w{2,3})(Release|Debug)*(\\w*)")
15 } 5 }
16 6
17 Matcher matcher = pattern.matcher(taskReqStr) 7 dependencies {
18 8 classpath 'com.android.tools.build:gradle:3.1.3'
19 if (matcher.find()) { 9 classpath 'com.novoda:bintray-release:0.8.1'
20 return matcher.group(1).toLowerCase()
21 } else {
22 return "abi_all"
23 } 10 }
24 } 11 }
25 12
26 buildscript { 13 ext {
27 repositories { 14 bintrayUserOrg = 'adblockplus'
28 mavenLocal() 15 bintrayGroupId = 'org.adblockplus'
29 mavenCentral() 16 bintrayLicences = ['GPL-3.0']
30 jcenter() 17 bintrayWebsite = 'https://github.com/adblockplus/libadblockplus-android'
31 } 18 bintrayIssueTracker = 'http://issues.adblockplus.org/'
32 dependencies { 19 bintrayRepository = 'https://github.com/adblockplus/libadblockplus-android.g it'
33 classpath 'com.android.tools.build:gradle:2.3.0'
34 }
35 } 20 }
36 21
37 def gradleBuildDir = System.getenv('GRADLE_BUILD_DIR') 22 def gradleBuildDir = System.getenv('GRADLE_BUILD_DIR')
38 if (gradleBuildDir != null) { 23 if (gradleBuildDir != null) {
39 println "[Configuration] Building project in ${gradleBuildDir}" 24 println "[Configuration] Building project in ${gradleBuildDir}"
40 allprojects { 25 allprojects {
41 buildDir = "${gradleBuildDir}/${project.name}" 26 buildDir = "${gradleBuildDir}/${project.name}"
42 } 27 }
43 } 28 }
44 29
45 subprojects { 30 subprojects {
31 repositories {
32 google()
33 jcenter()
34 }
46 task listAllDependencies(type: DependencyReportTask) {} 35 task listAllDependencies(type: DependencyReportTask) {}
47 } 36 }
48
49 println "[Configuration] Using adblock-android ABI flavor: " + getAbiFlavor()
OLDNEW

Powered by Google App Engine
This is Rietveld