-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
71 lines (58 loc) · 1.71 KB
/
Copy pathbuild.gradle
File metadata and controls
71 lines (58 loc) · 1.71 KB
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
plugins {
id "de.monticore.generator" version "$mc_version" apply false
}
allprojects {
group = "de.monticore"
layout.buildDirectory = layout.projectDirectory.dir("target")
repositories {
if (("true").equals(getProperty('useLocalRepo'))) {
mavenLocal()
}
maven {
credentials.username = mavenUser
credentials.password = mavenPassword
url = repo
}
mavenCentral()
}
}
subprojects {
apply plugin: "java-library"
apply plugin: "maven-publish"
apply plugin: "de.monticore.generator"
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
withJavadocJar()
withSourcesJar()
}
tasks.withType(JavaCompile).configureEach {
options.encoding = "UTF-8"
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
testLogging {
exceptionFormat = "full"
showStackTraces = true
showStandardStreams = true
}
}
publishing {
repositories {
maven {
credentials.username = mavenUser
credentials.password = mavenPassword
def releasesRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-releases/"
def snapshotsRepoUrl = "https://nexus.se.rwth-aachen.de/content/repositories/monticore-snapshots/"
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl
}
}
publications {
mavenJava(MavenPublication) {
artifactId = "$project.name"
from components.java
}
}
}
}