From c33438c5322546d07fc10def90231a0c94aaef2b Mon Sep 17 00:00:00 2001 From: Arkadiusz Buras Date: Mon, 11 May 2015 14:39:52 +0200 Subject: [PATCH] Distribution fix --- desktop/build.gradle | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/desktop/build.gradle b/desktop/build.gradle index f083cc3..033ce9e 100644 --- a/desktop/build.gradle +++ b/desktop/build.gradle @@ -5,6 +5,9 @@ sourceSets.main.java.srcDirs = [ "src/" ] project.ext.mainClassName = "macbury.forge.desktop.DesktopLauncher" project.ext.assetsDir = new File("../core/assets"); +project.ext.distDir = new File("../dist"); + +libsDirName = new File("../../dist"); task run(dependsOn: classes, type: JavaExec) { main = project.mainClassName @@ -20,24 +23,30 @@ task dist(type: Jar) { from files(sourceSets.main.output.resourcesDir) from {configurations.compile.collect {zipTree(it)}} //from files(project.assetsDir); - + + exclude 'META-INF/*.DSA', 'META-INF/*.RSA', 'META-INF/*.SF' + manifest { attributes 'Main-Class': project.mainClassName } + copy { from "${assetsDir}/db" - into "${buildDir}/libs/db" + into "${distDir}/db" } copy { from "${assetsDir}/audio" - into "${buildDir}/libs/audio" + into "${distDir}/audio" } copy { from "${assetsDir}/graphics" - into "${buildDir}/libs/graphics" + into "${distDir}/graphics" } + + } + dist.dependsOn classes