Kun Zhang | 4bc2d6d | 2015-04-17 10:49:11 -0700 | [diff] [blame] | 1 | buildscript { |
| 2 | repositories { |
| 3 | mavenCentral() |
| 4 | mavenLocal() |
| 5 | } |
| 6 | dependencies { |
nmittler | c4bcf14 | 2015-09-16 15:15:10 -0700 | [diff] [blame] | 7 | classpath 'com.google.gradle:osdetector-gradle-plugin:1.4.0' |
Kun Zhang | 4bc2d6d | 2015-04-17 10:49:11 -0700 | [diff] [blame] | 8 | } |
| 9 | } |
Eric Anderson | b938ba5 | 2015-02-28 09:59:25 -0800 | [diff] [blame] | 10 | |
Louis Ryan | 540b4d3 | 2015-09-04 13:26:24 -0700 | [diff] [blame] | 11 | subprojects { |
Eric Anderson | c3e8dae | 2015-01-30 14:58:07 -0800 | [diff] [blame] | 12 | apply plugin: "checkstyle" |
nathanmittler | 164b734 | 2014-12-15 09:58:05 -0800 | [diff] [blame] | 13 | apply plugin: "java" |
| 14 | apply plugin: "maven" |
nmittler | 52f4220 | 2015-01-21 14:30:14 -0800 | [diff] [blame] | 15 | apply plugin: "idea" |
Eric Anderson | 192144e | 2015-03-02 13:31:14 -0800 | [diff] [blame] | 16 | apply plugin: "signing" |
Eric Anderson | 041cdb1 | 2015-05-05 12:29:26 -0700 | [diff] [blame] | 17 | apply plugin: "jacoco" |
nathanmittler | 164b734 | 2014-12-15 09:58:05 -0800 | [diff] [blame] | 18 | |
nmittler | c4bcf14 | 2015-09-16 15:15:10 -0700 | [diff] [blame] | 19 | apply plugin: "com.google.osdetector" |
nmittler | c4bcf14 | 2015-09-16 15:15:10 -0700 | [diff] [blame] | 20 | |
nmittler | f831458 | 2015-01-27 10:25:39 -0800 | [diff] [blame] | 21 | group = "io.grpc" |
Eric Anderson | e9643bb | 2016-07-11 16:57:58 -0700 | [diff] [blame] | 22 | version = "1.1.0-SNAPSHOT" // CURRENT_GRPC_VERSION |
nathanmittler | 164b734 | 2014-12-15 09:58:05 -0800 | [diff] [blame] | 23 | |
| 24 | sourceCompatibility = 1.6 |
| 25 | targetCompatibility = 1.6 |
| 26 | |
| 27 | repositories { |
| 28 | mavenCentral() |
| 29 | mavenLocal() |
| 30 | } |
| 31 | |
Eric Anderson | 76d0955 | 2015-03-12 15:25:11 -0700 | [diff] [blame] | 32 | [compileJava, compileTestJava].each() { |
Eric Anderson | 641cb35 | 2016-05-24 14:29:52 -0700 | [diff] [blame] | 33 | it.options.compilerArgs += ["-Xlint:all", "-Xlint:-options"] |
Eric Anderson | 76d0955 | 2015-03-12 15:25:11 -0700 | [diff] [blame] | 34 | it.options.encoding = "UTF-8" |
Eric Anderson | 3c03eb7 | 2016-07-10 11:40:12 -0700 | [diff] [blame] | 35 | if (rootProject.hasProperty('failOnWarnings') && rootProject.failOnWarnings.toBoolean()) { |
| 36 | it.options.compilerArgs += ["-Werror"] |
| 37 | } |
nmittler | 02c953e | 2015-01-26 14:03:11 -0800 | [diff] [blame] | 38 | } |
| 39 | |
Eric Anderson | 641cb35 | 2016-05-24 14:29:52 -0700 | [diff] [blame] | 40 | compileTestJava { |
| 41 | // serialVersionUID is basically guaranteed to be useless in our tests |
| 42 | options.compilerArgs += ["-Xlint:-serial"] |
| 43 | } |
| 44 | |
nmittler | 8c1d38a | 2015-06-01 08:31:00 -0700 | [diff] [blame] | 45 | jar.manifest { |
| 46 | attributes('Implementation-Title': name, |
| 47 | 'Implementation-Version': version, |
| 48 | 'Built-By': System.getProperty('user.name'), |
| 49 | 'Built-JDK': System.getProperty('java.version'), |
| 50 | 'Source-Compatibility': sourceCompatibility, |
| 51 | 'Target-Compatibility': targetCompatibility) |
| 52 | } |
| 53 | |
Eric Anderson | 10fb206 | 2015-05-05 10:28:38 -0700 | [diff] [blame] | 54 | javadoc.options { |
| 55 | encoding = 'UTF-8' |
| 56 | links 'https://docs.oracle.com/javase/8/docs/api/' |
| 57 | } |
Eric Anderson | 14444a9 | 2015-03-11 16:44:38 -0700 | [diff] [blame] | 58 | |
Jakob Buchgraber | 7ddcdfd | 2015-02-13 16:21:53 -0800 | [diff] [blame] | 59 | ext { |
Kun Zhang | 6b1e7d6 | 2015-05-07 15:20:44 -0700 | [diff] [blame] | 60 | def exeSuffix = osdetector.os == 'windows' ? ".exe" : "" |
| 61 | protocPluginBaseName = 'protoc-gen-grpc-java' |
Eric Anderson | 46ce409 | 2016-01-26 12:13:06 -0800 | [diff] [blame] | 62 | javaPluginPath = "$rootDir/compiler/build/exe/java_plugin/$protocPluginBaseName$exeSuffix" |
Kun Zhang | 6b1e7d6 | 2015-05-07 15:20:44 -0700 | [diff] [blame] | 63 | |
Carl Mastrangelo | 2825361 | 2016-05-16 10:23:53 -0700 | [diff] [blame] | 64 | guavaVersion = '19.0' |
Eric Anderson | 5e1e883 | 2016-07-25 12:42:59 -0700 | [diff] [blame] | 65 | protobufVersion = '3.0.0' |
Kun Zhang | e2ed2e8 | 2016-01-27 08:26:19 -0800 | [diff] [blame] | 66 | protobufNanoVersion = '3.0.0-alpha-5' |
Kun Zhang | 6b1e7d6 | 2015-05-07 15:20:44 -0700 | [diff] [blame] | 67 | |
Kun Zhang | 111f6dd | 2015-05-05 16:11:27 -0700 | [diff] [blame] | 68 | configureProtoCompilation = { |
Kun Zhang | 35f77ee | 2015-06-22 16:29:30 -0700 | [diff] [blame] | 69 | String generatedSourcePath = "${projectDir}/src/generated" |
Kun Zhang | 111f6dd | 2015-05-05 16:11:27 -0700 | [diff] [blame] | 70 | if (rootProject.childProjects.containsKey('grpc-compiler')) { |
| 71 | // Only when the codegen is built along with the project, will we be able to recompile |
| 72 | // the proto files. |
| 73 | project.apply plugin: 'com.google.protobuf' |
Kun Zhang | 35f77ee | 2015-06-22 16:29:30 -0700 | [diff] [blame] | 74 | project.protobuf { |
| 75 | protoc { |
| 76 | if (project.hasProperty('protoc')) { |
| 77 | path = project.protoc |
| 78 | } else { |
| 79 | artifact = "com.google.protobuf:protoc:${protobufVersion}" |
| 80 | } |
| 81 | } |
| 82 | plugins { |
| 83 | grpc { |
| 84 | path = javaPluginPath |
| 85 | } |
| 86 | } |
| 87 | generateProtoTasks { |
| 88 | all().each { task -> |
| 89 | task.dependsOn ':grpc-compiler:java_pluginExecutable' |
| 90 | // Delete the generated sources first, so that we can be alerted if they are not re-compiled. |
Eric Anderson | e9b4d15 | 2016-04-19 11:54:04 -0700 | [diff] [blame] | 91 | task.dependsOn 'deleteGeneratedSource' + task.sourceSet.name |
Kun Zhang | 35f77ee | 2015-06-22 16:29:30 -0700 | [diff] [blame] | 92 | // Recompile protos when the codegen has been changed |
| 93 | task.inputs.file javaPluginPath |
| 94 | // Recompile protos when build.gradle has been changed, because |
| 95 | // it's possible the version of protoc has been changed. |
| 96 | task.inputs.file "${rootProject.projectDir}/build.gradle" |
| 97 | task.plugins { |
ZHANG Dapeng | e109125 | 2016-07-21 16:35:18 -0700 | [diff] [blame] | 98 | grpc { |
| 99 | // To generate deprecated interfaces and static bindService method, |
| 100 | // turn the enable_deprecated option to true below: |
| 101 | option 'enable_deprecated=false' |
| 102 | } |
Kun Zhang | 2cdc5e3 | 2015-05-11 16:58:28 -0700 | [diff] [blame] | 103 | } |
| 104 | } |
| 105 | } |
Kun Zhang | 35f77ee | 2015-06-22 16:29:30 -0700 | [diff] [blame] | 106 | generatedFilesBaseDir = generatedSourcePath |
| 107 | } |
| 108 | |
Eric Anderson | e9b4d15 | 2016-04-19 11:54:04 -0700 | [diff] [blame] | 109 | sourceSets.each { sourceSet -> |
| 110 | task "deleteGeneratedSource${sourceSet.name}" << { |
| 111 | project.delete project.fileTree(dir: generatedSourcePath + '/' + sourceSet.name) |
| 112 | } |
Kun Zhang | 2cdc5e3 | 2015-05-11 16:58:28 -0700 | [diff] [blame] | 113 | } |
Kun Zhang | 111f6dd | 2015-05-05 16:11:27 -0700 | [diff] [blame] | 114 | } else { |
| 115 | // Otherwise, we just use the checked-in generated code. |
| 116 | project.sourceSets { |
| 117 | main { |
| 118 | java { |
Kun Zhang | 35f77ee | 2015-06-22 16:29:30 -0700 | [diff] [blame] | 119 | srcDir "${generatedSourcePath}/main/java" |
Eric Anderson | cea8e8e | 2015-10-27 19:53:18 -0700 | [diff] [blame] | 120 | srcDir "${generatedSourcePath}/main/javanano" |
Kun Zhang | 35f77ee | 2015-06-22 16:29:30 -0700 | [diff] [blame] | 121 | srcDir "${generatedSourcePath}/main/grpc" |
Kun Zhang | 287a27a | 2015-05-07 17:32:31 -0700 | [diff] [blame] | 122 | } |
Kun Zhang | 111f6dd | 2015-05-05 16:11:27 -0700 | [diff] [blame] | 123 | } |
Eric Anderson | cea8e8e | 2015-10-27 19:53:18 -0700 | [diff] [blame] | 124 | test { |
| 125 | java { |
| 126 | srcDir "${generatedSourcePath}/test/java" |
| 127 | srcDir "${generatedSourcePath}/test/javanano" |
| 128 | srcDir "${generatedSourcePath}/test/grpc" |
| 129 | } |
| 130 | } |
Kun Zhang | 111f6dd | 2015-05-05 16:11:27 -0700 | [diff] [blame] | 131 | } |
| 132 | } |
Eric Anderson | dbef1af | 2016-05-23 12:05:41 -0700 | [diff] [blame] | 133 | |
| 134 | compileJava { |
| 135 | // Protobuf-generated code produces some warnings. |
Eric Anderson | 5e1e883 | 2016-07-25 12:42:59 -0700 | [diff] [blame] | 136 | options.compilerArgs += ["-Xlint:-cast"] |
Eric Anderson | dbef1af | 2016-05-23 12:05:41 -0700 | [diff] [blame] | 137 | } |
Kun Zhang | 111f6dd | 2015-05-05 16:11:27 -0700 | [diff] [blame] | 138 | } |
| 139 | |
Eric Anderson | 65d73c0 | 2015-05-21 11:54:04 -0700 | [diff] [blame] | 140 | def epoll_suffix = ""; |
| 141 | if (osdetector.classifier in ["linux-x86_64"]) { |
| 142 | // The native code is only pre-compiled on certain platforms. |
| 143 | epoll_suffix = ":" + osdetector.classifier |
| 144 | } |
Jakob Buchgraber | 7ddcdfd | 2015-02-13 16:21:53 -0800 | [diff] [blame] | 145 | libraries = [ |
Carl Mastrangelo | 2825361 | 2016-05-16 10:23:53 -0700 | [diff] [blame] | 146 | guava: "com.google.guava:guava:${guavaVersion}", |
Jeff Pinner | b1cc7cc | 2015-02-25 10:17:23 -0800 | [diff] [blame] | 147 | hpack: 'com.twitter:hpack:0.10.1', |
nmittler | b897a89 | 2015-02-23 12:03:59 -0800 | [diff] [blame] | 148 | jsr305: 'com.google.code.findbugs:jsr305:3.0.0', |
Kun Zhang | def237d | 2016-06-14 13:51:24 -0700 | [diff] [blame] | 149 | oauth_client: 'com.google.auth:google-auth-library-oauth2-http:0.4.0', |
| 150 | google_auth_credentials: 'com.google.auth:google-auth-library-credentials:0.4.0', |
Xudong Ma | 6d296e8 | 2015-09-21 10:39:00 -0700 | [diff] [blame] | 151 | okhttp: 'com.squareup.okhttp:okhttp:2.5.0', |
Xudong Ma | b121c46 | 2015-09-21 12:54:06 -0700 | [diff] [blame] | 152 | okio: 'com.squareup.okio:okio:1.6.0', |
Kun Zhang | c5b94c7 | 2015-05-06 16:44:55 -0700 | [diff] [blame] | 153 | protobuf: "com.google.protobuf:protobuf-java:${protobufVersion}", |
Eric Anderson | a8700a7 | 2016-07-29 11:57:41 -0700 | [diff] [blame^] | 154 | // swap to ${protobufVersion} after versions align again |
| 155 | protobuf_lite: "com.google.protobuf:protobuf-lite:3.0.1", |
Kun Zhang | bd23a8d | 2015-08-28 18:47:06 -0700 | [diff] [blame] | 156 | protobuf_nano: "com.google.protobuf.nano:protobuf-javanano:${protobufNanoVersion}", |
Eric Anderson | 446f0cb | 2016-05-07 11:24:15 -0700 | [diff] [blame] | 157 | protobuf_plugin: 'com.google.protobuf:protobuf-gradle-plugin:0.7.7', |
Carl Mastrangelo | 8e1fba7 | 2016-03-02 09:30:35 -0800 | [diff] [blame] | 158 | protobuf_util: "com.google.protobuf:protobuf-java-util:${protobufVersion}", |
nathanmittler | 164b734 | 2014-12-15 09:58:05 -0800 | [diff] [blame] | 159 | |
Jakob Buchgraber | 21b4ce7 | 2016-08-01 21:16:45 +0200 | [diff] [blame] | 160 | netty: 'io.netty:netty-codec-http2:[4.1.4.Final]', |
| 161 | netty_epoll: 'io.netty:netty-transport-native-epoll:4.1.4.Final' + epoll_suffix, |
Jakob Buchgraber | 0ad5948 | 2016-07-18 19:21:26 +0200 | [diff] [blame] | 162 | netty_tcnative: 'io.netty:netty-tcnative-boringssl-static:1.1.33.Fork19', |
nathanmittler | 164b734 | 2014-12-15 09:58:05 -0800 | [diff] [blame] | 163 | |
Jakob Buchgraber | 7ddcdfd | 2015-02-13 16:21:53 -0800 | [diff] [blame] | 164 | // Test dependencies. |
| 165 | junit: 'junit:junit:4.11', |
Carl Mastrangelo | b3bc7fc | 2016-04-01 15:18:23 -0700 | [diff] [blame] | 166 | mockito: 'org.mockito:mockito-core:1.9.5', |
Louis Ryan | a7049bc | 2016-03-23 13:18:04 -0700 | [diff] [blame] | 167 | truth: 'com.google.truth:truth:0.28', |
| 168 | |
| 169 | // Benchmark dependencies |
| 170 | hdrhistogram: 'org.hdrhistogram:HdrHistogram:2.1.8', |
| 171 | math: 'org.apache.commons:commons-math3:3.6', |
ZHANG Dapeng | aed886d | 2016-05-02 14:01:36 -0700 | [diff] [blame] | 172 | |
| 173 | // Jetty ALPN dependencies |
Eric Anderson | aa92d6c | 2016-05-19 11:41:03 -0700 | [diff] [blame] | 174 | jetty_alpn_agent: 'org.mortbay.jetty.alpn:jetty-alpn-agent:2.0.3' |
Jakob Buchgraber | 7ddcdfd | 2015-02-13 16:21:53 -0800 | [diff] [blame] | 175 | ] |
Jakob Buchgraber | 7ddcdfd | 2015-02-13 16:21:53 -0800 | [diff] [blame] | 176 | } |
nathanmittler | 164b734 | 2014-12-15 09:58:05 -0800 | [diff] [blame] | 177 | |
ZHANG Dapeng | aed886d | 2016-05-02 14:01:36 -0700 | [diff] [blame] | 178 | // Define a separate configuration for managing the dependency on Jetty ALPN agent. |
nmittler | 74cfe6c | 2015-05-22 12:25:10 -0700 | [diff] [blame] | 179 | configurations { |
ZHANG Dapeng | aed886d | 2016-05-02 14:01:36 -0700 | [diff] [blame] | 180 | alpnagent |
nmittler | 9466eb5 | 2015-09-04 15:13:46 -0700 | [diff] [blame] | 181 | tcnative |
nmittler | 74cfe6c | 2015-05-22 12:25:10 -0700 | [diff] [blame] | 182 | } |
| 183 | |
nathanmittler | 164b734 | 2014-12-15 09:58:05 -0800 | [diff] [blame] | 184 | dependencies { |
| 185 | testCompile libraries.junit, |
| 186 | libraries.mockito |
nmittler | 74cfe6c | 2015-05-22 12:25:10 -0700 | [diff] [blame] | 187 | |
ZHANG Dapeng | aed886d | 2016-05-02 14:01:36 -0700 | [diff] [blame] | 188 | // Configuration for modules that use Jetty ALPN agent |
| 189 | alpnagent libraries.jetty_alpn_agent |
nmittler | 9466eb5 | 2015-09-04 15:13:46 -0700 | [diff] [blame] | 190 | |
| 191 | // Configuration for modules that use Netty tcnative (for OpenSSL). |
| 192 | tcnative libraries.netty_tcnative |
nathanmittler | 164b734 | 2014-12-15 09:58:05 -0800 | [diff] [blame] | 193 | } |
Eric Anderson | 192144e | 2015-03-02 13:31:14 -0800 | [diff] [blame] | 194 | |
| 195 | signing { |
| 196 | required false |
| 197 | sign configurations.archives |
| 198 | } |
| 199 | |
nmittler | 732cfc0 | 2015-03-03 07:59:13 -0800 | [diff] [blame] | 200 | // Disable JavaDoc doclint on Java 8. It's annoying. |
| 201 | if (JavaVersion.current().isJava8Compatible()) { |
| 202 | allprojects { |
| 203 | tasks.withType(Javadoc) { |
| 204 | options.addStringOption('Xdoclint:none', '-quiet') |
| 205 | } |
| 206 | } |
| 207 | } |
| 208 | |
Eric Anderson | c3e8dae | 2015-01-30 14:58:07 -0800 | [diff] [blame] | 209 | checkstyle { |
| 210 | configFile = file("$rootDir/checkstyle.xml") |
Eric Anderson | 6ab27ab | 2016-04-18 09:15:25 -0700 | [diff] [blame] | 211 | toolVersion = "6.17" |
Eric Anderson | ad44f0a | 2015-05-05 08:54:51 -0700 | [diff] [blame] | 212 | ignoreFailures = false |
Eric Anderson | 26141b4 | 2015-03-21 10:59:17 -0700 | [diff] [blame] | 213 | if (rootProject.hasProperty("checkstyle.ignoreFailures")) { |
| 214 | ignoreFailures = rootProject.properties["checkstyle.ignoreFailures"].toBoolean() |
| 215 | } |
Eric Anderson | efa774b | 2015-09-15 10:34:14 -0700 | [diff] [blame] | 216 | configProperties["rootDir"] = rootDir |
Eric Anderson | c3e8dae | 2015-01-30 14:58:07 -0800 | [diff] [blame] | 217 | } |
| 218 | |
| 219 | checkstyleMain { |
Kun Zhang | 693a7d2 | 2015-05-06 11:35:08 -0700 | [diff] [blame] | 220 | source = fileTree(dir: "src/main", include: "**/*.java") |
Eric Anderson | c3e8dae | 2015-01-30 14:58:07 -0800 | [diff] [blame] | 221 | } |
| 222 | |
| 223 | checkstyleTest { |
Kun Zhang | 693a7d2 | 2015-05-06 11:35:08 -0700 | [diff] [blame] | 224 | source = fileTree(dir: "src/test", include: "**/*.java") |
Eric Anderson | c3e8dae | 2015-01-30 14:58:07 -0800 | [diff] [blame] | 225 | } |
| 226 | |
Eric Anderson | 192144e | 2015-03-02 13:31:14 -0800 | [diff] [blame] | 227 | task javadocJar(type: Jar) { |
| 228 | classifier = 'javadoc' |
| 229 | from javadoc |
| 230 | } |
| 231 | |
| 232 | task sourcesJar(type: Jar) { |
| 233 | classifier = 'sources' |
| 234 | from sourceSets.main.allSource |
| 235 | } |
| 236 | |
| 237 | artifacts { |
| 238 | archives javadocJar, sourcesJar |
| 239 | } |
| 240 | |
| 241 | uploadArchives.repositories.mavenDeployer { |
| 242 | beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } |
zhangkun83 | da3c3f8 | 2015-03-11 18:03:31 -0700 | [diff] [blame] | 243 | String stagingUrl |
Kun Zhang | 2f74971 | 2015-05-06 13:10:28 -0700 | [diff] [blame] | 244 | if (rootProject.hasProperty('repositoryId')) { |
| 245 | stagingUrl = 'https://oss.sonatype.org/service/local/staging/deployByRepositoryId/' + |
| 246 | rootProject.repositoryId |
zhangkun83 | da3c3f8 | 2015-03-11 18:03:31 -0700 | [diff] [blame] | 247 | } else { |
| 248 | stagingUrl = 'https://oss.sonatype.org/service/local/staging/deploy/maven2/' |
| 249 | } |
Kun Zhang | 2f74971 | 2015-05-06 13:10:28 -0700 | [diff] [blame] | 250 | def configureAuth = { |
| 251 | if (rootProject.hasProperty('ossrhUsername') && rootProject.hasProperty('ossrhPassword')) { |
| 252 | authentication(userName: rootProject.ossrhUsername, password: rootProject.ossrhPassword) |
| 253 | } |
Eric Anderson | 192144e | 2015-03-02 13:31:14 -0800 | [diff] [blame] | 254 | } |
Kun Zhang | 2f74971 | 2015-05-06 13:10:28 -0700 | [diff] [blame] | 255 | repository(url: stagingUrl, configureAuth) |
| 256 | snapshotRepository(url: 'https://oss.sonatype.org/content/repositories/snapshots/', configureAuth) |
Eric Anderson | 192144e | 2015-03-02 13:31:14 -0800 | [diff] [blame] | 257 | } |
| 258 | |
| 259 | [ |
| 260 | install.repositories.mavenInstaller, |
| 261 | uploadArchives.repositories.mavenDeployer, |
| 262 | ]*.pom*.whenConfigured { pom -> |
| 263 | pom.project { |
Eric Anderson | 7e8a02c | 2015-03-12 17:03:01 -0700 | [diff] [blame] | 264 | name "$project.group:$project.name" |
Eric Anderson | 192144e | 2015-03-02 13:31:14 -0800 | [diff] [blame] | 265 | description project.description |
| 266 | url 'https://github.com/grpc/grpc-java' |
| 267 | |
| 268 | scm { |
Eric Anderson | b735495 | 2016-04-08 08:37:07 -0700 | [diff] [blame] | 269 | connection 'scm:git:https://github.com/grpc/grpc-java.git' |
| 270 | developerConnection 'scm:git:git@github.com:grpc/grpc-java.git' |
Eric Anderson | 192144e | 2015-03-02 13:31:14 -0800 | [diff] [blame] | 271 | url 'https://github.com/grpc/grpc-java' |
| 272 | } |
| 273 | |
| 274 | licenses { |
| 275 | license { |
| 276 | name 'BSD 3-Clause' |
| 277 | url 'http://opensource.org/licenses/BSD-3-Clause' |
| 278 | } |
| 279 | } |
Eric Anderson | 7e8a02c | 2015-03-12 17:03:01 -0700 | [diff] [blame] | 280 | |
| 281 | developers { |
| 282 | developer { |
| 283 | id "grpc.io" |
| 284 | name "gRPC Contributors" |
| 285 | email "grpc-io@googlegroups.com" |
| 286 | url "http://grpc.io/" |
| 287 | // https://issues.gradle.org/browse/GRADLE-2719 |
| 288 | organization = "Google, Inc." |
| 289 | organizationUrl "https://www.google.com" |
| 290 | } |
| 291 | } |
Eric Anderson | 192144e | 2015-03-02 13:31:14 -0800 | [diff] [blame] | 292 | } |
Eric Anderson | 90db93b | 2016-04-08 13:47:30 -0700 | [diff] [blame] | 293 | if (!(project.name in |
Naveen Reddy Chedeti | 2860959 | 2016-07-28 08:48:27 -0700 | [diff] [blame] | 294 | ["grpc-stub", "grpc-protobuf", "grpc-protobuf-lite", "grpc-protobuf-nano", "grpc-thrift"])) { |
Eric Anderson | 90db93b | 2016-04-08 13:47:30 -0700 | [diff] [blame] | 295 | def core = pom.dependencies.find {dep -> dep.artifactId == 'grpc-core'} |
| 296 | if (core != null) { |
| 297 | // Depend on specific version of grpc-core because internal package is unstable |
| 298 | core.version = "[" + core.version + "]" |
| 299 | } |
| 300 | } |
Eric Anderson | 192144e | 2015-03-02 13:31:14 -0800 | [diff] [blame] | 301 | } |
Kun Zhang | 3ddd1d5 | 2015-04-22 10:02:19 -0700 | [diff] [blame] | 302 | // At a test failure, log the stack trace to the console so that we don't |
| 303 | // have to open the HTML in a browser. |
| 304 | test { |
| 305 | testLogging { |
| 306 | exceptionFormat = 'full' |
nmittler | 4ee2a65 | 2015-06-01 16:20:08 -0700 | [diff] [blame] | 307 | showExceptions true |
| 308 | showCauses true |
| 309 | showStackTraces true |
Kun Zhang | 3ddd1d5 | 2015-04-22 10:02:19 -0700 | [diff] [blame] | 310 | } |
Eric Anderson | 56dca03 | 2016-02-12 08:48:41 -0800 | [diff] [blame] | 311 | maxHeapSize = '1500m' |
Kun Zhang | 3ddd1d5 | 2015-04-22 10:02:19 -0700 | [diff] [blame] | 312 | } |
nathanmittler | 164b734 | 2014-12-15 09:58:05 -0800 | [diff] [blame] | 313 | } |