apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'war'

sourceCompatibility = 11
targetCompatibility = 11

tasks.withType(JavaCompile) {
	options.encoding = 'UTF-8'
}

repositories {
	jcenter()
	mavenCentral()
	maven {
		url 'http://jaspersoft.jfrog.io/jaspersoft/third-party-ce-artifacts/'
	}
}

war {
	archiveName = 'tbms.war'
	classpath = classpath - sourceSets.main.output
	from (jar) {
		into 'WEB-INF/lib'
	}
}

dependencies {

	// for JDK 11
	compile 'javax.xml.bind:jaxb-api:2.3.1'
	compile 'javax.annotation:javax.annotation-api:1.3.2'
	compile 'com.sun.activation:javax.activation:1.2.0'

	compile 'org.springframework:spring-context:4.3.14.RELEASE'
	compile 'org.springframework:spring-context-support:4.3.14.RELEASE'
	compile 'org.springframework:spring-orm:4.3.14.RELEASE'
	compile 'org.springframework:spring-webmvc:4.3.14.RELEASE'

	compile 'org.springframework.security:spring-security-config:4.2.3.RELEASE'
	compile 'org.springframework.security:spring-security-web:4.2.3.RELEASE'

	compile 'org.apache.commons:commons-lang3:3.5'
	compile 'commons-fileupload:commons-fileupload:1.3.2'
	compile 'org.apache.poi:poi:3.17'
	compile 'org.apache.poi:poi-ooxml:3.17'

	compile 'org.freemarker:freemarker:2.3.23'

	compile 'org.hibernate:hibernate-core:5.2.12.Final'
	compile 'org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.2.Final'

	compile 'com.fasterxml.jackson.core:jackson-core:2.8.8'
	compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.8'
	compile 'com.fasterxml.jackson.core:jackson-databind:2.8.8.1'

	compile 'org.imgscalr:imgscalr-lib:4.2'

	compile(group: 'net.sf.jasperreports', name: 'jasperreports', version:'6.5.1') {
		exclude(module: 'bcmail-jdk14')
		exclude(module: 'bcprov-jdk14')
		exclude(module: 'bctsp-jdk14')
		exclude(module: 'castor-xml')
		exclude(module: 'jackson-core')
		exclude(module: 'jackson-annotations')
		exclude(module: 'jackson-databind')
		exclude(module: 'lucene-core')
		exclude(module: 'lucene-analyzers-common')
		exclude(module: 'lucene-queryparser')
		exclude(module: 'olap4j')
	}

	//providedCompile 'org.slf4j:slf4j-api:1.7.25'
	//providedCompile 'org.slf4j:slf4j-log4j12:1.7.25'

	providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
	providedCompile 'mysql:mysql-connector-java:8.0.15'

	//testCompile 'junit:junit:4.12'

	compile 'com.google.zxing:javase:3.2.1'

	//mail
	compile 'javax.mail:mail:1.4.7'
	compile group: 'org.liquibase', name: 'liquibase-core', version: '3.5.3'

	fileTree(dir: 'lib', include: '*.jar')

}
