apply plugin: 'java' apply plugin: 'application' java { sourceCompatibility = JavaVersion.toVersion("1.17") targetCompatibility = JavaVersion.toVersion("1.17") } mainClassName = 'org.alexdev.http.HavanaWeb' repositories { flatDir { dirs 'libs' } maven { url 'https://jitpack.io' } mavenCentral() } dependencies { // https://mvnrepository.com/artifact/io.pebbletemplates/pebble implementation group: 'io.pebbletemplates', name: 'pebble', version: '3.1.5' // https://mvnrepository.com/artifact/com.zaxxer/HikariCP implementation group: 'com.zaxxer', name: 'HikariCP', version: '3.4.1' // https://mvnrepository.com/artifact/org.mariadb.jdbc/mariadb-java-client implementation group: 'org.mariadb.jdbc', name: 'mariadb-java-client', version: '2.2.5' // https://mvnrepository.com/artifact/org.apache.commons/commons-configuration2 implementation group: 'org.apache.commons', name: 'commons-configuration2', version: '2.2' // https://mvnrepository.com/artifact/org.apache.commons/commons-text implementation group: 'org.apache.commons', name: 'commons-text', version: '1.5' // https://mvnrepository.com/artifact/commons-io/commons-io implementation group: 'commons-io', name: 'commons-io', version: '2.5' // https://mvnrepository.com/artifact/commons-validator/commons-validator implementation group: 'commons-validator', name: 'commons-validator', version: '1.6' // https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient implementation group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5' // https://github.com/Quackster/duckHTTPD/ implementation name: 'duckHTTPD-all' // https://github.com/Quackster/Kepler/Kepler-Server implementation project(':Havana-Server') // https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 implementation group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.25' // https://mvnrepository.com/artifact/com.google.code.gson/gson implementation group: 'com.google.code.gson', name: 'gson', version: '2.8.0' // https://mvnrepository.com/artifact/javax.mail/mail implementation group: 'javax.mail', name: 'mail', version: '1.4.7' } task fatJar(type: Jar) { zip64 true duplicatesStrategy 'exclude' manifest { attributes 'Main-Class': mainClassName } baseName = project.name + '-all' from { configurations.runtimeClasspath.collect { it.isDirectory() ? it : zipTree(it) } } with jar } // Create jar with no libraries inside of it, used when creating with "gradle distZip" and // libraries are then to be stored in the folder next to it called 'dependency-jars' // https://vocon-it.com/2016/11/15/how-to-build-a-lean-jar-file-with-gradle/ /*jar { manifest { attributes ( 'Main-Class': mainClassName, "Class-Path": '. dependency-jars/' + configurations.compile.collect { it.getName() }.join(' dependency-jars/') ) } }*/