diff options
-rw-r--r-- | build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.published-android-library.gradle.kts | 17 | ||||
-rw-r--r-- | gradle.properties | 3 | ||||
-rw-r--r-- | gradle/libs.versions.toml | 2 |
3 files changed, 20 insertions, 2 deletions
diff --git a/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.published-android-library.gradle.kts b/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.published-android-library.gradle.kts index 3aa55b7a..8e079a89 100644 --- a/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.published-android-library.gradle.kts +++ b/build-logic/android-plugins/src/main/kotlin/com.github.android-password-store.published-android-library.gradle.kts @@ -3,12 +3,27 @@ * SPDX-License-Identifier: GPL-3.0-only */ +import com.vanniktech.maven.publish.AndroidSingleVariantLibrary +import com.vanniktech.maven.publish.MavenPublishBaseExtension +import com.vanniktech.maven.publish.SonatypeHost import org.gradle.kotlin.dsl.provideDelegate plugins { id("com.github.android-password-store.android-library") - id("com.vanniktech.maven.publish") + id("com.vanniktech.maven.publish.base") id("org.jetbrains.dokka") + id("signing") +} + +configure<MavenPublishBaseExtension> { + group = requireNotNull(project.findProperty("GROUP")) + version = requireNotNull(project.findProperty("VERSION_NAME")) + mavenPublishing { + publishToMavenCentral(SonatypeHost.DEFAULT) + signAllPublications() + configure(AndroidSingleVariantLibrary()) + } + pomFromGradleProperties() } afterEvaluate { diff --git a/gradle.properties b/gradle.properties index c79df6c4..ab9386be 100644 --- a/gradle.properties +++ b/gradle.properties @@ -42,6 +42,9 @@ android.useMinimalKeepRules=true # Enable resource optimizations for release build android.enableResourceOptimizations=true +# Opt into new publishing APIs +android.disableAutomaticComponentCreation=true + # Default Android build features android.defaults.buildfeatures.buildconfig=false android.defaults.buildfeatures.aidl=false diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2d445017..9372ab7b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -46,7 +46,7 @@ build-binarycompat = "org.jetbrains.kotlinx:binary-compatibility-validator:0.8.0 build-dokka = "org.jetbrains.dokka:dokka-gradle-plugin:1.6.10" build-download = "de.undercouch:gradle-download-task:5.0.1" build-kotlin = "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10" -build-mavenpublish = "com.vanniktech:gradle-maven-publish-plugin:0.18.0" +build-mavenpublish = "com.vanniktech:gradle-maven-publish-plugin:0.19.0" build-okhttp = "com.squareup.okhttp3:okhttp:4.9.3" build-r8 = "com.android.tools:r8:3.3.15-dev" build-semver = "com.vdurmont:semver4j:3.1.0" |