diff --git a/build.gradle b/build.gradle index aa7a89c..609d499 100644 --- a/build.gradle +++ b/build.gradle @@ -11,9 +11,18 @@ repositories { jcenter() } +jar { + manifest { + attributes "Main-Class": "tk.draganczuk.url.App" + } + + from { + configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } + } +} + dependencies { compile "com.sparkjava:spark-core:2.8.0" - compile 'org.slf4j:slf4j-simple:1.7.21' } application { diff --git a/src/main/resources/public/index.html b/index.html similarity index 100% rename from src/main/resources/public/index.html rename to index.html diff --git a/src/main/java/tk/draganczuk/url/App.java b/src/main/java/tk/draganczuk/url/App.java index 456e1de..24bff3e 100644 --- a/src/main/java/tk/draganczuk/url/App.java +++ b/src/main/java/tk/draganczuk/url/App.java @@ -7,7 +7,7 @@ public class App { public static void main(String[] args) { // Useful for developing the frontend // http://sparkjava.com/documentation#examples-and-faq -> How do I enable automatic refresh of static files? - if (System.getenv("dev").equals("true")) { + if (System.getenv("dev") != null) { String projectDir = System.getProperty("user.dir"); String staticDir = "/src/main/resources/public"; staticFiles.externalLocation(projectDir + staticDir);