-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
69 lines (60 loc) · 1.8 KB
/
build.gradle.kts
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
import BuildConfig.createPomAction
plugins {
id("com.android.application") apply false
id("com.android.library") apply false
alias(magic.plugins.kotlin.android) apply false
alias(magic.plugins.kotlin.jvm) apply false
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
id("signing")
id("maven-publish")
}
allprojects {
version = P.projectVersion
group = P.projectGroupId
description = P.projectDescription
}
tasks.wrapper {
distributionType = Wrapper.DistributionType.ALL
}
val nexusStagingProfileId: String? by project
val nexusUsername: String? by project
val nexusPassword: String? by project
val signingKey: String? by project
val signingPassword: String? by project
subprojects {
if ("example" in name || "lint" in name) return@subprojects
apply {
plugin("maven-publish")
plugin("signing")
}
afterEvaluate {
publishing {
publications {
register<MavenPublication>("release") {
afterEvaluate {
from(components["release"])
}
pom(createPomAction())
}
}
}
}
signing {
sign(publishing.publications)
if (signingKey != null && signingPassword != null) {
useInMemoryPgpKeys(signingKey, signingPassword)
}
}
}
nexusPublishing {
packageGroup.set(group.toString())
repositories(Action {
sonatype {
stagingProfileId.set(nexusStagingProfileId)
username.set(nexusUsername)
password.set(nexusPassword)
nexusUrl.set(uri("https://s01.oss.sonatype.org/service/local/"))
snapshotRepositoryUrl.set(uri("https://s01.oss.sonatype.org/content/repositories/snapshots/"))
}
})
}