| /* |
| * 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. |
| */ |
| |
| /* |
| * To run type: "gradlew run" |
| */ |
| |
| /* Include handy Gradle plugins. */ |
| apply plugin: 'eclipse' |
| apply plugin: 'java' |
| apply plugin: "application" |
| apply plugin: "maven" |
| |
| /* Main application to run ... */ |
| //mainClassName = "io.s4.example.counter.MyApp" |
| mainClassName = "io.s4.example.model.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', |
| guava: 'com.google.guava:guava:r09', |
| gson: 'com.google.code.gson:gson:1.6', |
| guice: 'com.google.inject:guice:3.0', |
| guice_assist: 'com.google.inject.extensions:guice-assistedinject:3.0', |
| guice_grapher: 'com.google.inject:guice-grapher:3.0', |
| flexjson: 'net.sf.flexjson:flexjson:2.1', |
| bcel: 'org.apache.bcel:bcel:5.2', |
| jakarta_regexp: 'jakarta-regexp:jakarta-regexp:1.4', |
| kryo: 'com.googlecode:kryo:1.04', |
| netty: 'org.jboss.netty:netty:3.2.5.Final', |
| reflectasm: 'com.esotericsoftware:reflectasm:0.8', |
| minlog: 'com.esotericsoftware:minlog:1.2', |
| asm: 'asm:asm:3.2', |
| 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', |
| commons_coll: 'net.sourceforge.collections:collections-generic:4.01', // Use this lib until the commons collection with Generics is released. |
| slf4j: 'org.slf4j:slf4j-api:1.6.1', |
| logback_core: 'ch.qos.logback:logback-core:0.9.29', |
| logback_classic: 'ch.qos.logback:logback-classic:0.9.29', |
| ejml: 'com.googlecode.efficient-java-matrix-library:ejml:0.17', |
| jcip: 'net.jcip:jcip-annotations:1.0', |
| 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.guava ) |
| compile( libraries.guice ) |
| compile( libraries.guice_assist ) |
| compile( libraries.json) |
| compile( libraries.kryo) |
| compile( libraries.netty) |
| compile( libraries.gson) |
| compile( libraries.slf4j ) |
| compile( libraries.logback_core ) |
| compile( libraries.logback_classic ) |
| compile( libraries.commons_io ) |
| compile( libraries.commons_config ) |
| compile( libraries.commons_codec ) |
| compile( libraries.commons_httpclient ) |
| compile( libraries.commons_coll ) |
| compile( libraries.ejml ) |
| compile( libraries.jcip ) |
| 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' |
| ) |
| |
| //eclipseClasspath { |
| // eclipse.classpath.downloadSources = false; // is this still needed? |
| //} |
| |
| /* 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 ?: ''}" |
| } |
| } |