forked from RikkaApps/Shizuku-API
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
124 lines (109 loc) · 3.83 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
apply from: 'manifest.gradle'
ext.kotlinVersion = '1.7.10'
}
plugins {
id 'com.android.application' version '8.0.2' apply false
id 'com.android.library' version '8.0.2' apply false
id 'org.jetbrains.kotlin.jvm' version '1.8.0' apply false
alias libs.plugins.refine apply false
}
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
subprojects {
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
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
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:[email protected]:RikkaApps/Shizuku-API.git"
POM_SCM_DEV_CONNECTION = "scm:[email protected]: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"
}