-
Notifications
You must be signed in to change notification settings - Fork 26
/
build.gradle
66 lines (52 loc) · 1.7 KB
/
build.gradle
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
plugins {
id 'java-library'
id 'maven-publish'
id 'signing'
//id 'org.kordamp.gradle.java-project' version '0.45.0'
id 'org.jreleaser' version '1.14.0'
}
group 'eu.lucaventuri'
version version
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
}
dependencies {
testImplementation group: 'junit', name: 'junit', version: '4.13.1'
testImplementation 'org.reactivestreams:reactive-streams-tck-flow:1.0.4'
testImplementation group: 'org.testng', name: 'testng', version: '6.14.3'
testImplementation group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: '2.13.3'
testImplementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.14.0-rc1'
}
apply from: 'publish.gradle'
task testNG(type: Test) { useTestNG() }
test.dependsOn testNG
class ReleaseCheckState {
static volatile String releaseNotes = ""
}
task testJar(type: Jar) {
from sourceSets.test.output + sourceSets.main.output
}
tasks.register("releaseCheck") {
if (gradle.startParameter.taskNames.any { it == "release" || it == "jreleaserConfig" || it == "jreleaserFullRelease" }) {
ReleaseCheckState.releaseNotes = file("RELEASE_NOTES.md").text
println "*** RELEASE NOTES:\n$ReleaseCheckState.releaseNotes\n"
ant.input(message: 'Are the Release Notes correct?', addproperty: 'releaseOk', defaultValue: 'N')
if (!"y".equalsIgnoreCase(ant.properties.releaseOk.toString()))
System.exit(0)
}
}
jreleaser {
release {
github {
overwrite = true
changelog {
external = file('RELEASE_NOTES.md')
}
}
}
}