diff --git a/app/android/build.gradle.kts b/app/android/build.gradle.kts index d91f91d86e..b450cba0c0 100644 --- a/app/android/build.gradle.kts +++ b/app/android/build.gradle.kts @@ -21,7 +21,7 @@ plugins { id("com.android.application") kotlin("android") kotlin("plugin.compose") - id("kotlinx-atomicfu") + id("org.jetbrains.kotlinx.atomicfu") id("kotlin-parcelize") idea } diff --git a/app/desktop/build.gradle.kts b/app/desktop/build.gradle.kts index 09645d6fed..ab2129fea4 100644 --- a/app/desktop/build.gradle.kts +++ b/app/desktop/build.gradle.kts @@ -29,7 +29,7 @@ plugins { kotlin("plugin.compose") id("org.jetbrains.compose") kotlin("plugin.serialization") - id("kotlinx-atomicfu") + id("org.jetbrains.kotlinx.atomicfu") idea } diff --git a/app/shared/build.gradle.kts b/app/shared/build.gradle.kts index 72c3daa96f..7639c2075f 100644 --- a/app/shared/build.gradle.kts +++ b/app/shared/build.gradle.kts @@ -33,7 +33,7 @@ plugins { `flatten-source-sets` kotlin("plugin.serialization") - id("kotlinx-atomicfu") + id("org.jetbrains.kotlinx.atomicfu") id("com.google.devtools.ksp") id("androidx.room") idea @@ -73,6 +73,8 @@ kotlin { api(libs.kotlinx.coroutines.core) api(libs.kotlinx.serialization.json) implementation(libs.atomicfu) // room runtime + api(libs.kotlinx.datetime) + api(libs.kotlinx.io.core) // Compose api(compose.foundation) @@ -189,22 +191,6 @@ kotlin { // https://repo1.maven.org/maven2/org/openjfx/javafx-graphics/17.0.11/ val os = getOs() - val classifier = when (os) { - Os.MacOS -> { - // check aarch - if (System.getProperty("os.arch").contains("aarch")) { - "mac-aarch64" - } else { - "mac" - } - } - - Os.Windows -> "win" - Os.Linux -> "linux" - else -> { - null - } - } runtimeOnly(libs.kotlinx.coroutines.debug) diff --git a/app/shared/image-viewer/build.gradle.kts b/app/shared/image-viewer/build.gradle.kts index edbcdc0a20..8074203cf7 100644 --- a/app/shared/image-viewer/build.gradle.kts +++ b/app/shared/image-viewer/build.gradle.kts @@ -13,7 +13,7 @@ plugins { `flatten-source-sets` kotlin("plugin.serialization") - id("kotlinx-atomicfu") + id("org.jetbrains.kotlinx.atomicfu") } extra.set("ani.jvm.target", 17) diff --git a/build.gradle.kts b/build.gradle.kts index c53b8f9134..55723c3a57 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -31,6 +31,7 @@ plugins { kotlin("jvm") apply false kotlin("plugin.serialization") version libs.versions.kotlin apply false kotlin("plugin.compose") version libs.versions.kotlin apply false + id("org.jetbrains.kotlinx.atomicfu") apply false id("org.jetbrains.compose") apply false id("com.android.library") apply false id("com.android.application") apply false diff --git a/ci-helper/build.gradle.kts b/ci-helper/build.gradle.kts index 8724932c4b..39be376e01 100644 --- a/ci-helper/build.gradle.kts +++ b/ci-helper/build.gradle.kts @@ -39,7 +39,7 @@ import org.gradle.internal.impldep.com.amazonaws.services.s3.model.PutObjectRequ plugins { kotlin("jvm") - id("kotlinx-atomicfu") + id("org.jetbrains.kotlinx.atomicfu") } val hostOS: OS by lazy { diff --git a/danmaku/ui/build.gradle.kts b/danmaku/ui/build.gradle.kts index 59da424bfe..81c9608fec 100644 --- a/danmaku/ui/build.gradle.kts +++ b/danmaku/ui/build.gradle.kts @@ -25,7 +25,7 @@ plugins { id("org.jetbrains.compose") id("com.android.library") kotlin("plugin.serialization") - id("kotlinx-atomicfu") + id("org.jetbrains.kotlinx.atomicfu") } extra.set("ani.jvm.target", 17) diff --git a/data-sources/bt/acg.rip/build.gradle.kts b/data-sources/bt/acg.rip/build.gradle.kts index 7754ce5f26..7062a46b79 100644 --- a/data-sources/bt/acg.rip/build.gradle.kts +++ b/data-sources/bt/acg.rip/build.gradle.kts @@ -19,7 +19,7 @@ plugins { kotlin("jvm") kotlin("plugin.serialization") - id("kotlinx-atomicfu") + id("org.jetbrains.kotlinx.atomicfu") `flatten-source-sets` } diff --git a/data-sources/bt/dmhy/build.gradle.kts b/data-sources/bt/dmhy/build.gradle.kts index a4bbc3bebc..1c3c15dc5a 100644 --- a/data-sources/bt/dmhy/build.gradle.kts +++ b/data-sources/bt/dmhy/build.gradle.kts @@ -19,7 +19,7 @@ plugins { kotlin("jvm") kotlin("plugin.serialization") - id("kotlinx-atomicfu") + id("org.jetbrains.kotlinx.atomicfu") `flatten-source-sets` } diff --git a/data-sources/bt/mikan/build.gradle.kts b/data-sources/bt/mikan/build.gradle.kts index 07e44e4121..c51eeb34df 100644 --- a/data-sources/bt/mikan/build.gradle.kts +++ b/data-sources/bt/mikan/build.gradle.kts @@ -19,7 +19,7 @@ plugins { kotlin("jvm") kotlin("plugin.serialization") - id("kotlinx-atomicfu") + id("org.jetbrains.kotlinx.atomicfu") `flatten-source-sets` } diff --git a/data-sources/jellyfin/build.gradle.kts b/data-sources/jellyfin/build.gradle.kts index b457bde420..d5532ae312 100644 --- a/data-sources/jellyfin/build.gradle.kts +++ b/data-sources/jellyfin/build.gradle.kts @@ -1,7 +1,7 @@ plugins { kotlin("jvm") kotlin("plugin.serialization") - id("kotlinx-atomicfu") + id("org.jetbrains.kotlinx.atomicfu") `flatten-source-sets` } diff --git a/data-sources/web/gugufan/build.gradle.kts b/data-sources/web/gugufan/build.gradle.kts index b6c58658f8..e1f8595b68 100644 --- a/data-sources/web/gugufan/build.gradle.kts +++ b/data-sources/web/gugufan/build.gradle.kts @@ -1,7 +1,7 @@ plugins { kotlin("jvm") kotlin("plugin.serialization") - id("kotlinx-atomicfu") + id("org.jetbrains.kotlinx.atomicfu") `flatten-source-sets` } diff --git a/data-sources/web/mxdongman/build.gradle.kts b/data-sources/web/mxdongman/build.gradle.kts index b6c58658f8..e1f8595b68 100644 --- a/data-sources/web/mxdongman/build.gradle.kts +++ b/data-sources/web/mxdongman/build.gradle.kts @@ -1,7 +1,7 @@ plugins { kotlin("jvm") kotlin("plugin.serialization") - id("kotlinx-atomicfu") + id("org.jetbrains.kotlinx.atomicfu") `flatten-source-sets` } diff --git a/data-sources/web/ntdm/build.gradle.kts b/data-sources/web/ntdm/build.gradle.kts index b6c58658f8..e1f8595b68 100644 --- a/data-sources/web/ntdm/build.gradle.kts +++ b/data-sources/web/ntdm/build.gradle.kts @@ -1,7 +1,7 @@ plugins { kotlin("jvm") kotlin("plugin.serialization") - id("kotlinx-atomicfu") + id("org.jetbrains.kotlinx.atomicfu") `flatten-source-sets` } diff --git a/data-sources/web/nyafun/build.gradle.kts b/data-sources/web/nyafun/build.gradle.kts index 208a56de63..448cd2b984 100644 --- a/data-sources/web/nyafun/build.gradle.kts +++ b/data-sources/web/nyafun/build.gradle.kts @@ -1,7 +1,7 @@ plugins { kotlin("jvm") kotlin("plugin.serialization") - id("kotlinx-atomicfu") + id("org.jetbrains.kotlinx.atomicfu") `flatten-source-sets` } diff --git a/data-sources/web/web-base/build.gradle.kts b/data-sources/web/web-base/build.gradle.kts index 18bb985107..44df16c0d0 100644 --- a/data-sources/web/web-base/build.gradle.kts +++ b/data-sources/web/web-base/build.gradle.kts @@ -1,7 +1,7 @@ plugins { kotlin("jvm") kotlin("plugin.serialization") - id("kotlinx-atomicfu") + id("org.jetbrains.kotlinx.atomicfu") `flatten-source-sets` } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index de3fa51ad9..7cb268dbb2 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,9 +4,10 @@ jna = "5.13.0" kotlin = "2.0.0" # kotlinx coroutines = "1.8.1" -serialization = "1.6.3" -datetime = "0.6.0" -atomicfu = "0.23.2" +serialization = "1.7.1" # https://github.com/Kotlin/kotlinx.serialization/releases +datetime = "0.6.0" # https://github.com/Kotlin/kotlinx-datetime/releases +atomicfu = "0.25.0" # https://github.com/Kotlin/kotlinx-atomicfu/releases +kotlinx-io = "0.5.1" # https://github.com/Kotlin/kotlinx-io/releases # kotlinpoet = "1.16.0" log4j-core = "2.20.0" @@ -57,7 +58,8 @@ compose-multiplatfrom-gradle-plugin = { module = "org.jetbrains.compose:org.jetb # Kotlinx kotlinx-datetime = { module = "org.jetbrains.kotlinx:kotlinx-datetime", version.ref = "datetime" } -kotlinpoet = { module = "com.squareup:kotlinpoet", version.ref = "kotlinpoet" } +kotlinx-io-core = { module = "org.jetbrains.kotlinx:kotlinx-io-core", version.ref = "kotlinx-io" } +kotlinx-io-bytestring = { module = "org.jetbrains.kotlinx:kotlinx-io-bytestring", version.ref = "kotlinx-io" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" } kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" } kotlinx-coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "coroutines" } @@ -65,10 +67,12 @@ kotlinx-coroutines-debug = { module = "org.jetbrains.kotlinx:kotlinx-coroutines- kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" } kotlinx-serialization-core = { module = "org.jetbrains.kotlinx:kotlinx-serialization-core", version.ref = "serialization" } kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "serialization" } +kotlinx-serialization-json-io = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json-io", version.ref = "serialization" } atomicfu = { module = "org.jetbrains.kotlinx:atomicfu", version.ref = "atomicfu" } -kotlinx-io-core = { module = "org.jetbrains.kotlinx:kotlinx-io-core", version = "0.3.2" } #kotlinx-serialization-protobuf = { module = "org.jetbrains.kotlinx:kotlinx-serialization-protobuf", version.ref = "serialization" } +kotlinpoet = { module = "com.squareup:kotlinpoet", version.ref = "kotlinpoet" } + # Ktor ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" } ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktor" } diff --git a/settings.gradle.kts b/settings.gradle.kts index 9fde1d9c01..899cdcb41d 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -25,13 +25,6 @@ pluginManagement { google() maven("https://maven.pkg.jetbrains.space/public/p/compose/dev") // Compose Multiplatform pre-release versions } - resolutionStrategy { - eachPlugin { - if (requested.id.id == "kotlinx-atomicfu") { // atomicfu is not on Gradle Plugin Portal - useModule("org.jetbrains.kotlinx:atomicfu-gradle-plugin:${requested.version}") - } - } - } } plugins { diff --git a/utils/serialization/build.gradle.kts b/utils/serialization/build.gradle.kts index f3eba0a896..23b914a900 100644 --- a/utils/serialization/build.gradle.kts +++ b/utils/serialization/build.gradle.kts @@ -1,3 +1,5 @@ +import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi + /* * Ani * Copyright (C) 2022-2024 Him188 @@ -28,5 +30,6 @@ dependencies { } kotlin { + @OptIn(ExperimentalKotlinGradlePluginApi::class) compilerOptions.freeCompilerArgs.add("-Xexpect-actual-classes") } \ No newline at end of file