-
Notifications
You must be signed in to change notification settings - Fork 18
/
build.gradle
143 lines (120 loc) · 4.16 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
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
apply from: 'manifest.gradle'
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"
}
}
allprojects {
repositories {
google()
mavenLocal()
mavenCentral()
maven { url 'https://jitpack.io' }
}
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
options.addStringOption('encoding', 'UTF-8')
options.addStringOption('charSet', 'UTF-8')
}
}
subprojects {
afterEvaluate { project ->
if (!plugins.hasPlugin('maven-publish')) {
return
}
group = "io.github.oneuiproject"
version = android.defaultConfig.versionName
publishing {
publications {
mavenJava(MavenPublication) {
group project.group
artifactId POM_ARTIFACT_ID
version android.defaultConfig.versionName
afterEvaluate {
from components.release
}
pom {
name = POM_NAME
description = POM_DESCRIPTION
packaging = POM_PACKAGING
url = POM_URL
inceptionYear = POM_INCEPTION_YEAR
licenses {
license {
name = POM_LICENCE_NAME
url = POM_LICENCE_URL
distribution = POM_LICENCE_DIST
}
}
developers {
developer {
id = POM_DEVELOPER_ID
name = POM_DEVELOPER_NAME
url = POM_DEVELOPER_URL
}
}
scm {
url = POM_SCM_URL
connection = POM_SCM_CONNECTION
developerConnection = POM_SCM_DEV_CONNECTION
}
}
}
}
repositories {
maven {
name 'ossrh'
url 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}
}
afterEvaluate {
if (!plugins.hasPlugin('signing')) {
return
}
android {
publishing {
singleVariant("release") {
withSourcesJar()
withJavadocJar()
}
}
}
signing {
def signingKeyId = System.getenv("SIGNING_KEYID")
def signingKey = System.getenv("SIGNING_PRIVATE_KEY")
def signingPassword = System.getenv("SIGNING_PASSWORD")
useInMemoryPgpKeys(signingKeyId, signingKey, signingPassword)
sign publishing.publications
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
POM_INCEPTION_YEAR = "2022"
POM_PACKAGING = "aar"
POM_URL = "https://github.com/OneUIProject/oneui-design"
POM_SCM_URL = "https://github.com/OneUIProject/oneui-design"
POM_SCM_CONNECTION = "scm:git@github.com:OneUIProject/oneui-design.git"
POM_SCM_DEV_CONNECTION = "scm:git@github.com:OneUIProject/oneui-design.git"
POM_LICENCE_NAME = "MIT License"
POM_LICENCE_URL = "https://github.com/OneUIProject/oneui-design/blob/master/LICENSE"
POM_LICENCE_DIST = "repo"
POM_DEVELOPER_ID = "OUIProject"
POM_DEVELOPER_NAME = "OneUI Project"
POM_DEVELOPER_URL = "https://github.com/OneUIProject"
}