From 244a140038c5ac81251a194df4645b8678863d15 Mon Sep 17 00:00:00 2001 From: Robin Oppermann <robinopp@mail.uni-paderborn.de> Date: Thu, 26 Jan 2017 22:55:29 +0100 Subject: [PATCH] Adapt paths to create an executable version --- .gitlab-ci.yml | 4 ++-- build.gradle | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 575e3ab9..729ff710 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -49,10 +49,10 @@ sonarqube_preview: build: stage: build script: - - ./gradlew -g /cache/.gradle clean assemble + - ./gradlew -g /cache/.gradle clean assemble copyGui artifacts: paths: - - lib/Simulator.jar + - lib/ - target/ allow_failure: false diff --git a/build.gradle b/build.gradle index d56af0ab..07ed72fd 100644 --- a/build.gradle +++ b/build.gradle @@ -32,6 +32,8 @@ sourceSets { java { srcDirs = ["src/applications", "src/core", "src/gui", "src/input", "src/interfaces", "src/main", "src/movement", "src/report", "src/routing", "src/ui", "src/util"] } + output.resourcesDir = 'target' + output.classesDir = 'target' } test { java { @@ -42,6 +44,10 @@ sourceSets { jar { destinationDir = new File('lib') + manifest { + attributes 'Main-Class': 'core.DTNSim' + attributes 'Class-Path': "ECLA.jar DTNConsoleConnection.jar ../target" + } } dependencies { @@ -52,3 +58,12 @@ dependencies { // Use JUnit test framework testCompile 'junit:junit:4.12' } + +task copyGui(type: Copy){ + from 'src/gui/buttonGraphics' + into 'target/gui/buttonGraphics' +} + +clean.doFirst{ + delete 'target' +} \ No newline at end of file -- GitLab