Skip to content
Snippets Groups Projects
Commit c52bafae authored by Nikolaus Krismer's avatar Nikolaus Krismer
Browse files

OPENED - task 17: Update to JDK 8

preparations for JDK update
parent 020d21a8
No related branches found
No related tags found
No related merge requests found
......@@ -23,8 +23,10 @@ group = 'it.unibz.inf.isochrone'
version = '0.2.3-SNAPSHOT'
description = 'PhD project of Nikolaus Krismer'
sourceCompatibility=1.7
targetCompatibility=1.7
sourceCompatibility=JavaVersion.VERSION_1_7
targetCompatibility=JavaVersion.VERSION_1_7
//sourceCompatibility=JavaVersion.VERSION_1_8
//targetCompatibility=JavaVersion.VERSION_1_8
/*
* Version handling:
......@@ -157,7 +159,7 @@ dependencies {
testCompile 'org.testng:testng:6+'
}
tasks.withType(Compile) {
tasks.withType(JavaCompile) {
// adds support for compiler warnings generation
options.compilerArgs << '-Xlint:all,-processing'
}
......@@ -187,6 +189,29 @@ checkstyle {
}
eclipse {
classpath {
file {
// See: http://forums.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided
// Sets output folders for compiled classes and resources... otherwise test classes/resources would be deployed to wtp server
whenMerged { cp ->
cp.entries.findAll { it.path.startsWith("src/main/") }*.output = "bin"
cp.entries.findAll { it.path.startsWith("src/test/") }*.output = "bin-test"
// Sets JavaSE as jdk version used (instead of version directly)
cp.entries.findAll { it.path.contains('JRE_CONTAINER') }.each {
it.path += "/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-" + sourceCompatibility
}
}
// See: http://stackoverflow.com/questions/12836089/why-is-eclipse-not-attaching-3rd-party-libs-source-files-to-a-wtp-faceted-gradle
// Chnanges eclipse classpath entries; otherwise no sources for 3rd party jars are shown
withXml { xml ->
def node = xml.asNode()
node.remove( node.find { it.@path == 'org.eclipse.jst.j2ee.internal.web.container' } )
node.appendNode( 'classpathentry', [ kind: 'con', path: 'org.eclipse.jst.j2ee.internal.web.container', exported: 'true'])
}
}
}
project {
buildCommand 'net.sf.eclipsecs.core.CheckstyleBuilder'
......@@ -234,29 +259,12 @@ eclipse {
// when tomcat 8 becomes usable in eclipse this jst.web version should be set to 3.1
//facet name: 'jst.web', version: '3.1'
facet name: 'jst.web', version: '3.0'
facet name: 'jst.java', version: '1.7'
facet name: 'jst.java', version: sourceCompatibility
facet name: 'wst.jsdt.web', version: '1.0'
}
}
}
eclipse.classpath.file {
// See: http://stackoverflow.com/questions/12836089/why-is-eclipse-not-attaching-3rd-party-libs-source-files-to-a-wtp-faceted-gradle
// Chnanges eclipse classpath entries; otherwise no sources for 3rd party jars are shown
withXml { xml ->
def node = xml.asNode()
node.remove( node.find { it.@path == 'org.eclipse.jst.j2ee.internal.web.container' } )
node.appendNode( 'classpathentry', [ kind: 'con', path: 'org.eclipse.jst.j2ee.internal.web.container', exported: 'true'])
}
// See: http://forums.gradle.org/gradle/topics/eclipse_wtp_deploys_testcode_to_server_example_provided
// Sets output folders for compiled classes and resources... otherwise test classes/resources would be deployed to wtp server
whenMerged { cp ->
cp.entries.findAll { it.path.startsWith("src/main/") }*.output = "bin"
cp.entries.findAll { it.path.startsWith("src/test/") }*.output = "bin-test"
}
}
findbugs {
effort = "max"
ignoreFailures = true
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment