/
build.gradle
107 lines (94 loc) · 3.37 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
ext {
configuration = [
package : "staggeredanimationgroup",
compileVersion : 26,
buildToolsVersion: "26.0.2",
minSdk : 9,
targetSdk : 26,
versionCode : 1,
versionName : "1.0.0"
]
libraries = [
support : "26.1.0",
constraintlayout: "1.1.0-beta1"
]
bintrayConfig = [
userOrg : "blipinsk",
userName : "Bartosz Lipinski",
userEmail : "bartoszlipinski90@gmail.com",
groupId : "com.bartoszlipinski.constraint",
name : "StaggeredAnimationGroup",
artifact : "staggeredanimationgroup",
description: "Fluent API wrapper for Android Espresso",
website : "https://github.com/blipinsk/StaggeredAnimationGroup",
gitUrl : "https://github.com/blipinsk/StaggeredAnimationGroup.git",
licenseDesc: "The Apache Software License, Version 2.0"
]
bintrayUser = BINTRAY_USERNAME
bintrayKey = BINTRAY_API_KEY
dryRun = 'true'
}
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-rc1'
classpath 'com.novoda:bintray-release:0.5.0'
// clean build bintrayUpload
}
}
allprojects {
repositories {
jcenter()
google()
}
}
subprojects {
group = bintrayConfig.groupId
version = configuration.versionCode
if (bintrayConfig.isUploading && project.name in [bintrayConfig.artifact]) {
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()
println 'Overriding pom-file to make sure we can sync to maven central!'
pom {
//noinspection GroovyAssignabilityCheck
project {
name "$project.name"
artifactId bintrayConfig.artifact
packaging project.name == 'compiler' ? 'jar' : '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
}