Example build.gradle for v8.3 - tooltwist/documentation GitHub Wiki
apply plugin: 'java'
apply plugin: 'eclipse'
group = 'com.tooltwist'
version = '1.0-SNAPSHOT'
sourceCompatibility = 1.7
repositories {
ivy {
url "file:/${localRepo}"
layout "maven"
}
mavenCentral()
}
//----------------------------------------------------------------------
// Gradle lacks the "provided" dependency so we'll have to add it.
// http://blog.codeaholics.org/2012/emulating-mavens-provided-scope-in-gradle/
configurations {
provided
}
sourceSets {
main.compileClasspath += configurations.provided
test.compileClasspath += configurations.provided
test.runtimeClasspath += configurations.provided
}
//eclipse.classpath.plusConfigurations += configurations.provided
//----------------------------------------------------------------------
dependencies {
/* Dependencies if you have ToolTwist source code installed.
compile project(':tooltwist')
compile project(':ttWbd')
compile project(':ttStd')
compile project(':xdata')
compile project(':filemap')
*/
/* ToolTwist Dependencies */
compile 'com.tooltwist:tooltwist:8.3-SNAPSHOT'
compile 'com.tooltwist:ttStd:8.3-SNAPSHOT'
compile 'com.tooltwist:ttWbd:8.3-SNAPSHOT'
// Some example dependencies. Don't use these unless your project needs them.
compile 'org.apache.httpcomponents:fluent-hc:4.2.5'
compile 'com.restfb:restfb:1.6.12'
compile 'org.scribe:scribe:1.3.2'
compile 'com.google.code.gson:gson:2.2.4'
// This jar contains stubs used only while compiling. At runtime the
// web server (e.g. Tomcat) provides the real implementation of the API.
provided 'javax:javaee-api:6.0'
// Used only during unit testing
testCompile group: 'junit', name: 'junit', version: '4.8.2'
}
//----------------------------------------------------------------------
// Copy extra resources into the jar file
//
processResources {
}
processResources.dependsOn("copyWebContent")
processResources.dependsOn("copyConfig")
processResources.dependsOn("copyWidgets")
task copyWebContent(type: Copy) {
from('WebContent')
into 'build/classes/main/META-INF/resources'
}
task copyConfig(type: Copy) {
from('config')
into 'build/classes/main/META-INF/tooltwist/config'
}
task copyWidgets(type: Copy) {
from('widgets')
into 'build/classes/main/META-INF/tooltwist/widgets'
}
//----------------------------------------------------------------------
// Upload the jar file to the repo
//
uploadArchives {
repositories {
ivy {
url "file:/${localRepo}"
layout "maven"
}
}
}