-
Notifications
You must be signed in to change notification settings - Fork 22
/
build.gradle
155 lines (133 loc) · 4.12 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
import org.gradle.plugins.signing.Sign
buildscript {
repositories {
maven {
url "http://maven.grogard.net/content/groups/public/"
}
jcenter()
mavenLocal()
}
dependencies {
classpath 'com.adaptc.gradle:nexus-workflow:0.6'
classpath 'org.codehaus.groovy:groovy-backports-compat23:2.3.6'
}
}
apply plugin:'idea'
apply plugin:com.adaptc.gradle.nexusworkflow.NexusWorkflowPlugin
archivesBaseName = "android-publisher"
group = "com.savillians.gradle"
apply plugin:'java'
apply plugin:'groovy'
apply plugin:'maven'
apply plugin:'signing'
apply plugin:'idea'
configurations {
deployerJars
}
configurations.all {
// check for updates every build
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
repositories {
maven {
url "http://maven.grogard.net/content/groups/public/"
}
jcenter()
mavenLocal()
}
dependencies {
compile 'org.codehaus.groovy:groovy-backports-compat23:2.3.6'
deployerJars "org.apache.maven.wagon:wagon-http:1.0-beta-2"
testCompile ("org.spockframework:spock-core:0.7-groovy-1.8") {
exclude module:"groovy-all"
}
compile gradleApi()
compile localGroovy()
compile 'com.google.apis:google-api-services-androidpublisher:v2-rev16-1.20.0'
compile 'com.google.oauth-client:google-oauth-client:1.19.0'
compile 'com.google.oauth-client:google-oauth-client-jetty:1.19.0'
compile 'com.android.tools.build:gradle:2.0.0-beta5'
}
sourceCompatibility = "1.6"
targetCompatibility = "1.6"
manifest {
mainAttributes(
"Built-By": 'bluesliverx',
"Created-By": System.properties['java.vm.version'] + " (" + System.properties['java.vm.vendor'] + ")",
"Implementation-Title": "Savillians Gradle Plugins - "+project.archivesBaseName,
"Implementation-Version": project.version,
"Implementation-Vendor": 'savillians.com')
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn:javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
signing {
required { !project.version.contains("-SNAPSHOT") }
sign configurations.archives
}
// Configure signing keys from travis encryption
gradle.taskGraph.whenReady { taskGraph ->
if (taskGraph.allTasks.any { it instanceof Sign }) {
def keyId = System.getenv('SIGNING_KEY_ID')
def password = System.getenv('SIGNING_PASSWORD')
def keyFile = file('maven.gpg').absolutePath
allprojects { ext."signing.keyId" = keyId }
allprojects { ext."signing.secretKeyRingFile" = keyFile }
allprojects { ext."signing.password" = password }
}
}
uploadArchives {
repositories.mavenDeployer {
beforeDeployment { deployment -> signing.signPom(deployment) }
configuration = configurations.deployerJars
repository(url:"https://oss.sonatype.org/service/local/staging/deploy/maven2") {
authentication(userName:System.getenv("MAVEN_CENTRAL_USERNAME"), password:System.getenv("MAVEN_CENTRAL_PASSWORD"))
}
snapshotRepository(url:"https://oss.sonatype.org/content/repositories/snapshots") {
authentication(userName:System.getenv("MAVEN_CENTRAL_USERNAME"), password:System.getenv("MAVEN_CENTRAL_PASSWORD"))
}
pom {
'project' {
name project.projectName
description project.projectDescription
licenses {
license {
name "The Apache Software License, Version 2.0"
url "http://www.apache.org/licenses/LICENSE-2.0.txt"
distribution "repo"
}
}
url "http://github.com/bluesliverx/gradle-android-publisher"
scm {
connection "scm:git:https://github.com/bluesliverx/gradle-android-publisher.git"
developerConnection "scm:git:https://github.com/bluesliverx/gradle-android-publisher.git"
url "http://github.com/bluesliverx/gradle-android-publisher"
}
developers {
developer {
id "bksaville"
name "Brian Saville"
email "[email protected]"
organization = "Savillians Tech"
organizationUrl "http://savilliantech.blogspot.com"
timezone "-7"
}
}
}
}
}
}
task wrapper(type: Wrapper) {
gradleVersion = '2.2.1'
jarFile = 'wrapper/wrapper.jar'
}