forked from hernandazevedo/androidmp3recorder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
77 lines (67 loc) · 2.29 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
localProp = new Properties()
if(rootProject.file("local.properties").exists())
localProp.load(new FileInputStream(rootProject.file("local.properties")))
groupName = "com.hernandazevedo"
pkgVersion = System.env.BITRISE_GIT_TAG != null ? System.env.BITRISE_GIT_TAG.replace("v", "") : "1.0.0"
packageCloudToken = System.env.PACKAGECLOUD_TOKEN != null ? System.env.PACKAGECLOUD_TOKEN : localProp["packageCloudToken"]
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
configurations {
deployerJars
}
google()
jcenter()
maven {
url "https://packagecloud.io/hernandazevedo/androidmp3recorder/maven2"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
subprojects{
afterEvaluate {
dependencies {
deployerJars "io.packagecloud.maven.wagon:maven-packagecloud-wagon:0.0.6"
}
}
}
ext.uploadArtifacts = { artifactId, repo, config ->
println("Artifact " + artifactId)
println("Package Version " + pkgVersion)
repo.mavenDeployer {
configuration = config.deployerJars
repository(url: "packagecloud+https://packagecloud.io/hernandazevedo/androidmp3recorder") {
authentication(password: packageCloudToken)
}
pom.version = pkgVersion
pom.artifactId = artifactId
pom.groupId = groupName
pom.whenConfigured { pom ->
println("Current Dependencies ${pom.dependencies}")
pom.dependencies.each { dep ->
println("Processing ${dep}")
if (dep.getVersion() == "unspecified" && dep.getGroupId() == rootProject.name) {
println("Updating Dependencies")
dep.setGroupId(groupName)
dep.setVersion(pkgVersion)
println("Updated ${dep}")
}
}
}
}
}