From ce3cb5fe46549c50406bbc98841a68fe408367c8 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Tue, 6 Jun 2023 18:21:45 +0530 Subject: fix(build): use base plugin for publishing --- .../app/passwordstore/gradle/PublishedAndroidLibraryPlugin.kt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/PublishedAndroidLibraryPlugin.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/PublishedAndroidLibraryPlugin.kt index ac07df2d..1716a5ce 100644 --- a/build-logic/src/main/kotlin/app/passwordstore/gradle/PublishedAndroidLibraryPlugin.kt +++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/PublishedAndroidLibraryPlugin.kt @@ -2,8 +2,9 @@ package app.passwordstore.gradle +import com.vanniktech.maven.publish.AndroidMultiVariantLibrary import com.vanniktech.maven.publish.MavenPublishBaseExtension -import com.vanniktech.maven.publish.MavenPublishPlugin +import com.vanniktech.maven.publish.MavenPublishBasePlugin import com.vanniktech.maven.publish.SonatypeHost import me.tylerbwong.gradle.metalava.Documentation import me.tylerbwong.gradle.metalava.extension.MetalavaExtension @@ -18,7 +19,7 @@ class PublishedAndroidLibraryPlugin : Plugin { override fun apply(project: Project) { project.plugins.run { apply(LibraryPlugin::class) - apply(MavenPublishPlugin::class) + apply(MavenPublishBasePlugin::class) apply("me.tylerbwong.gradle.metalava") } project.extensions.configure { @@ -26,6 +27,8 @@ class PublishedAndroidLibraryPlugin : Plugin { if (project.providers.environmentVariable("CI").isPresent) { signAllPublications() } + configure(AndroidMultiVariantLibrary(sourcesJar = true, publishJavadocJar = true)) + pomFromGradleProperties() } project.extensions.configure { documentation.set(Documentation.PUBLIC) -- cgit v1.2.3