-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle.kts
83 lines (71 loc) · 2.16 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
import de.marcphilipp.gradle.nexus.NexusPublishPlugin
import java.time.Duration
plugins {
kotlin("jvm") version Versions.kotlin apply false
id("io.codearte.nexus-staging") version Versions.`nexus-staging`
id("de.marcphilipp.nexus-publish") version Versions.`nexus-publish`
jacoco
base
}
allprojects {
repositories {
mavenCentral()
jcenter()
}
}
subprojects {
group = "org.taymyr.lagom"
version = "1.2.0-SNAPSHOT"
apply<JacocoPlugin>()
apply<NexusPublishPlugin>()
jacoco {
toolVersion = Versions.jacoco
}
nexusPublishing {
repositories {
sonatype()
}
clientTimeout.set(Duration.parse("PT10M")) // 10 minutes
}
}
val jacocoAggregateMerge by tasks.creating(JacocoMerge::class) {
group = LifecycleBasePlugin.VERIFICATION_GROUP
executionData(
project(":lagom-metrics-java").buildDir.absolutePath + "/jacoco/test.exec"
)
dependsOn(
":lagom-metrics-java:test"
)
}
@Suppress("UnstableApiUsage")
val jacocoAggregateReport by tasks.creating(JacocoReport::class) {
group = LifecycleBasePlugin.VERIFICATION_GROUP
executionData(jacocoAggregateMerge.destinationFile)
reports {
xml.isEnabled = true
}
additionalClassDirs(files(subprojects.flatMap { project ->
listOf("scala", "kotlin").map { project.buildDir.path + "/classes/$it/main" }
}))
additionalSourceDirs(files(subprojects.flatMap { project ->
listOf("scala", "kotlin").map { project.file("src/main/$it").absolutePath }
}))
dependsOn(jacocoAggregateMerge)
}
tasks.check { finalizedBy(jacocoAggregateReport) }
nexusStaging {
packageGroup = "org.taymyr"
username = ossrhUsername
password = ossrhPassword
numberOfRetries = 360 // 1 hour if 10 seconds delay
delayBetweenRetriesInMillis = 10000 // 10 seconds
}
tasks.wrapper {
distributionType = Wrapper.DistributionType.ALL
}
tasks.closeRepository {
mustRunAfter(subprojects.map { it.tasks.getByName("publishToSonatype") }.toTypedArray())
}
tasks.closeAndReleaseRepository {
mustRunAfter(subprojects.map { it.tasks.getByName("publishToSonatype") }.toTypedArray())
}