-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
126 lines (117 loc) · 4.08 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
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
import com.github.breadmoirai.githubreleaseplugin.GithubReleaseExtension
import net.pearx.multigradle.util.MultiGradleExtension
val projectChangelog: String by project
val projectDescription: String by project
val pearxRepoUsername: String? by project
val pearxRepoPassword: String? by project
val sonatypeOssUsername: String? by project
val sonatypeOssPassword: String? by project
val githubAccessToken: String? by project
val devBuildNumber: String? by project
plugins {
id("net.pearx.multigradle.simple.project")
id("org.jetbrains.kotlin.multiplatform") apply (false)
id("com.github.breadmoirai.github-release")
`maven-publish`
signing
}
group = "net.pearx.okservable"
description = projectDescription
configure<MultiGradleExtension> {
if (devBuildNumber != null) {
projectVersion = "$projectVersion-dev-$devBuildNumber"
}
}
configure<PublishingExtension> {
publications.withType<MavenPublication> {
pom {
name.set(artifactId)
description.set(projectDescription)
url.set("https://github.com/pearxteam/okservable")
licenses {
license {
name.set("Mozilla Public License, Version 2.0")
url.set("https://mozilla.org/MPL/2.0/")
distribution.set("repo")
}
}
organization {
name.set("PearX Team")
url.set("https://pearx.net/")
}
developers {
developer {
id.set("mrAppleXZ")
name.set("mrAppleXZ")
email.set("me@pearx.net")
url.set("https://pearx.net/members/mrapplexz")
organization.set("PearX Team")
organizationUrl.set("https://pearx.net/")
roles.set(listOf("developer"))
timezone.set("Asia/Yekaterinburg")
}
}
scm {
url.set("https://github.com/pearxteam/okservable")
connection.set("scm:git:git://github.com/pearxteam/okservable")
developerConnection.set("scm:git:git://github.com/pearxteam/okservable")
}
issueManagement {
system.set("GitHub")
url.set("https://github.com/pearxteam/okservable/issues")
}
ciManagement {
system.set("Jenkins")
url.set("https://ci.pearx.net/job/pearxteam/job/okservable")
}
}
}
repositories {
maven {
credentials {
username = pearxRepoUsername
password = pearxRepoPassword
}
name = "pearx-repo-develop"
url = uri("https://repo.pearx.net/maven2/develop/")
}
maven {
credentials {
username = pearxRepoUsername
password = pearxRepoPassword
}
name = "pearx-repo-release"
url = uri("https://repo.pearx.net/maven2/release/")
}
maven {
credentials {
username = sonatypeOssUsername
password = sonatypeOssPassword
}
name = "sonatype-oss-release"
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
}
}
}
tasks {
register("publishDevelop") {
group = "publishing"
dependsOn(withType<PublishToMavenRepository>().matching { it.repository.name.endsWith("-develop") })
}
register("publishRelease") {
group = "publishing"
dependsOn(withType<PublishToMavenRepository>().matching { it.repository.name.endsWith("-release") })
dependsOn(named("githubRelease"))
}
}
configure<SigningExtension> {
sign(publishing.publications)
}
configure<GithubReleaseExtension> {
setToken(githubAccessToken)
setOwner("pearxteam")
setRepo("okservable")
setTargetCommitish("master")
setBody(projectChangelog)
//setReleaseAssets((publishing.publications["maven"] as MavenPublication).artifacts.map { it.file })
}