Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
116 lines (102 loc) · 3.54 KB
/
Copy pathbuild.gradle
File metadata and controls
116 lines (102 loc) · 3.54 KB
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
plugins {
alias(libs.plugins.android.library) apply false
}
apply from: "manifest.gradle"
allprojects {
tasks.withType(Javadoc).tap {
configureEach {
options.addStringOption("Xdoclint:none", "-quiet")
}
}
}
subprojects {
group = "dev.rikka.shizuku"
afterEvaluate { project ->
if (!(it.findProperty("publishLibrary") ?: false)) {
return
}
plugins.apply("maven-publish")
plugins.apply("signing")
if (project.parent == rootProject) {
group = "${groupIdBase}"
} else {
group = "${groupIdBase}.${project.parent.name}"
}
version = api_version_name
println("${project.displayName}: ${group}:${project.name}:${version}")
publishing {
publications {
mavenJava(MavenPublication) {
group = project.group
artifactId = project.name
version = api_version_name
afterEvaluate {
from components.release
}
pom {
name = POM_NAME
description = POM_DESCRIPTION
url = POM_URL
licenses {
license {
name = POM_LICENCE_NAME
url = POM_LICENCE_URL
}
}
developers {
developer {
name = POM_DEVELOPER_NAME
url = POM_DEVELOPER_URL
}
}
scm {
connection = POM_SCM_CONNECTION
url = POM_SCM_URL
}
}
}
}
repositories {
maven {
name = "ossrh"
url = "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
credentials(PasswordCredentials)
}
}
}
android {
publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
def secretKeyRingFile = findProperty("signing.secretKeyRingFile")
if (secretKeyRingFile != null && file(secretKeyRingFile).exists()) {
sign publishing.publications
} else if (signingKey != null) {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications
}
}
}
}
ext {
groupIdBase = "dev.rikka.shizuku"
POM_INCEPTION_YEAR = "2021"
POM_PACKAGING = "aar"
POM_URL = "https://github.com/RikkaApps/Shizuku-API"
POM_SCM_URL = "https://github.com/RikkaApps/Shizuku-API"
POM_SCM_CONNECTION = "scm:git@github.com:RikkaApps/Shizuku-API.git"
POM_SCM_DEV_CONNECTION = "scm:git@github.com:RikkaApps/Shizuku-API.git"
POM_LICENCE_NAME = "MIT License"
POM_LICENCE_URL = "https://github.com/RikkaApps/Shizuku-API/blob/master/LICENSE"
POM_LICENCE_DIST = "repo"
POM_DEVELOPER_ID = "rikka"
POM_DEVELOPER_NAME = "Rikka"
POM_DEVELOPER_URL = "https://github.com/RikkaW"
}