aboutsummaryrefslogtreecommitdiff
path: root/build-logic
diff options
context:
space:
mode:
authorHarsh Shandilya <me@msfjarvis.dev>2023-05-12 20:28:36 +0530
committerHarsh Shandilya <me@msfjarvis.dev>2023-05-12 20:28:36 +0530
commitec696c1d8d2ad91ca2844a791ae38f68444bad81 (patch)
tree966c1c59a5c4ce76868d04a84263d5fde354276c /build-logic
parentee9d77eafdbec31d3e71b482003f9eb35ed12d30 (diff)
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.
Diffstat (limited to 'build-logic')
-rw-r--r--build-logic/src/main/kotlin/app/passwordstore/gradle/AndroidCommon.kt13
-rw-r--r--build-logic/src/main/kotlin/app/passwordstore/gradle/PublishedAndroidLibraryPlugin.kt4
2 files changed, 7 insertions, 10 deletions
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<TestedExtension> {
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<Test> {
+
+ project.tasks.withType<Test>().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> {
}
project.extensions.configure<MavenPublishBaseExtension> {
publishToMavenCentral(SonatypeHost.DEFAULT, true)
- signAllPublications()
+ if (project.providers.environmentVariable("CI").isPresent) {
+ signAllPublications()
+ }
}
project.extensions.configure<MetalavaExtension> {
documentation.set(Documentation.PUBLIC)