blob: cf0914ef1367d9516efe04d9084238f1dab58406 [file] [log] [blame]
Eric Andersonb938ba52015-02-28 09:59:25 -08001import org.apache.tools.ant.taskdefs.condition.Os
2
nathanmittler164b7342014-12-15 09:58:05 -08003subprojects {
4 apply plugin: "java"
5 apply plugin: "maven"
nmittler52f42202015-01-21 14:30:14 -08006 apply plugin: "idea"
nathanmittler164b7342014-12-15 09:58:05 -08007
nmittlerf8314582015-01-27 10:25:39 -08008 group = "io.grpc"
nathanmittler164b7342014-12-15 09:58:05 -08009 version = "0.1.0-SNAPSHOT"
10
11 sourceCompatibility = 1.6
12 targetCompatibility = 1.6
13
14 repositories {
15 mavenCentral()
16 mavenLocal()
17 }
18
nmittler02c953e2015-01-26 14:03:11 -080019 compileJava {
Eric Andersone26608f2015-02-13 16:39:54 -080020 options.compilerArgs << "-Xlint:unchecked"
Eric Anderson61179ab2015-02-24 22:59:32 +000021 options.encoding = "UTF-8"
nmittler02c953e2015-01-26 14:03:11 -080022 }
23
Jakob Buchgraber7ddcdfd2015-02-13 16:21:53 -080024 ext {
25 libraries = [
Jakob Buchgraber7ddcdfd2015-02-13 16:21:53 -080026 guava: 'com.google.guava:guava:18.0',
Jakob Buchgraber7ddcdfd2015-02-13 16:21:53 -080027 // used to collect benchmark results
28 hdrhistogram: 'org.hdrhistogram:HdrHistogram:2.1.4',
Jeff Pinnerb1cc7cc2015-02-25 10:17:23 -080029 hpack: 'com.twitter:hpack:0.10.1',
nmittlerb897a892015-02-23 12:03:59 -080030 javaee_api: 'javax:javaee-api:7.0',
31 jsonp: 'org.glassfish:javax.json:1.0.4',
32 jsr305: 'com.google.code.findbugs:jsr305:3.0.0',
33 oauth_client: 'com.google.oauth-client:google-oauth-client:1.18.0-rc',
34 okhttp: 'com.squareup.okhttp:okhttp:2.2.0',
Eric Andersona6f5fff2015-02-26 07:53:17 -080035 protobuf: 'com.google.protobuf:protobuf-java:3.0.0-alpha-2',
36 protobuf_nano: 'com.google.protobuf.nano:protobuf-javanano:3.0.0-alpha-2',
nmittlerb897a892015-02-23 12:03:59 -080037 protobuf_plugin: 'ws.antonov.gradle.plugins:gradle-plugin-protobuf:0.9.1',
nathanmittler164b7342014-12-15 09:58:05 -080038
Jakob Buchgraber7ddcdfd2015-02-13 16:21:53 -080039 // TODO: Unreleased dependencies.
40 // These must already be installed in the local maven repository.
41 netty: 'io.netty:netty-codec-http2:5.0.0.Alpha2-SNAPSHOT',
nathanmittler164b7342014-12-15 09:58:05 -080042
Jakob Buchgraber7ddcdfd2015-02-13 16:21:53 -080043 // Test dependencies.
44 junit: 'junit:junit:4.11',
45 mockito: 'org.mockito:mockito-core:1.10.8'
46 ]
47
48 // Determine the correct version of Jetty ALPN boot to use based
49 // on the Java version.
50 def alpnboot_version = '8.1.2.v20141202'
51 if (JavaVersion.current().ordinal() < JavaVersion.VERSION_1_8.ordinal()) {
52 alpnboot_version = '7.1.2.v20141202'
53 }
54
55 alpnboot_package_name = 'org.mortbay.jetty.alpn:alpn-boot:' + alpnboot_version
Eric Andersonb938ba52015-02-28 09:59:25 -080056
57 def exeSuffix = Os.isFamily(Os.FAMILY_WINDOWS) ? ".exe" : ""
58 // The split is to workaround everything after the colon in C:\ being
59 // removed due to a bug in the protobuf plugin.
60 // https://github.com/aantono/gradle-plugin-protobuf/issues/23
61 def splitRootDir = rootDir
62 if (Os.isFamily(Os.FAMILY_WINDOWS)) {
63 splitRootDir = splitRootDir.getPath().split(":", 2)[1]
64 }
65 javaPluginPath = "$splitRootDir/compiler/build/binaries/java_pluginExecutable/java_plugin$exeSuffix"
Jakob Buchgraber7ddcdfd2015-02-13 16:21:53 -080066 }
nathanmittler164b7342014-12-15 09:58:05 -080067
68 dependencies {
69 testCompile libraries.junit,
70 libraries.mockito
71 }
72}