Publish binder in releases. (#8585)

This commit is contained in:
markb74 2021-10-08 12:03:44 +02:00 committed by GitHub
parent a2e2f56565
commit 0d25d8f7d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 37 additions and 1 deletions

View File

@ -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
}
}
}