-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy pathbuild.gradle
71 lines (65 loc) · 2.6 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
plugins {
id "java-library"
id "maven-publish"
id "signing"
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
}
group = "com.wire"
version = System.getenv("version")
def Properties properties = new Properties()
properties.load(project.rootProject.file("local.properties").newDataInputStream())
nexusPublishing {
repositories {
sonatype {
username = properties.getProperty("sonatype.username") ?: System.getenv("SONATYPE_USERNAME")
password = properties.getProperty("sonatype.password") ?: System.getenv("SONATYPE_PASSWORD")
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact "build/dist/android/avs.aar"
pom {
name.set("wire-avs")
description.set("Wire - Audio, Video, and Signaling (AVS)")
url.set("https://github.com/wireapp/wire-avs")
licenses {
license {
name.set("GPL-3.0")
url.set("https://opensource.org/licenses/GPL-3.0")
}
}
developers {
developer {
id.set("svenwire")
name.set("Sven Jost")
email.set("[email protected]")
organization.set("Wire Swiss GmbH")
}
}
scm {
connection.set("scm:git:git://github.com/wireapp/wire-avs")
developerConnection.set("scm:git:git://github.com/wireapp/wire-avs")
url.set("https://github.com/wireapp/wire-avs")
}
withXml {
def dependenciesNode = asNode().appendNode('dependencies')
findProject(':android:lib').configurations.implementation.allDependencies.each {
def dependencyNode = dependenciesNode.appendNode('dependency')
dependencyNode.appendNode('groupId', it.group)
dependencyNode.appendNode('artifactId', it.name)
dependencyNode.appendNode('version', it.version)
}
}
}
}
}
}
signing {
def signingKeyFile = properties.getProperty("signingKeyFile") ?: System.getenv("PGP_PRIVATE_KEY_FILE")
def signingKey = new File(signingKeyFile).text
def signingPassword = properties.getProperty("signingPassword") ?: System.getenv("PGP_PASSPHRASE")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}