blob: 156a9492fdf106ace657002231eca55713a3c120 [file] [log] [blame]
/*
* Copyright (c) 2011 Yahoo! Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific
* language governing permissions and limitations under the
* License. See accompanying LICENSE file.
*/
/* Include handy Gradle plugins. */
apply plugin: 'eclipse'
apply plugin: 'java'
apply plugin: "application"
/* Main application to run ... */
mainClassName = "io.s4.Main"
/* Set a version number for your app. */
version = new Version(major: 0, minor: 1, releaseType: 'SNAPSHOT')
group = 'io.s4'
/* All project libraries must be defined here. */
libraries = [
json: 'org.json:json:20090211',
gson: 'com.google.code.gson:gson:1.6',
guice: 'com.google.inject:guice:3.0',
guice_grapher: 'com.google.inject:guice-grapher:3.0',
log4j: 'log4j:log4j:1.2.15',
flexjson: 'net.sf.flexjson:flexjson:2.1',
bcel: 'org.apache.bcel:bcel:5.2',
jakarta_regexp: 'jakarta-regexp:jakarta-regexp:1.4',
kryo: 'com.esotericsoftware:kryo:1.01',
reflectasm: 'com.esotericsoftware:reflectasm:0.8',
minlog: 'com.esotericsoftware:minlog:1.2',
asm: 'asm:asm:3.2',
commons_logging: 'commons-logging:commons-logging:1.1.1',
commons_io: 'commons-io:commons-io:2.0.1',
commons_config: 'commons-configuration:commons-configuration:1.6',
commons_codec: 'commons-codec:commons-codec:1.4',
commons_httpclient: 'commons-httpclient:commons-httpclient:3.1',
junit: 'junit:junit:4.4'
]
/* Set Java version. */
sourceCompatibility = 1.6
targetCompatibility = 1.6
/* Search these repos to find artifacts. Gradle will download and cache. */
repositories {
mavenLocal()
mavenCentral()
mavenRepo name: "gson", urls: "http://google-gson.googlecode.com/svn/mavenrepo"
/* Add lib dir as a repo. Some jar files that are not available
in a public repo are distributed in the lib dir. */
flatDir name: 'libDir', dirs: "$rootDir/lib"
}
/* Dependencies. */
dependencies {
compile( libraries.guice )
compile( libraries.json)
compile( libraries.gson)
compile( libraries.log4j )
compile( libraries.commons_logging )
compile( libraries.commons_io )
compile( libraries.commons_config )
compile( libraries.commons_codec )
compile( libraries.commons_httpclient )
testCompile( libraries.junit )
}
/* Customize your jar files. */
manifest.mainAttributes(
provider: 'gradle',
'Implementation-Url': 'http://s4.io',
'Implementation-Version': version,
'Implementation-Vendor': 'The S4 Project',
'Implementation-Vendor-Id': 'io.s4'
)
/* Bug workaround. */
eclipseClasspath {
downloadSources = false; // required for eclipseClasspath to work
}
/* Generates the gradlew scripts.
http://www.gradle.org/1.0-milestone-3/docs/userguide/gradle_wrapper.html */
task wrapper(type: Wrapper) {
gradleVersion = '1.0-milestone-3'
}
class Version {
int major
int minor
int bugfix
String releaseType
String toString() {
"$major.$minor-$releaseType${bugfix ?: ''}"
}
}