Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 2 additions & 32 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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'
Expand All @@ -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
Expand All @@ -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'
Expand All @@ -95,7 +66,6 @@ publishing {
mavenJava(MavenPublication) {
artifactId = "$project.name"
from components.java
artifact grammarJar
}
}
repositories.maven {
Expand Down