apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'eclipse'
apply plugin: 'java-library-distribution'

jar {
	manifest {
		attributes 'Implementation-Title': 'PDF-AS-4 Web Statistic Library', 'JARMANIFEST': 'PDF-AS-LIB'
	}
}

repositories {
	mavenLocal()
	mavenCentral()
}

configurations { providedCompile }

sourceSets.main.compileClasspath += configurations.providedCompile
sourceSets.test.compileClasspath += configurations.providedCompile
sourceSets.test.runtimeClasspath += configurations.providedCompile

dependencies {
	compile group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion
	compile 'org.apache.commons:commons-lang3:3.3.2'
	testCompile group: 'junit', name: 'junit', version: '4.+'
}

task releases(type: Copy) {
	from jar.outputs
	from distZip.outputs
	from distTar.outputs
	into rootDir.toString() + "/releases/" + version
}

releases.dependsOn jar
releases.dependsOn sourcesJar
releases.dependsOn distZip
releases.dependsOn distTar