Bump Android Gradle Plugin to 8.0.0 and move Kotlin compatibility to build-plugins
This commit is contained in:
parent
6910945f3f
commit
0339444dd3
14 changed files with 50 additions and 27 deletions
1
.java-version
Normal file
1
.java-version
Normal file
|
@ -0,0 +1 @@
|
|||
17.0
|
5
app/k9mail/proguard-rules.pro
vendored
5
app/k9mail/proguard-rules.pro
vendored
|
@ -53,3 +53,8 @@
|
|||
|
||||
# OkHttp platform used only on JVM and when Conscrypt dependency is available.
|
||||
-dontwarn okhttp3.internal.platform.ConscryptPlatform
|
||||
|
||||
-dontwarn kotlinx.serialization.KSerializer
|
||||
-dontwarn kotlinx.serialization.Serializable
|
||||
-dontwarn org.apache.http.client.methods.CloseableHttpResponse
|
||||
-dontwarn org.slf4j.impl.StaticLoggerBinder
|
||||
|
|
|
@ -14,8 +14,8 @@ internal fun CommonExtension<*, *, *, *>.configureSharedConfig() {
|
|||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = ThunderbirdProjectConfig.javaVersion
|
||||
targetCompatibility = ThunderbirdProjectConfig.javaVersion
|
||||
sourceCompatibility = ThunderbirdProjectConfig.javaCompatibilityVersion
|
||||
targetCompatibility = ThunderbirdProjectConfig.javaCompatibilityVersion
|
||||
}
|
||||
|
||||
lint {
|
||||
|
@ -45,7 +45,7 @@ internal fun CommonExtension<*, *, *, *>.configureSharedComposeConfig(
|
|||
abortOnError = true
|
||||
}
|
||||
|
||||
packagingOptions {
|
||||
packaging {
|
||||
resources {
|
||||
excludes += "/META-INF/{AL2.0,LGPL2.1}"
|
||||
}
|
||||
|
|
11
build-plugin/src/main/kotlin/KotlinExtension.kt
Normal file
11
build-plugin/src/main/kotlin/KotlinExtension.kt
Normal file
|
@ -0,0 +1,11 @@
|
|||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.withType
|
||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
||||
|
||||
fun Project.configureKotlinJavaCompatibility() {
|
||||
tasks.withType<KotlinCompile> {
|
||||
kotlinOptions {
|
||||
jvmTarget = ThunderbirdProjectConfig.javaCompatibilityVersion.toString()
|
||||
}
|
||||
}
|
||||
}
|
|
@ -3,10 +3,13 @@ object ThunderbirdPlugins {
|
|||
object App {
|
||||
const val android = "thunderbird.app.android"
|
||||
const val androidCompose = "thunderbird.app.android.compose"
|
||||
|
||||
const val jvm = "thunderbird.app.jvm"
|
||||
}
|
||||
object Library {
|
||||
const val jvm = "thunderbird.library.jvm"
|
||||
const val android = "thunderbird.library.android"
|
||||
const val androidCompose = "thunderbird.library.android.compose"
|
||||
|
||||
const val jvm = "thunderbird.library.jvm"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@ import org.gradle.api.JavaVersion
|
|||
|
||||
object ThunderbirdProjectConfig {
|
||||
|
||||
val javaVersion = JavaVersion.VERSION_11
|
||||
val javaCompatibilityVersion = JavaVersion.VERSION_11
|
||||
|
||||
const val androidSdkMin = 21
|
||||
const val androidSdkTarget = 31
|
||||
|
|
|
@ -19,7 +19,7 @@ android {
|
|||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = ThunderbirdProjectConfig.javaVersion.toString()
|
||||
jvmTarget = ThunderbirdProjectConfig.javaCompatibilityVersion.toString()
|
||||
}
|
||||
|
||||
lint {
|
||||
|
|
16
build-plugin/src/main/kotlin/thunderbird.app.jvm.gradle.kts
Normal file
16
build-plugin/src/main/kotlin/thunderbird.app.jvm.gradle.kts
Normal file
|
@ -0,0 +1,16 @@
|
|||
plugins {
|
||||
id("application")
|
||||
id("org.jetbrains.kotlin.jvm")
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = ThunderbirdProjectConfig.javaCompatibilityVersion
|
||||
targetCompatibility = ThunderbirdProjectConfig.javaCompatibilityVersion
|
||||
}
|
||||
|
||||
configureKotlinJavaCompatibility()
|
||||
|
||||
dependencies {
|
||||
implementation(libs.bundles.shared.jvm.main)
|
||||
testImplementation(libs.bundles.shared.jvm.test)
|
||||
}
|
|
@ -11,7 +11,7 @@ android {
|
|||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = ThunderbirdProjectConfig.javaVersion.toString()
|
||||
jvmTarget = ThunderbirdProjectConfig.javaCompatibilityVersion.toString()
|
||||
}
|
||||
|
||||
lint {
|
||||
|
|
|
@ -4,10 +4,12 @@ plugins {
|
|||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = ThunderbirdProjectConfig.javaVersion
|
||||
targetCompatibility = ThunderbirdProjectConfig.javaVersion
|
||||
sourceCompatibility = ThunderbirdProjectConfig.javaCompatibilityVersion
|
||||
targetCompatibility = ThunderbirdProjectConfig.javaCompatibilityVersion
|
||||
}
|
||||
|
||||
configureKotlinJavaCompatibility()
|
||||
|
||||
dependencies {
|
||||
implementation(libs.bundles.shared.jvm.main)
|
||||
testImplementation(libs.bundles.shared.jvm.test)
|
||||
|
|
|
@ -16,7 +16,7 @@ configure<DetektExtension> {
|
|||
}
|
||||
|
||||
tasks.withType<Detekt>().configureEach {
|
||||
jvmTarget = ThunderbirdProjectConfig.javaVersion.toString()
|
||||
jvmTarget = ThunderbirdProjectConfig.javaCompatibilityVersion.toString()
|
||||
|
||||
exclude(
|
||||
"**/.gradle/**",
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
@Suppress("DSL_SCOPE_VIOLATION")
|
||||
plugins {
|
||||
alias(libs.plugins.android.application) apply false
|
||||
|
@ -17,9 +15,6 @@ plugins {
|
|||
|
||||
val propertyTestCoverage: String? by extra
|
||||
|
||||
val javaVersion = JavaVersion.VERSION_11
|
||||
val jvmTargetVersion = JvmTarget.JVM_11
|
||||
|
||||
allprojects {
|
||||
extra.apply {
|
||||
set("testCoverageEnabled", propertyTestCoverage != null)
|
||||
|
@ -72,10 +67,6 @@ allprojects {
|
|||
}
|
||||
}
|
||||
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||
kotlinOptions.jvmTarget = jvmTargetVersion.target
|
||||
}
|
||||
|
||||
tasks.withType<Test> {
|
||||
testLogging {
|
||||
exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
@Suppress("DSL_SCOPE_VIOLATION")
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.jvm)
|
||||
id("application")
|
||||
id(ThunderbirdPlugins.App.jvm)
|
||||
}
|
||||
|
||||
version = "unspecified"
|
||||
|
@ -16,8 +15,3 @@ dependencies {
|
|||
implementation(libs.clikt)
|
||||
implementation(libs.okio)
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = ThunderbirdProjectConfig.javaVersion
|
||||
targetCompatibility = ThunderbirdProjectConfig.javaVersion
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
[versions]
|
||||
gradle = "8.0.2"
|
||||
androidGradlePlugin = "7.4.2"
|
||||
androidGradlePlugin = "8.0.0"
|
||||
ktlint = "0.48.2"
|
||||
|
||||
kotlin = "1.8.10"
|
||||
|
|
Loading…
Reference in a new issue