From ec696c1d8d2ad91ca2844a791ae38f68444bad81 Mon Sep 17 00:00:00 2001 From: Harsh Shandilya Date: Fri, 12 May 2023 20:28:36 +0530 Subject: feat: raise min SDK to 26 Autofill is only available on API 26 and above and I do not want to deal with bugs on these older Android releases. --- .../main/kotlin/app/passwordstore/gradle/AndroidCommon.kt | 13 ++++--------- .../passwordstore/gradle/PublishedAndroidLibraryPlugin.kt | 4 +++- 2 files changed, 7 insertions(+), 10 deletions(-) (limited to 'build-logic') diff --git a/build-logic/src/main/kotlin/app/passwordstore/gradle/AndroidCommon.kt b/build-logic/src/main/kotlin/app/passwordstore/gradle/AndroidCommon.kt index c337d9d5..53c93f6c 100644 --- a/build-logic/src/main/kotlin/app/passwordstore/gradle/AndroidCommon.kt +++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/AndroidCommon.kt @@ -19,14 +19,8 @@ object AndroidCommon { project.extensions.configure { setCompileSdkVersion(33) defaultConfig { - minSdk = 23 - targetSdk = 31 - } - - sourceSets { - named("main") { java.srcDirs("src/main/kotlin") } - named("test") { java.srcDirs("src/test/kotlin") } - named("androidTest") { java.srcDirs("src/androidTest/kotlin") } + minSdk = 26 + targetSdk = 33 } packagingOptions { @@ -47,7 +41,8 @@ object AndroidCommon { animationsDisabled = true unitTests.isReturnDefaultValues = true } - project.tasks.withType { + + project.tasks.withType().configureEach { jvmArgs( "--add-opens=java.base/java.lang=ALL-UNNAMED", "--add-opens=java.base/java.util=ALL-UNNAMED", 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 17ab5431..ac07df2d 100644 --- a/build-logic/src/main/kotlin/app/passwordstore/gradle/PublishedAndroidLibraryPlugin.kt +++ b/build-logic/src/main/kotlin/app/passwordstore/gradle/PublishedAndroidLibraryPlugin.kt @@ -23,7 +23,9 @@ class PublishedAndroidLibraryPlugin : Plugin { } project.extensions.configure { publishToMavenCentral(SonatypeHost.DEFAULT, true) - signAllPublications() + if (project.providers.environmentVariable("CI").isPresent) { + signAllPublications() + } } project.extensions.configure { documentation.set(Documentation.PUBLIC) -- cgit v1.2.3