-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
56 lines (47 loc) · 1.43 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
import de.marcphilipp.gradle.nexus.NexusPublishPlugin
import java.time.Duration
val group: String by project
val version: String by project
val sonatypeUsername: String? = project.findProperty("sonatypeUsername") as String? ?: System.getenv("sonatypeUsername")
val sonatypePassword: String? = project.findProperty("sonatypeUsername") as String? ?: System.getenv("sonatypePassword")
plugins {
id("io.codearte.nexus-staging") version "0.21.2"
id("de.marcphilipp.nexus-publish") version "0.4.0"
id("com.github.ben-manes.versions") version "0.38.0"
jacoco
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
subprojects {
group = group
version = version
apply<NexusPublishPlugin>()
nexusPublishing {
repositories {
sonatype()
}
clientTimeout.set(Duration.parse("PT10M")) // 10 minutes
}
}
nexusStaging {
packageGroup = group
username = sonatypeUsername
password = sonatypePassword
numberOfRetries = 360 // 1 hour if 10 seconds delay
delayBetweenRetriesInMillis = 10000 // 10 seconds
}
tasks {
wrapper {
distributionType = Wrapper.DistributionType.ALL
}
closeRepository {
mustRunAfter(subprojects.map { it.tasks.getByName("publishToSonatype") }.toTypedArray())
}
closeAndReleaseRepository {
mustRunAfter(subprojects.map { it.tasks.getByName("publishToSonatype") }.toTypedArray())
}
}