-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
52 lines (45 loc) · 1.59 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
import ru.pearx.multigradle.util.MultiGradleExtension
val devBuildNumber: String? by project
plugins {
id("ru.pearx.multigradle.modular.project")
id("kotlin-gradle-plugin") apply (false)
}
project("modules").subprojects {
group = "ru.pearx.carbidelin"
apply<MavenPublishPlugin>()
configure<MultiGradleExtension> {
if(devBuildNumber != null) {
projectVersion = "$projectVersion-dev-$devBuildNumber"
}
}
configure<PublishingExtension> {
repositories {
fun AuthenticationSupported.pearxCredentials() {
credentials {
username = properties["pearxRepoUsername"].toString()
password = properties["pearxRepoPassword"].toString()
}
}
maven {
pearxCredentials()
name = "develop"
url = uri("https://repo.pearx.ru/maven2/develop/")
}
maven {
pearxCredentials()
name = "release"
url = uri("https://repo.pearx.ru/maven2/release/")
}
}
}
tasks {
register("publishDevelop") {
group = "publishing"
dependsOn(withType<PublishToMavenRepository>().matching { it.repository == project.the<PublishingExtension>().repositories["develop"] })
}
register("publishRelease") {
group = "publishing"
dependsOn(withType<PublishToMavenRepository>().matching { it.repository == project.the<PublishingExtension>().repositories["release"] })
}
}
}