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

repositories {
	mavenCentral()
	
	// since the Jasper dickheads keep creating custom builds of other projects
	// we need to add a repository for their "special" versions
	maven {
		url 'http://jaspersoft.artifactoryonline.com/jaspersoft/jaspersoft-repo/'
	}
	
}


dependencies {
	// https://mvnrepository.com/artifact/com.h2database/h2
	compile group: 'com.h2database', name: 'h2', version: '1.4.196'
	
	// https://mvnrepository.com/artifact/net.sourceforge.dynamicreports/dynamicreports-core
	compile group: 'net.sourceforge.dynamicreports', name: 'dynamicreports-core', version: '5.0.0'


	// https://mvnrepository.com/artifact/org.simplejavamail/simple-java-mail
	compile group: 'org.simplejavamail', name: 'simple-java-mail', version: '4.2.3'
}



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

	}
}

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

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

// make a fat JAR
task dist(type: Jar) {
	manifest.from jar.manifest
	baseName = 'marking'

	from {
		configurations.runtime.collect {
			it.isDirectory() ? it : zipTree(it)
		}
	}
	
	destinationDir = file('dist')
	
	with jar
}