-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle
112 lines (99 loc) · 3.62 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath 'com.novoda:bintray-release:0.3.4'
// clean build bintrayUpload
}
}
ext {
configuration = [
package : "com.bartoszlipinski.rxanimationbinding",
compileVersion : 23,
buildToolsVersion: "23.0.2",
minSdk : 11,
targetSdk : 23,
versionCode : 4,
versionName : "1.1.0"
]
libraries = [
rx_android: "1.1.0",
rx_java : "1.1.0",
support : "23.1.1"
]
tests = [
supportTest: "0.4.1",
junit : "4.12",
truth : "0.27",
espresso : "2.2.1"
]
bintrayConfig = [
userOrg : "blipinsk",
userName : "Bartosz Lipinski",
userEmail : "bartoszlipinski90@gmail.com",
groupId : "com.bartoszlipinski.rxanimationbinding",
name : "RxAnimationBinding",
artifactRoot : "rxanimationbinding",
artifactSupport: "rxanimationbinding-support-v4",
description : "RxJava binding APIs for Android's animations",
website : "https://github.com/blipinsk/RxAnimationBinding",
gitUrl : "https://github.com/blipinsk/RxAnimationBinding.git",
licenses : ["Apache-2.0"],
licenseDesc : "The Apache Software License, Version 2.0"
]
bintrayUser = BINTRAY_USERNAME
bintrayKey = BINTRAY_API_KEY
dryRun = 'true'
isUploading = project.getGradle().startParameter.taskNames.any { it.contains('bintrayUpload') }
}
subprojects {
repositories {
jcenter()
}
group = bintrayConfig.groupId
version = configuration.versionName
if (isUploading && project.name in [bintrayConfig.artifactRoot, bintrayConfig.artifactSupport]) {
println project.name
apply plugin: 'maven'
gradle.taskGraph.whenReady { taskGraph ->
taskGraph.getAllTasks().find {
it.path == ":$project.name:generatePomFileForMavenPublication"
}.doLast {
file("build/publications/maven/pom-default.xml").delete()
pom {
//noinspection GroovyAssignabilityCheck
project {
name project.name
artifactId project.name
packaging 'aar'
description bintrayConfig.description
url bintrayConfig.website
version configuration.versionName
scm {
url bintrayConfig.gitUrl
connection bintrayConfig.gitUrl
developerConnection bintrayConfig.gitUrl
}
licenses {
license {
name bintrayConfig.licenseDesc
}
}
developers {
developer {
id bintrayConfig.userOrg
name bintrayConfig.userName
email bintrayConfig.userEmail
}
}
}
}.writeTo("build/publications/maven/pom-default.xml")
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}