diff options
Diffstat (limited to 'build-logic/android-plugins/src/main/kotlin')
-rw-r--r-- | build-logic/android-plugins/src/main/kotlin/app/passwordstore/gradle/PublishedAndroidLibraryPlugin.kt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/build-logic/android-plugins/src/main/kotlin/app/passwordstore/gradle/PublishedAndroidLibraryPlugin.kt b/build-logic/android-plugins/src/main/kotlin/app/passwordstore/gradle/PublishedAndroidLibraryPlugin.kt index b005043b..542bfeb6 100644 --- a/build-logic/android-plugins/src/main/kotlin/app/passwordstore/gradle/PublishedAndroidLibraryPlugin.kt +++ b/build-logic/android-plugins/src/main/kotlin/app/passwordstore/gradle/PublishedAndroidLibraryPlugin.kt @@ -5,6 +5,8 @@ package app.passwordstore.gradle import com.vanniktech.maven.publish.MavenPublishBaseExtension import com.vanniktech.maven.publish.MavenPublishPlugin import com.vanniktech.maven.publish.SonatypeHost +import me.tylerbwong.gradle.metalava.Documentation +import me.tylerbwong.gradle.metalava.extension.MetalavaExtension import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.kotlin.dsl.apply @@ -21,6 +23,7 @@ class PublishedAndroidLibraryPlugin : Plugin<Project> { apply(LibraryPlugin::class) apply(MavenPublishPlugin::class) apply(SigningPlugin::class) + apply("me.tylerbwong.gradle.metalava") } project.extensions.getByType<MavenPublishBaseExtension>().run { publishToMavenCentral(SonatypeHost.DEFAULT, true) @@ -33,5 +36,12 @@ class PublishedAndroidLibraryPlugin : Plugin<Project> { useInMemoryPgpKeys(signingKey, signingPassword) } } + project.extensions.getByType<MetalavaExtension>().run { + documentation.set(Documentation.PUBLIC) + inputKotlinNulls.set(true) + outputKotlinNulls.set(true) + reportLintsAsErrors.set(true) + reportWarningsAsErrors.set(true) + } } } |