diff --git a/build.gradle b/build.gradle index ea98477..4a866c2 100644 --- a/build.gradle +++ b/build.gradle @@ -1,9 +1,7 @@ /* (c) https://github.com/MontiCore/monticore */ -import de.monticore.MCTask - plugins { id "java" - id "monticore" version "$mc_version" // MontiCore Plugin + id "de.monticore.generator" version "$mc_version" // MontiCore Plugin id "maven-publish" id "com.github.johnrengelman.shadow" version "$shadow_plugin_version" id 'jacoco' @@ -17,15 +15,8 @@ description = "Use Case Diagram DSL" sourceCompatibility = "11" dependencies { - implementation "de.monticore:monticore-runtime:$mc_version" - implementation "de.monticore:monticore-grammar:$mc_version" - grammar ("de.monticore:monticore-grammar:$mc_version"){ capabilities { - requireCapability("de.monticore:monticore-grammar-grammars")} - } - implementation "de.se_rwth.commons:se-commons-logging:$se_commons_version" - implementation "de.se_rwth.commons:se-commons-utilities:$se_commons_version" + grammar ("de.monticore:monticore-grammar:$mc_version") implementation group:'com.google.guava', name:'guava', version:guava_version - implementation group:'org.antlr', name:'antlr4-runtime', version:antlr_version implementation "commons-cli:commons-cli:$commons_cli_version" testImplementation "de.monticore:monticore-generator:$mc_version" testImplementation group:'junit', name:'junit', version:junit_version @@ -48,35 +39,15 @@ repositories { } // configure non-standard source sets -sourceSets { - main.java.srcDirs += [ "$projectDir/target/generated-sources/monticore/sourcecode"] -} buildDir = file("$projectDir/target") -task generateUCD (type: MCTask) { - grammar = file "$grammarDir/UCD.mc4" - outputDir = file "$buildDir/generated-sources/monticore/sourcecode" - def uptoDate = incCheck("UCD.mc4") - outputs.upToDateWhen { uptoDate } -} - -compileJava { - dependsOn project.collect { it.tasks.withType(MCTask) } -} - java { withSourcesJar() withJavadocJar() } // generated java doc contains errors, disable for now javadoc.failOnError(false) -tasks.sourcesJar.dependsOn generateUCD -// build grammar jar as well -task grammarJar(type: Jar) { - from ("$projectDir/$grammarDir"){ include "**/*.mc4" } - archiveClassifier = "grammars" -} shadowJar { archiveFileName = 'MCUCD.jar' @@ -95,7 +66,6 @@ publishing { mavenJava(MavenPublication) { artifactId = "$project.name" from components.java - artifact grammarJar } } repositories.maven {