/* * This build file was auto generated by running the Gradle 'init' task * by 'jessey' at '04.07.16 13:33' with Gradle 2.2.1 * * This generated file contains a commented-out sample Java project to get you started. * For more details take a look at the Java Quickstart chapter in the Gradle * user guide available at http://gradle.org/docs/2.2.1/userguide/tutorial_java_projects.html */ buildscript { repositories { jcenter() } dependencies { classpath 'gradle.plugin.edu.sc.seis.gradle:launch4j:2.3.0' } } plugins { id 'edu.sc.seis.launch4j' version '2.3.0' } // Apply the java plugin to add support for Java apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'application' apply plugin: 'edu.sc.seis.launch4j' version = '2.1' mainClassName = 'ui.view.Main' def projectName = 'holeg' def mainClass = 'ui.view.Main' // the fatJar includes all dependencies (all used libraries) task fatJar(type: Jar) { manifest { attributes 'Implmenetation-Title': projectName, 'Implementation-Version': version, 'Main-Class': mainClass } baseName = projectName + '-all' from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } } with jar } jar { manifest { attributes 'Main-Class': mainClass } baseName = projectName } sourceSets { test { java { srcDirs = ["src/tests"] } resources { srcDir 'res' } } main { java { srcDir 'src' } resources { srcDir 'res' } } } repositories { mavenCentral() jcenter() } dependencies { // download jars on the fly // https://mvnrepository.com/artifact/org.apache.commons/commons-compress compile group: 'org.apache.commons', name: 'commons-compress', version: '1.13' // https://mvnrepository.com/artifact/com.google.code.gson/gson compile group: 'com.google.code.gson', name: 'gson', version: '2.8.2' // https://mvnrepository.com/artifact/junit/junit testCompile group: 'junit', name: 'junit', version: '4.12' compile group: 'junit', name: 'junit', version: '4.12' // use /jar Folder (old system) compile fileTree(dir: 'jars/commons-compress-1.13', include: ['*.jar']) compile fileTree(dir: 'jars', include: ['*.jar']) testCompile group: 'junit', name: 'junit', version: '4.+' } // execute by command-line with 'gradlew clean jar createAllExecutables -Pl4j-debug --stacktrace' // then add jre8-distribution to folder 'jre8' in same directory // // the directory-structure afterwards should look like // |- [projectName].exe // |> lib // |- commons-compress-1.13.jar // ... // |> jre8 // |> bin // |> lib // ... launch4j { mainClassName='ui.view.Main' // relative path at which the bundled JRE lies bundledJrePath = 'jre8' // for 64b: comment in, for 32b: comment out bundledJre64Bit = true // names of output file productName = projectName outfile = projectName + '.exe' } /* // In this section you declare where to find the dependencies of your project repositories { // Use 'jcenter' for resolving your dependencies. // You can declare any Maven/Ivy/file repository here. jcenter() } // In this section you declare the dependencies for your production and test code dependencies { // The production code uses the SLF4J logging API at compile time compile 'org.slf4j:slf4j-api:1.7.7' // Declare the dependency for your favourite test framework you want to use in your tests. // TestNG is also supported by the Gradle Test task. Just change the // testCompile dependency to testCompile 'org.testng:testng:6.8.1' and add // 'test.useTestNG()' to your build script. testCompile "junit:junit:4.11" } */