Skip to content

Commit

Permalink
Compile MM before building jar.
Browse files Browse the repository at this point in the history
  • Loading branch information
neoancient committed Feb 5, 2019
1 parent 96fe2d2 commit 0aec13b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,18 @@ file. Defaulting to ${mmDir}"""
}
}

task mmJar (type: Jar) {
task compileMM (type: GradleBuild) {
description = 'Compiles the MM directory for packaging in a Jar'

buildFile = "${mmDir}/build.gradle"
dir = "${mmDir}"
tasks = [ 'compileTestJava' ]
}

task mmJar (type: Jar, dependsOn: compileMM) {
archiveName = "MegaMek.jar"
from "${mmDir}/build/classes/java/main"
from "${mmDir}/build/resources/main"
from "${mmDir}/megamek/build/classes/java/main"
from "${mmDir}/megamek/build/resources/main"
manifest {
attributes "Main-Class": mainClassName
attributes 'Class-Path' : (project.sourceSets.main.runtimeClasspath.files
Expand Down

0 comments on commit 0aec13b

Please sign in to comment.