diff --git a/.gitignore b/.gitignore index 3e25165..956ed28 100644 --- a/.gitignore +++ b/.gitignore @@ -83,9 +83,6 @@ fabric.properties # Ignore Gradle GUI config gradle-app.setting -# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) -!gradle-wrapper.jar - # Cache of project .gradletasknamecache @@ -117,3 +114,6 @@ gradle-app.setting # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + diff --git a/build.gradle b/build.gradle index 8aa69cf..c44307d 100644 --- a/build.gradle +++ b/build.gradle @@ -1,11 +1,13 @@ plugins { id 'java' + id 'application' } group 'net.lwenstrom.jan' version '1.0-SNAPSHOT' sourceCompatibility = 11 +targetCompatibility = 11 repositories { mavenCentral() @@ -23,3 +25,17 @@ dependencies { compile group: 'org.javatuples', name: 'javatuples', version: '1.2' } + +// Include dependent libraries in archive. +mainClassName = "example.JumpingDino" + + +jar { + manifest { + attributes "Main-Class": "$mainClassName" + } + + from { + configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } + } +} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..87b738c Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 39329ec..44e7c4d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Wed Dec 11 23:10:59 CET 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip