mirror of https://github.com/grpc/grpc-java.git
Publish binder in releases. (#8585)
This commit is contained in:
parent
a2e2f56565
commit
0d25d8f7d6
|
@ -2,6 +2,7 @@ plugins {
|
|||
id "maven-publish"
|
||||
id "com.android.library"
|
||||
id "ru.vyarus.animalsniffer"
|
||||
id "digital.wup.android-maven-publish"
|
||||
}
|
||||
|
||||
description = 'gRPC BinderChannel'
|
||||
|
@ -94,4 +95,39 @@ tasks.withType(JavaCompile) {
|
|||
options.errorprone.check("UnnecessaryAnonymousClass", CheckSeverity.OFF)
|
||||
}
|
||||
|
||||
[publishMavenPublicationToMavenRepository]*.onlyIf { false }
|
||||
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')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue