build-logic: switch to full publish plugin

This commit is contained in:
Harsh Shandilya 2022-06-20 14:25:57 +05:30
parent 50c99d6190
commit c625b2114a
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80

View file

@ -2,9 +2,8 @@
package dev.msfjarvis.aps.gradle
import com.vanniktech.maven.publish.AndroidSingleVariantLibrary
import com.vanniktech.maven.publish.MavenPublishBaseExtension
import com.vanniktech.maven.publish.MavenPublishBasePlugin
import com.vanniktech.maven.publish.MavenPublishPlugin
import com.vanniktech.maven.publish.SonatypeHost
import org.gradle.api.Plugin
import org.gradle.api.Project
@ -20,14 +19,12 @@ class PublishedAndroidLibraryPlugin : Plugin<Project> {
override fun apply(project: Project) {
project.plugins.run {
apply(LibraryPlugin::class)
apply(MavenPublishBasePlugin::class)
apply(MavenPublishPlugin::class)
apply(SigningPlugin::class)
}
project.extensions.getByType<MavenPublishBaseExtension>().run {
publishToMavenCentral(SonatypeHost.DEFAULT)
signAllPublications()
configure(AndroidSingleVariantLibrary())
pomFromGradleProperties()
}
project.afterEvaluate {
project.extensions.getByType<SigningExtension>().run {