-
Notifications
You must be signed in to change notification settings - Fork 109
/
build.gradle.kts
61 lines (52 loc) · 1.71 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
import org.gradle.tooling.GradleConnector
import net.researchgate.release.ReleaseExtension
plugins {
alias(libs.plugins.io.github.gradle.nexus.publish.plugin)
alias(libs.plugins.net.researchgate.release)
`maven-publish`
}
allprojects {
group = "de.brendamour"
}
nexusPublishing {
repositories {
sonatype ()
}
}
//do not generate extra load on Nexus with new staging repository if signing fails
val initializeSonatypeStagingRepository by tasks.existing
subprojects {
initializeSonatypeStagingRepository {
shouldRunAfter(tasks.withType<Sign>())
}
}
configure<ReleaseExtension> {
tagTemplate.set("jpasskit-\${version}")
with(git) {
requireBranch.set("master")
}
}
// Workaround for https://github.com/researchgate/gradle-release/issues/184
configure(listOf(tasks.release, tasks.runBuildTasks)) {
configure {
actions.clear()
doLast {
GradleConnector
.newConnector()
.forProjectDirectory(layout.projectDirectory.asFile)
.connect()
.use { projectConnection ->
val buildLauncher = projectConnection
.newBuild()
.forTasks(*tasks.toTypedArray())
.setStandardInput(System.`in`)
.setStandardOutput(System.out)
.setStandardError(System.err)
gradle.startParameter.excludedTaskNames.forEach {
buildLauncher.addArguments("-x", it)
}
buildLauncher.run()
}
}
}
}