grpc-java/all/build.gradle

83 lines
2.3 KiB
Groovy
Raw Normal View History

2015-08-08 09:02:31 +08:00
apply plugin: 'com.github.kt3k.coveralls'
2015-01-28 02:25:39 +08:00
description = "gRPC: All"
2015-08-08 09:02:31 +08:00
buildscript {
repositories {
maven { // The google mirror is less flaky than mavenCentral()
url "https://maven-central.storage-download.googleapis.com/repos/central/data/" }
2015-08-08 09:02:31 +08:00
}
dependencies { classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1' }
2015-08-08 09:02:31 +08:00
}
def subprojects = [
project(':grpc-auth'),
project(':grpc-core'),
project(':grpc-context'),
project(':grpc-netty'),
project(':grpc-okhttp'),
project(':grpc-protobuf'),
project(':grpc-protobuf-lite'),
project(':grpc-protobuf-nano'),
project(':grpc-stub'),
project(':grpc-testing'),
]
for (subproject in rootProject.subprojects) {
if (subproject == project) {
continue
}
evaluationDependsOn(subproject.path)
}
dependencies {
compile subprojects.minus(project(':grpc-protobuf-lite'))
}
javadoc {
classpath = files(subprojects.collect { subproject ->
subproject.javadoc.classpath
})
for (subproject in subprojects) {
if (subproject == project) {
continue;
}
source subproject.javadoc.source
options.links subproject.javadoc.options.links.toArray(new String[0])
}
}
task jacocoMerge(type: JacocoMerge) {
dependsOn(subprojects.jacocoTestReport.dependsOn)
mustRunAfter(subprojects.jacocoTestReport.mustRunAfter)
destinationFile = file("${buildDir}/jacoco/test.exec")
executionData = files(subprojects.jacocoTestReport.executionData)
.plus(project(':grpc-interop-testing').jacocoTestReport.executionData)
.filter { f -> f.exists() }
}
jacocoTestReport {
dependsOn(jacocoMerge)
2015-08-08 09:02:31 +08:00
reports {
xml.enabled = true
html.enabled = true
}
additionalSourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs)
sourceDirectories = files(subprojects.sourceSets.main.allSource.srcDirs)
classDirectories = files(subprojects.sourceSets.main.output)
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it,
exclude: [
'**/io/grpc/internal/testing/**',
'**/io/grpc/okhttp/internal/**',
])
})
}
2015-08-08 09:02:31 +08:00
coveralls {
sourceDirs = subprojects.sourceSets.main.allSource.srcDirs.flatten()
}
tasks.coveralls { dependsOn(jacocoTestReport) }