diff --git a/gradle/build-logic/src/main/kotlin/publish.gradle.kts b/gradle/build-logic/src/main/kotlin/publish.gradle.kts index 8c2893d..866ccab 100644 --- a/gradle/build-logic/src/main/kotlin/publish.gradle.kts +++ b/gradle/build-logic/src/main/kotlin/publish.gradle.kts @@ -42,10 +42,9 @@ publishing { } signing { - val signingKey: String? by project - val signingPassword: String? by project - signingKey?.let { - useInMemoryPgpKeys(String(Base64.getDecoder().decode(it)).trim(), signingPassword) + val signingKey = providers.gradleProperty("signingKey") + if (signingKey.isPresent) { + useInMemoryPgpKeys(signingKey.get(), providers.gradleProperty("signingPassword").get()) sign(publishing.publications) } } diff --git a/kotlinx-uuid-core/build.gradle.kts b/kotlinx-uuid-core/build.gradle.kts index 0b6dec3..204673c 100644 --- a/kotlinx-uuid-core/build.gradle.kts +++ b/kotlinx-uuid-core/build.gradle.kts @@ -50,9 +50,19 @@ android { defaultConfig { minSdk = 21 + aarMetadata { + minCompileSdk = 21 + } testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } + publishing { + multipleVariants { + allVariants() + withJavadocJar() + } + } + compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 @@ -60,7 +70,7 @@ android { testOptions { managedDevices { localDevices { - register("pixel2api30") { + register("pixel2api34") { device = "Pixel 2" apiLevel = 34 systemImageSource = "aosp-atd" @@ -79,3 +89,9 @@ kotlin.sourceSets { } } } + +publishing.publications.register("androidLib", MavenPublication::class) { + afterEvaluate { + from(components["default"]) + } +}