summaryrefslogtreecommitdiff
path: root/build-logic/src
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2023-06-06 18:21:45 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2023-06-06 18:21:45 +0530
commitce3cb5fe46549c50406bbc98841a68fe408367c8 (patch)
tree6fa60579c4df6efe4d33caad1cb969e6dc40bada /build-logic/src
parent08ded391c475c555f918df778574e5dd25d61352 (diff)
fix(build): use base plugin for publishing
Diffstat (limited to 'build-logic/src')
-rw-r--r--build-logic/src/main/kotlin/app/passwordstore/gradle/PublishedAndroidLibraryPlugin.kt7
1 files 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<Project> {
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<MavenPublishBaseExtension> {
@@ -26,6 +27,8 @@ class PublishedAndroidLibraryPlugin : Plugin<Project> {
if (project.providers.environmentVariable("CI").isPresent) {
signAllPublications()
}
+ configure(AndroidMultiVariantLibrary(sourcesJar = true, publishJavadocJar = true))
+ pomFromGradleProperties()
}
project.extensions.configure<MetalavaExtension> {
documentation.set(Documentation.PUBLIC)