Skip to content

Commit

Permalink
perf: update dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
lisonge committed Mar 25, 2024
1 parent 6ba1f4a commit b8598cb
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 195 deletions.
10 changes: 5 additions & 5 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ plugins {

android {
namespace = "li.songe.gkd"
compileSdk = libs.versions.android.compileSdk.get().toInt()
buildToolsVersion = libs.versions.android.buildToolsVersion.get()
compileSdk = libs.versions.compileSdk.get().toInt()
buildToolsVersion = libs.versions.buildToolsVersion.get()

defaultConfig {
minSdk = libs.versions.android.minSdk.get().toInt()
targetSdk = libs.versions.android.targetSdk.get().toInt()
minSdk = libs.versions.minSdk.get().toInt()
targetSdk = libs.versions.targetSdk.get().toInt()

applicationId = "li.songe.gkd"
versionCode = 27
Expand Down Expand Up @@ -133,7 +133,7 @@ android {
aidl = true
}
composeOptions {
kotlinCompilerExtensionVersion = libs.versions.compose.compilerVersion.get()
kotlinCompilerExtensionVersion = libs.versions.composeCompiler.get()
}
packagingOptions.resources.excludes += setOf(
// https://github.com/Kotlin/kotlinx.coroutines/issues/2023
Expand Down
86 changes: 86 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
[versions]
kotlin = "1.9.23"
ksp = "1.9.23-1.0.19"
compileSdk = "34"
targetSdk = "34"
buildToolsVersion = "34.0.0"
minSdk = "26"
android = "8.3.1"
compose = "1.6.4"
composeCompiler = "1.5.11"
rikka = "4.4.0"
room = "2.6.1"
paging = "3.2.1"
ktor = "2.3.9"
hilt = "2.51"
destinations = "1.10.2"
coil = "2.6.0"

[libraries]
android_gradle = { module = "com.android.tools.build:gradle", version.ref = "android" }
kotlin_gradle_plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
kotlin_serialization = { module = "org.jetbrains.kotlin:kotlin-serialization", version.ref = "kotlin" }
kotlin_stdlib_common = { module = "org.jetbrains.kotlin:kotlin-stdlib-common", version.ref = "kotlin" }
compose_ui = { module = "androidx.compose.ui:ui", version.ref = "compose" }
compose_preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "compose" }
compose_tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "compose" }
compose_junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "compose" }
compose_icons = { module = "androidx.compose.material:material-icons-extended", version.ref = "compose" }
compose_material3 = { module = "androidx.compose.material3:material3", version = "1.2.1" }
compose_activity = { module = "androidx.activity:activity-compose", version = "1.8.2" }
tencent_mmkv = { module = "com.tencent:mmkv", version = "1.3.4" }
rikka_gradle = { module = "dev.rikka.tools.refine:gradle-plugin", version.ref = "rikka" }
rikka_processor = { module = "dev.rikka.tools.refine:annotation-processor", version.ref = "rikka" }
rikka_annotation = { module = "dev.rikka.tools.refine:annotation", version.ref = "rikka" }
rikka_runtime = { module = "dev.rikka.tools.refine:runtime", version.ref = "rikka" }
rikka_shizuku_api = { module = "dev.rikka.shizuku:api", version = "13.1.5" }
rikka_shizuku_provider = { module = "dev.rikka.shizuku:provider", version = "13.1.5" }
lsposed_hiddenapibypass = { module = "org.lsposed.hiddenapibypass:hiddenapibypass", version = "4.3" }
others_utilcodex = { module = "com.blankj:utilcodex", version = "1.31.1" }
others_activityResultLauncher = { module = "com.github.DylanCaiCoding:ActivityResultLauncher", version = "1.1.2" }
others_jankson = { module = "blue.endless:jankson", version = "1.2.3" }
others_floating_bubble_view = { module = "io.github.torrydo:floating-bubble-view", version = "0.6.4" }
androidx_appcompat = { module = "androidx.appcompat:appcompat", version = "1.6.1" }
androidx_core_ktx = { module = "androidx.core:core-ktx", version = "1.12.0" }
androidx_lifecycle_runtime_ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version = "2.7.0" }
androidx_junit = { module = "androidx.test.ext:junit", version = "1.1.5" }
androidx_espresso = { module = "androidx.test.espresso:espresso-core", version = "3.5.1" }
androidx_room_runtime = { module = "androidx.room:room-runtime", version.ref = "room" }
androidx_room_compiler = { module = "androidx.room:room-compiler", version.ref = "room" }
androidx_room_ktx = { module = "androidx.room:room-ktx", version.ref = "room" }
androidx_room_paging = { module = "androidx.room:room-paging", version.ref = "room" }
androidx_splashscreen = { module = "androidx.core:core-splashscreen", version = "1.0.1" }
androidx_paging_runtime = { module = "androidx.paging:paging-runtime", version.ref = "paging" }
androidx_paging_compose = { module = "androidx.paging:paging-compose", version.ref = "paging" }
google_accompanist_drawablepainter = { module = "com.google.accompanist:accompanist-drawablepainter", version = "0.34.0" }
junit = { module = "junit:junit", version = "4.13.2" }
ktor_server_core = { module = "io.ktor:ktor-server-core", version.ref = "ktor" }
ktor_server_cio = { module = "io.ktor:ktor-server-cio", version.ref = "ktor" }
ktor_server_content_negotiation = { module = "io.ktor:ktor-server-content-negotiation", version.ref = "ktor" }
ktor_client_core = { module = "io.ktor:ktor-client-core", version.ref = "ktor" }
ktor_client_okhttp = { module = "io.ktor:ktor-client-okhttp", version.ref = "ktor" }
ktor_client_content_negotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" }
ktor_serialization_kotlinx_json = { module = "io.ktor:ktor-serialization-kotlinx-json", version.ref = "ktor" }
kotlinx_serialization_json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version = "1.6.3" }
kotlinx_collections_immutable = { module = "org.jetbrains.kotlinx:kotlinx-collections-immutable", version = "0.3.6" }
google_hilt_android = { module = "com.google.dagger:hilt-android", version.ref = "hilt" }
google_hilt_android_compiler = { module = "com.google.dagger:hilt-android-compiler", version.ref = "hilt" }
androidx_hilt_navigation_compose = { module = "androidx.hilt:hilt-navigation-compose", version = "1.2.0" }
destinations_core = { module = "io.github.raamcosta.compose-destinations:core", version.ref = "destinations" }
destinations_ksp = { module = "io.github.raamcosta.compose-destinations:ksp", version.ref = "destinations" }
coil_compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
coil_gif = { module = "io.coil-kt:coil-gif", version.ref = "coil" }
others_reorderable = { module = "sh.calvin.reorderable:reorderable", version = "1.3.3" }
exp4j = { module = "net.objecthunter:exp4j", version = "0.4.8" }
toaster = { module = "com.github.getActivity:Toaster", version = "12.6" }

[plugins]
android_library = { id = "com.android.library", version.ref = "android" }
android_application = { id = "com.android.application", version.ref = "android" }
kotlin_serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotlin_parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" }
kotlin_multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlin_android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
rikka_refine = { id = "dev.rikka.tools.refine", version.ref = "rikka" }
google_ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
google_hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
6 changes: 3 additions & 3 deletions hidden_api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ plugins {

android {
namespace = "li.songe.gkd"
compileSdk = libs.versions.android.compileSdk.get().toInt()
buildToolsVersion = libs.versions.android.buildToolsVersion.get()
compileSdk = libs.versions.compileSdk.get().toInt()
buildToolsVersion = libs.versions.buildToolsVersion.get()

defaultConfig {
minSdk = libs.versions.android.minSdk.get().toInt()
minSdk = libs.versions.minSdk.get().toInt()
}

buildTypes {
Expand Down
187 changes: 0 additions & 187 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,192 +20,5 @@ dependencyResolutionManagement {
google()
maven("https://jitpack.io")
}

versionCatalogs {
create("libs") {
val kotlinVersion = "1.9.22"
// use jdk17
version("jdkVersion", JavaVersion.VERSION_17.majorVersion)
version("kotlinVersion", kotlinVersion)

version("android.compileSdk", "34")
version("android.targetSdk", "34")
version("android.buildToolsVersion", "34.0.0")
version("android.minSdk", "26")

val androidLibraryVersion = "8.2.2"
library("android.gradle", "com.android.tools.build:gradle:$androidLibraryVersion")
plugin("android.library", "com.android.library").version(androidLibraryVersion)
plugin("android.application", "com.android.application").version(androidLibraryVersion)

// 当前 android 项目 kotlin 的版本
library(
"kotlin.gradle.plugin", "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
)
library(
"kotlin.serialization", "org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion"
)
library(
"kotlin.stdlib.common", "org.jetbrains.kotlin:kotlin-stdlib-common:$kotlinVersion"
)
plugin("kotlin.serialization", "org.jetbrains.kotlin.plugin.serialization").version(
kotlinVersion
)
plugin("kotlin.parcelize", "org.jetbrains.kotlin.plugin.parcelize").version(
kotlinVersion
)
plugin("kotlin.multiplatform", "org.jetbrains.kotlin.multiplatform").version(
kotlinVersion
)
plugin("kotlin.android", "org.jetbrains.kotlin.android").version(kotlinVersion)

// compose 编译器的版本, 需要注意它与 compose 的版本没有关联
// https://developer.android.com/jetpack/androidx/releases/compose-compiler
version("compose.compilerVersion", "1.5.10")
val composeVersion = "1.6.3"
library("compose.ui", "androidx.compose.ui:ui:$composeVersion")
library("compose.preview", "androidx.compose.ui:ui-tooling-preview:$composeVersion")
library("compose.tooling", "androidx.compose.ui:ui-tooling:$composeVersion")
library("compose.junit4", "androidx.compose.ui:ui-test-junit4:$composeVersion")
// https://developer.android.com/reference/kotlin/androidx/compose/material/icons/package-summary
// https://fonts.google.com/icons?icon.platform=android
library(
"compose.icons",
"androidx.compose.material:material-icons-extended:$composeVersion"
)
library("compose.material3", "androidx.compose.material3:material3:1.2.1")
library("compose.activity", "androidx.activity:activity-compose:1.8.2")

// https://github.com/Tencent/MMKV/blob/master/README_CN.md
library("tencent.mmkv", "com.tencent:mmkv:1.3.3")

// https://github.com/RikkaApps/HiddenApiRefinePlugin
val rikkaVersion = "4.4.0"
plugin("rikka.refine", "dev.rikka.tools.refine").version(rikkaVersion)
library("rikka.gradle", "dev.rikka.tools.refine:gradle-plugin:$rikkaVersion")
library("rikka.processor", "dev.rikka.tools.refine:annotation-processor:$rikkaVersion")
library("rikka.annotation", "dev.rikka.tools.refine:annotation:$rikkaVersion")
library("rikka.runtime", "dev.rikka.tools.refine:runtime:$rikkaVersion")

// https://github.com/RikkaApps/Shizuku-API
library("rikka.shizuku.api", "dev.rikka.shizuku:api:13.1.5")
library("rikka.shizuku.provider", "dev.rikka.shizuku:provider:13.1.5")

// https://github.com/LSPosed/AndroidHiddenApiBypass
library("lsposed.hiddenapibypass", "org.lsposed.hiddenapibypass:hiddenapibypass:4.3")

// 工具集合类
// https://github.com/Blankj/AndroidUtilCode/blob/master/lib/utilcode/README-CN.md
library("others.utilcodex", "com.blankj:utilcodex:1.31.1")

// https://dylancaicoding.github.io/ActivityResultLauncher/#/
library(
"others.activityResultLauncher",
"com.github.DylanCaiCoding:ActivityResultLauncher:1.1.2"
)
// json5
// https://github.com/falkreon/Jankson
library("others.jankson", "blue.endless:jankson:1.2.3")

// https://github.com/TorryDo/Floating-Bubble-View
library("others.floating.bubble.view", "io.github.torrydo:floating-bubble-view:0.6.4")

library("androidx.appcompat", "androidx.appcompat:appcompat:1.6.1")
library("androidx.core.ktx", "androidx.core:core-ktx:1.12.0")
library(
"androidx.lifecycle.runtime.ktx", "androidx.lifecycle:lifecycle-runtime-ktx:2.7.0"
)
library("androidx.junit", "androidx.test.ext:junit:1.1.5")
library("androidx.espresso", "androidx.test.espresso:espresso-core:3.5.1")

// https://developer.android.com/jetpack/androidx/releases/room
val roomVersion = "2.6.1"
library("androidx.room.runtime", "androidx.room:room-runtime:$roomVersion")
library("androidx.room.compiler", "androidx.room:room-compiler:$roomVersion")
library("androidx.room.ktx", "androidx.room:room-ktx:$roomVersion")
library("androidx.room.paging", "androidx.room:room-paging:$roomVersion")

library("androidx.splashscreen", "androidx.core:core-splashscreen:1.0.1")

val pagingVersion = "3.2.1"
library("androidx.paging.runtime", "androidx.paging:paging-runtime:$pagingVersion")
library("androidx.paging.compose", "androidx.paging:paging-compose:$pagingVersion")

library(
"google.accompanist.drawablepainter",
"com.google.accompanist:accompanist-drawablepainter:0.34.0"
)

library("junit", "junit:junit:4.13.2")

val ktorVersion = "2.3.9"
library("ktor.server.core", "io.ktor:ktor-server-core:$ktorVersion")
library("ktor.server.cio", "io.ktor:ktor-server-cio:$ktorVersion")
library("ktor.server.cors", "io.ktor:ktor-server-cors:$ktorVersion")
library(
"ktor.server.content.negotiation",
"io.ktor:ktor-server-content-negotiation:$ktorVersion"
)
library("ktor.client.core", "io.ktor:ktor-client-core:$ktorVersion")
library("ktor.client.okhttp", "io.ktor:ktor-client-okhttp:$ktorVersion")
// https://ktor.io/docs/http-client-engines.html#android android 平台使用 android 或者 okhttp 都行
library(
"ktor.client.content.negotiation",
"io.ktor:ktor-client-content-negotiation:$ktorVersion"
)
library(
"ktor.serialization.kotlinx.json",
"io.ktor:ktor-serialization-kotlinx-json:$ktorVersion"
)

library(
"kotlinx.serialization.json",
"org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.3"
)

// https://github.com/Kotlin/kotlinx.collections.immutable
// 仍然存在一些限制 kotlinx.serialization https://github.com/Kotlin/kotlinx.collections.immutable/issues/63
library(
"kotlinx.collections.immutable",
"org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.7"
)

plugin("google.ksp", "com.google.devtools.ksp").version("1.9.22-1.0.17")

val hiltVersion = "2.51"
plugin("google.hilt", "com.google.dagger.hilt.android").version(hiltVersion)
library("google.hilt.android", "com.google.dagger:hilt-android:$hiltVersion")
library(
"google.hilt.android.compiler",
"com.google.dagger:hilt-android-compiler:$hiltVersion"
)
library(
"androidx.hilt.navigation.compose", "androidx.hilt:hilt-navigation-compose:1.2.0"
)

// https://github.com/raamcosta/compose-destinations
val destinationsVersion = "1.10.1"
library(
"destinations.core",
"io.github.raamcosta.compose-destinations:core:$destinationsVersion"
)
library(
"destinations.ksp",
"io.github.raamcosta.compose-destinations:ksp:$destinationsVersion"
)

val coilVersion = "2.5.0"
library("coil.compose", "io.coil-kt:coil-compose:$coilVersion")
library("coil.gif", "io.coil-kt:coil-gif:$coilVersion")

// https://github.com/Calvin-LL/Reorderable
library("others.reorderable", "sh.calvin.reorderable:reorderable:1.3.2")

// https://www.objecthunter.net/exp4j/
library("exp4j", "net.objecthunter:exp4j:0.4.8")

library("toaster", "com.github.getActivity:Toaster:12.6")
}
}
}

0 comments on commit b8598cb

Please sign in to comment.