From f13ac0c4ee79deb9d3d866a43c039cd1751af4e5 Mon Sep 17 00:00:00 2001 From: erdelf Date: Sun, 17 Jul 2016 14:26:16 +0200 Subject: [PATCH] gradle now copies Catalog and executes the jar --- TTDHelper/build.gradle | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/TTDHelper/build.gradle b/TTDHelper/build.gradle index 624618f..5a097e5 100644 --- a/TTDHelper/build.gradle +++ b/TTDHelper/build.gradle @@ -45,4 +45,22 @@ jar { 'Main-Class': 'ttdhelper.Main' ) } -} \ No newline at end of file +} + +task copyCatalog{ + copy{ + from (projectDir){ + include 'Katalog.xml' + } + into 'build/libs' + } +} + +task runFinalJar(type: JavaExec) { + classpath = files('build/libs/TTDHelper.jar') + classpath += sourceSets.main.runtimeClasspath + main = "ttdhelper.Main" +} + +build.dependsOn.add("copyCatalog") +build.dependsOn.add("runFinalJar") \ No newline at end of file