mirror of https://github.com/grpc/grpc-java.git
84 lines
1.9 KiB
Groovy
84 lines
1.9 KiB
Groovy
plugins {
|
|
id "maven-publish"
|
|
|
|
id "com.android.library"
|
|
id "digital.wup.android-maven-publish"
|
|
}
|
|
|
|
description = "gRPC: Cronet Android"
|
|
|
|
repositories {
|
|
google()
|
|
jcenter()
|
|
}
|
|
|
|
android {
|
|
compileSdkVersion 27
|
|
defaultConfig {
|
|
minSdkVersion 16
|
|
targetSdkVersion 27
|
|
versionCode 1
|
|
versionName "1.0"
|
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
}
|
|
buildTypes {
|
|
debug { minifyEnabled false }
|
|
release {
|
|
minifyEnabled false
|
|
consumerProguardFiles 'proguard-rules.pro'
|
|
}
|
|
}
|
|
testOptions { unitTests { includeAndroidResources = true } }
|
|
lintOptions { disable 'InvalidPackage' }
|
|
}
|
|
|
|
dependencies {
|
|
implementation project(':grpc-core')
|
|
testImplementation project(':grpc-testing')
|
|
|
|
implementation libraries.cronet_api
|
|
testImplementation libraries.cronet_embedded
|
|
|
|
testImplementation libraries.junit
|
|
testImplementation libraries.mockito
|
|
testImplementation libraries.robolectric
|
|
}
|
|
|
|
task javadocs(type: Javadoc) {
|
|
source = android.sourceSets.main.java.srcDirs
|
|
classpath += files(android.getBootClasspath())
|
|
classpath += files({
|
|
android.libraryVariants.collect { variant ->
|
|
variant.javaCompileProvider.get().classpath
|
|
}
|
|
})
|
|
options {
|
|
// Disable JavaDoc doclint on Java 8.
|
|
if (JavaVersion.current().isJava8Compatible()) {
|
|
addStringOption('Xdoclint:none', '-quiet')
|
|
}
|
|
}
|
|
exclude 'io/grpc/cronet/Internal*'
|
|
}
|
|
|
|
task javadocJar(type: Jar, dependsOn: javadocs) {
|
|
classifier = 'javadoc'
|
|
from javadocs.destinationDir
|
|
}
|
|
|
|
task sourcesJar(type: Jar) {
|
|
classifier = 'sources'
|
|
from android.sourceSets.main.java.srcDirs
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
maven {
|
|
from components.android
|
|
|
|
artifact javadocJar
|
|
artifact sourcesJar
|
|
}
|
|
}
|
|
}
|