Skip to content

Commit bf7f3e2

Browse files
authored
Merge pull request #1 from MontiCore/update/mc-gradle
Update MC gradle plugin
2 parents d1cc47e + 0d0dd1d commit bf7f3e2

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed

build.gradle

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
/* (c) https://github.com/MontiCore/monticore */
2-
import de.monticore.MCTask
3-
42
plugins {
53
id "java"
6-
id "monticore" version "$mc_version" // MontiCore Plugin
4+
id "de.monticore.generator" version "$mc_version" // MontiCore Plugin
75
id "maven-publish"
86
id "com.github.johnrengelman.shadow" version "$shadow_plugin_version"
97
id 'jacoco'
@@ -17,15 +15,8 @@ description = "Use Case Diagram DSL"
1715
sourceCompatibility = "11"
1816

1917
dependencies {
20-
implementation "de.monticore:monticore-runtime:$mc_version"
21-
implementation "de.monticore:monticore-grammar:$mc_version"
22-
grammar ("de.monticore:monticore-grammar:$mc_version"){ capabilities {
23-
requireCapability("de.monticore:monticore-grammar-grammars")}
24-
}
25-
implementation "de.se_rwth.commons:se-commons-logging:$se_commons_version"
26-
implementation "de.se_rwth.commons:se-commons-utilities:$se_commons_version"
18+
grammar ("de.monticore:monticore-grammar:$mc_version")
2719
implementation group:'com.google.guava', name:'guava', version:guava_version
28-
implementation group:'org.antlr', name:'antlr4-runtime', version:antlr_version
2920
implementation "commons-cli:commons-cli:$commons_cli_version"
3021
testImplementation "de.monticore:monticore-generator:$mc_version"
3122
testImplementation group:'junit', name:'junit', version:junit_version
@@ -48,35 +39,15 @@ repositories {
4839
}
4940

5041
// configure non-standard source sets
51-
sourceSets {
52-
main.java.srcDirs += [ "$projectDir/target/generated-sources/monticore/sourcecode"]
53-
}
5442
buildDir = file("$projectDir/target")
5543

56-
task generateUCD (type: MCTask) {
57-
grammar = file "$grammarDir/UCD.mc4"
58-
outputDir = file "$buildDir/generated-sources/monticore/sourcecode"
59-
def uptoDate = incCheck("UCD.mc4")
60-
outputs.upToDateWhen { uptoDate }
61-
}
62-
63-
compileJava {
64-
dependsOn project.collect { it.tasks.withType(MCTask) }
65-
}
66-
6744
java {
6845
withSourcesJar()
6946
withJavadocJar()
7047
}
7148
// generated java doc contains errors, disable for now
7249
javadoc.failOnError(false)
73-
tasks.sourcesJar.dependsOn generateUCD
7450

75-
// build grammar jar as well
76-
task grammarJar(type: Jar) {
77-
from ("$projectDir/$grammarDir"){ include "**/*.mc4" }
78-
archiveClassifier = "grammars"
79-
}
8051

8152
shadowJar {
8253
archiveFileName = 'MCUCD.jar'
@@ -95,7 +66,6 @@ publishing {
9566
mavenJava(MavenPublication) {
9667
artifactId = "$project.name"
9768
from components.java
98-
artifact grammarJar
9969
}
10070
}
10171
repositories.maven {

0 commit comments

Comments
 (0)