Merge pull request #6829 from thundernest/bump-to-android-studio-flamingo

Bump to Android Studio Flamingo
This commit is contained in:
Wolf-Martell Montwé 2023-04-25 15:38:35 +00:00 committed by GitHub
commit 6e27fe5c84
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 67 additions and 60 deletions

1
.java-version Normal file
View file

@ -0,0 +1 @@
17.0

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.android.lint)

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.android.lint)

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.android.lint)

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.android)
alias(libs.plugins.kotlin.parcelize)

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.android.lint)

View file

@ -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

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.android)
alias(libs.plugins.kotlin.parcelize)

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.android.lint)

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.ksp)

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.android.lint)

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.ksp)

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.android.lint)

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.android.lint)

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.android.lint)

View file

@ -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}"
}

View 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()
}
}
}

View file

@ -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"
}
}

View file

@ -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

View file

@ -19,7 +19,7 @@ android {
}
kotlinOptions {
jvmTarget = ThunderbirdProjectConfig.javaVersion.toString()
jvmTarget = ThunderbirdProjectConfig.javaCompatibilityVersion.toString()
}
lint {

View 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)
}

View file

@ -11,7 +11,7 @@ tasks.withType<DependencyUpdatesTask> {
}
fun isNonStable(version: String): Boolean {
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.toUpperCase().contains(it) }
val stableKeyword = listOf("RELEASE", "FINAL", "GA").any { version.uppercase().contains(it) }
val regex = "^[\\d,.v-]+(-r)?$".toRegex()
val isStable = stableKeyword || regex.matches(version)
return isStable.not()

View file

@ -11,7 +11,7 @@ android {
}
kotlinOptions {
jvmTarget = ThunderbirdProjectConfig.javaVersion.toString()
jvmTarget = ThunderbirdProjectConfig.javaCompatibilityVersion.toString()
}
lint {

View file

@ -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)

View file

@ -16,7 +16,7 @@ configure<DetektExtension> {
}
tasks.withType<Detekt>().configureEach {
jvmTarget = ThunderbirdProjectConfig.javaVersion.toString()
jvmTarget = ThunderbirdProjectConfig.javaCompatibilityVersion.toString()
exclude(
"**/.gradle/**",

View file

@ -1,6 +1,3 @@
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.android.library) apply false
@ -17,9 +14,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 +66,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
@ -93,3 +83,8 @@ tasks.register("testsOnCi") {
.filterNot { task -> task.name in arrayOf("testDebugUnitTest", "test") },
)
}
tasks.named<Wrapper>("wrapper") {
gradleVersion = libs.versions.gradle.get()
distributionType = Wrapper.DistributionType.ALL
}

View file

@ -1,7 +1,5 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
alias(libs.plugins.kotlin.jvm)
id("application")
id(ThunderbirdPlugins.App.jvm)
}
version = "unspecified"
@ -16,8 +14,3 @@ dependencies {
implementation(libs.clikt)
implementation(libs.okio)
}
java {
sourceCompatibility = ThunderbirdProjectConfig.javaVersion
targetCompatibility = ThunderbirdProjectConfig.javaVersion
}

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.android.lint)

View file

@ -2,10 +2,11 @@
# Please don't open pull requests upgrading dependencies if you're a new contributor.
[versions]
androidGradlePlugin = "7.4.2"
gradle = "8.1.1"
androidGradlePlugin = "8.0.0"
ktlint = "0.48.2"
kotlin = "1.8.10"
kotlin = "1.8.20"
kotlinxCoroutines = "1.6.4"
jetbrainsAnnotations = "24.0.1"
androidxAppCompat = "1.6.1"
@ -20,7 +21,7 @@ androidxCoreSplashscreen = "1.0.0"
androidxPreference = "1.2.0"
androidxDrawerLayout = "1.1.1"
androidxTransition = "1.4.1"
androidxComposeCompiler = "1.4.4"
androidxComposeCompiler = "1.4.6"
androidxComposeBom = "2023.04.00"
androidxComposeMaterial = "1.3.1"
accompanist = "0.30.1"
@ -39,7 +40,7 @@ mockito = "5.2.0"
android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" }
android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" }
android-lint = { id = "com.android.lint", version.ref = "androidGradlePlugin" }
ksp = "com.google.devtools.ksp:1.8.10-1.0.9"
ksp = "com.google.devtools.ksp:1.8.20-1.0.11"
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }

Binary file not shown.

View file

@ -1,7 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=7ba68c54029790ab444b39d7e293d3236b2632631fb5f2e012bb28b4ff669e4b
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-all.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

11
gradlew vendored
View file

@ -85,9 +85,6 @@ done
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
@ -144,7 +141,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
@ -152,7 +149,7 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
@ -197,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.android.lint)

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.android.lint)

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.android.lint)

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.android.lint)

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.android.lint)

View file

@ -1,4 +1,3 @@
@Suppress("DSL_SCOPE_VIOLATION")
plugins {
id(ThunderbirdPlugins.Library.jvm)
alias(libs.plugins.android.lint)