Newer
Older
jrex / build.gradle
apply plugin: 'java'

repositories {
	jcenter()
}


sourceSets {
	main {
		java {
			srcDir 'src'
		}
	}
}

dependencies {
	// https://mvnrepository.com/artifact/com.google.guava/guava
	compile group: 'com.google.guava', name: 'guava', version: '23.0'

	// https://mvnrepository.com/artifact/com.google.code.gson/gson
	compile group: 'com.google.code.gson', name: 'gson', version: '2.8.2'
}

task download(type: Copy) {
	from sourceSets.main.runtimeClasspath
	into 'libs'
}

jar {
	manifest {
		attributes (
		'Main-Class': 'jrex.JRexFrame'
		)
	}
}

task dist(type: Jar) {
	manifest.from jar.manifest
	baseName = 'jrex'

	from {
		configurations.runtime.collect {
			it.isDirectory() ? it : zipTree(it)
		}
	}

	destinationDir = file('dist')

	with jar
}