-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
104 lines (89 loc) · 2.64 KB
/
build.gradle
File metadata and controls
104 lines (89 loc) · 2.64 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
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
/* (c) https://github.com/MontiCore/monticore */
plugins {
id "java"
id "de.monticore.generator" version "$mc_version"
id "maven-publish"
id "com.github.johnrengelman.shadow" version "$shadow_plugin_version"
id 'org.ec4j.editorconfig' version "0.0.3"
}
group = "de.monticore.lang"
description = "MCPython"
java {
withSourcesJar()
withJavadocJar()
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
dependencies {
grammar "de.monticore:monticore-grammar:$mc_version"
implementation "de.monticore:monticore-runtime:$mc_version"
implementation "org.jscience:jscience:$jscience_version"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.6.2"
testImplementation "org.junit.jupiter:junit-jupiter-engine:5.6.2"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.6.2"
testImplementation "com.github.javaparser:javaparser-symbol-solver-core:3.14.11"
}
repositories {
if (("true").equals(getProperty('useLocalRepo'))) {
mavenLocal()
}
maven {
credentials.username mavenUser
credentials.password mavenPassword
url repo
}
}
test {
useJUnitPlatform()
testLogging {
exceptionFormat = 'full'
showStackTraces = true
showStandardStreams = true
}
onOutput { descriptor, event ->
logger.lifecycle("Test: " + descriptor + " produced standard out/err: " + event.message)
}
}
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
shadowJar {
manifest {
attributes "Main-Class": "de.monticore.umlcd4a.CD4ACLI"
}
archiveClassifier = "cli"
}
task testReport(type: TestReport) {
destinationDir = file("$buildDir/reports/allTests")
reportOn tasks.withType(Test)
}
def testProjects = [
"bletl" : "https://github.com/JuBiotech/bletl.git",
"calibr8" : "https://github.com/sandialabs/calibr8.git",
"murefi" : "https://github.com/JuBiotech/murefi.git",
"robotools": "https://github.com/JuBiotech/robotools.git"
]
testProjects.forEach { pn, pUrl ->
def tn = "cloneExternalTestRepos_$pn"
tasks.register(tn, Exec) {
def cloneDir = "$buildDir/testRepos/$pn"
commandLine "git", "clone", pUrl, cloneDir
outputs.dir(cloneDir)
}
tasks.test.dependsOn(tasks.named(tn))
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
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
}
}