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: Created May 17, 2018, 1:25 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 import java.util.regex.Matcher
2 import java.util.regex.Pattern 2 import java.util.regex.Pattern
3 3
4 // ABI flavor of "adblock-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*)")
15 } 15 }
16 16
17 Matcher matcher = pattern.matcher(taskReqStr) 17 Matcher matcher = pattern.matcher(taskReqStr)
18 18
19 if (matcher.find()) { 19 if (matcher.find()) {
20 return matcher.group(1).toLowerCase() 20 return matcher.group(1).toLowerCase()
21 } else { 21 } else {
22 return "abi_all" 22 return "abi_all"
23 } 23 }
24 } 24 }
25 25
26 buildscript { 26 buildscript {
27 repositories { 27 repositories {
28 mavenLocal() 28 mavenLocal()
29 mavenCentral()
30 jcenter() 29 jcenter()
31 } 30 }
32 dependencies { 31 dependencies {
33 classpath 'com.android.tools.build:gradle:2.3.0' 32 classpath 'com.android.tools.build:gradle:2.3.0'
33 classpath 'com.novoda:bintray-release:0.8.1'
34 } 34 }
35 } 35 }
36 36
37 ext {
38 bintrayUserOrg = 'adblockplus'
diegocarloslima 2018/05/17 13:45:47 We still need to discuss what will be our organiza
39 bintrayGroupId = 'org.adblockplus'
diegocarloslima 2018/05/17 13:45:48 I think that for the group id is fine if we strip
40 bintrayLicences = ['GPL-3.0']
41 bintrayWebsite = 'https://github.com/adblockplus/libadblockplus-android'
42 bintrayIssueTracker = 'http://issues.adblockplus.org/'
43 bintrayRepository = 'https://github.com/adblockplus/libadblockplus-android.g it'
44 }
45
37 def gradleBuildDir = System.getenv('GRADLE_BUILD_DIR') 46 def gradleBuildDir = System.getenv('GRADLE_BUILD_DIR')
38 if (gradleBuildDir != null) { 47 if (gradleBuildDir != null) {
39 println "[Configuration] Building project in ${gradleBuildDir}" 48 println "[Configuration] Building project in ${gradleBuildDir}"
40 allprojects { 49 allprojects {
41 buildDir = "${gradleBuildDir}/${project.name}" 50 buildDir = "${gradleBuildDir}/${project.name}"
42 } 51 }
43 } 52 }
44 53
45 subprojects { 54 subprojects {
46 task listAllDependencies(type: DependencyReportTask) {} 55 task listAllDependencies(type: DependencyReportTask) {}
47 } 56 }
48 57
49 println "[Configuration] Using adblock-android ABI flavor: " + getAbiFlavor() 58 println "[Configuration] Using adblock-android ABI flavor: " + getAbiFlavor()
OLDNEW

Powered by Google App Engine
This is Rietveld