forked from pgjdbc/pgjdbc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
93 lines (78 loc) · 2.42 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
/*
* Copyright (c) 2019, PostgreSQL Global Development Group
* See the LICENSE file in the project root for more information.
*/
plugins {
id("build-logic.repositories")
id("org.nosphere.gradle.github.actions")
// IDE configuration
id("com.github.vlsi.ide")
// Release
id("com.github.vlsi.gradle-extensions")
id("com.github.vlsi.stage-vote-release")
id("jacoco")
}
buildscript {
configurations.classpath {
exclude("xerces")
}
}
ide {
// TODO: set copyright to PostgreSQL Global Development Group
ideaInstructionsUri =
uri("https://github.com/pgjdbc/pgjdbc")
doNotDetectFrameworks("android", "jruby")
}
val String.v: String get() = rootProject.extra["$this.version"] as String
val buildVersion = "pgjdbc".v + releaseParams.snapshotSuffix
println("Building pgjdbc $buildVersion")
val isReleaseVersion = rootProject.releaseParams.release.get()
jacoco {
toolVersion = "0.8.12"
providers.gradleProperty("jacoco.version")
.takeIf { it.isPresent }
?.let { toolVersion = it.get() }
}
val jacocoReport by tasks.registering(JacocoReport::class) {
group = "Coverage reports"
description = "Generates an aggregate report from all subprojects"
}
releaseParams {
tlp.set("pgjdbc")
organizationName.set("pgjdbc")
componentName.set("pgjdbc")
prefixForProperties.set("gh")
svnDistEnabled.set(false)
sitePreviewEnabled.set(false)
releaseTag.set("REL$buildVersion")
nexus {
mavenCentral()
}
voteText.set {
"""
${it.componentName} v${it.version}-rc${it.rc} is ready for preview.
Git SHA: ${it.gitSha}
Staging repository: ${it.nexusRepositoryUri}
""".trimIndent()
}
}
allprojects {
group = "org.postgresql"
version = buildVersion
}
val parameters by tasks.registering {
group = HelpTasksPlugin.HELP_GROUP
description = "Displays build parameters (i.e. -P flags) that can be used to customize the build"
dependsOn(gradle.includedBuild("build-logic").task(":build-parameters:parameters"))
}
plugins.withId("de.marcphilipp.nexus-publish") {
configure<de.marcphilipp.gradle.nexus.NexusPublishExtension> {
clientTimeout.set(java.time.Duration.ofMinutes(15))
}
}
plugins.withId("io.codearte.nexus-staging") {
configure<io.codearte.gradle.nexus.NexusStagingExtension> {
numberOfRetries = 20 * 60 / 2
delayBetweenRetriesInMillis = 2000
}
}