-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
124 lines (105 loc) · 3.24 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
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
final bomProject = project(":prob-java-bom")
subprojects {
apply(plugin: "maven-publish")
apply(plugin: "signing")
project.group = 'de.hhu.stups'
// IMPORTANT: Before releasing the ProB Java API, remember to set probcli and all dependencies to release versions, not nightly/SNAPSHOT!
// IMPORTANT: Check the variables parserVersion and cliDownloadURL and the dependencies {...} block.
project.version = "4.13.2-SNAPSHOT"
project.ext.isSnapshot = project.version.endsWith("-SNAPSHOT")
project.ext.SOURCE_ENCODING = "UTF-8"
repositories {
mavenCentral()
if (isSnapshot) {
maven {
name "sonatype snapshots"
url "https://oss.sonatype.org/content/repositories/snapshots"
}
}
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
if (project == bomProject) {
// Necessary so that the publishing block below can find components.javaPlatform.
apply(plugin: "java-platform")
} else {
// The java-platform and java plugins cannot be applied at the same time,
// so this part must be skipped for the BOM subproject.
apply(plugin: "java")
dependencies {
// The BOM subproject is pulled in by all other subprojects.
implementation(platform(bomProject))
}
if (project.hasProperty("probHome")) {
tasks.withType(JavaForkOptions) {
systemProperties["prob.home"] = project.probHome
}
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withSourcesJar()
withJavadocJar()
}
tasks.withType(JavaCompile) {
options.encoding = SOURCE_ENCODING
}
tasks.withType(Javadoc) {
options.encoding = SOURCE_ENCODING
}
javadoc {
options {
// silence warnings on missing javadoc
addBooleanOption('Xdoclint:all,-missing', true)
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
// Unfortunately, the java-platform and java plugins use different component names...
from(components.findByName("javaPlatform") ?: components.java)
pom {
name = project.name
url = 'http://www.prob2.de'
licenses {
license {
name = 'Eclipse Public License, Version 1.0'
url = 'http://www.eclipse.org/org/documents/epl-v10.html'
}
}
scm {
connection = 'scm:git:https://github.com/hhu-stups/prob2_kernel.git'
developerConnection = 'scm:git:[email protected]:stups/prob/prob2_kernel.git'
url = 'https://github.com/hhu-stups/prob2_kernel'
}
developers {
developer {
id = 'bendisposto'
name = 'Jens Bendisposto'
email = '[email protected]'
}
}
}
}
}
repositories {
maven {
final releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
final snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url isSnapshot ? snapshotsRepoUrl : releasesRepoUrl
if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword')) {
credentials {
username project.ossrhUsername
password project.ossrhPassword
}
}
}
}
}
signing {
sign publishing.publications.mavenJava
}
ext."signing.secretKeyRingFile" = rootProject.file("secring.gpg").absolutePath
}