diff --git a/app/desktop/src/jvmMain/kotlin/dev/datlag/burningseries/Main.kt b/app/desktop/src/jvmMain/kotlin/dev/datlag/burningseries/Main.kt index 0bf1dafa..9ca06b51 100644 --- a/app/desktop/src/jvmMain/kotlin/dev/datlag/burningseries/Main.kt +++ b/app/desktop/src/jvmMain/kotlin/dev/datlag/burningseries/Main.kt @@ -19,7 +19,7 @@ import com.arkivanov.essenty.lifecycle.LifecycleRegistry import dev.datlag.burningseries.common.lifecycle.LocalLifecycleOwner import dev.datlag.burningseries.model.common.systemProperty import dev.datlag.burningseries.module.NetworkModule -import dev.datlag.burningseries.shared.SharedRes +import dev.datlag.burningseries.SharedRes import dev.datlag.burningseries.ui.navigation.NavHostComponent import dev.datlag.burningseries.window.disposableSingleWindowApplication import dev.datlag.sekret.NativeLoader diff --git a/app/shared/build.gradle.kts b/app/shared/build.gradle.kts index 53479ca2..e9a953aa 100644 --- a/app/shared/build.gradle.kts +++ b/app/shared/build.gradle.kts @@ -145,7 +145,7 @@ aboutLibraries { } val createNativeLib = tasks.create("createNativeLib") { - dependsOn("sekret:assemble") + dependsOn(tasks.generateSekret, "sekret:assemble") fun getBinPath(target: String): String? { val buildDir = project("sekret").layout.buildDirectory.asFile.get() @@ -158,97 +158,99 @@ val createNativeLib = tasks.create("createNativeLib") { } } - val androidArm32 = getBinPath("androidNativeArm32") - val androidArm64 = getBinPath("androidNativeArm64") - val androidX64 = getBinPath("androidNativeX64") - val androidX86 = getBinPath("androidNativeX86") + doLast { + val androidArm32 = getBinPath("androidNativeArm32") + val androidArm64 = getBinPath("androidNativeArm64") + val androidX64 = getBinPath("androidNativeX64") + val androidX86 = getBinPath("androidNativeX86") - if (androidArm32 != null) { - copy { - from(androidArm32) { - exclude("*.h") - exclude("*.def") + if (androidArm32 != null) { + copy { + from(androidArm32) { + exclude("*.h") + exclude("*.def") + } + into("../android/src/androidMain/jniLibs/armeabi-v7a") } - into("../android/src/androidMain/jniLibs/armeabi-v7a") } - } - if (androidArm64 != null) { - copy { - from(androidArm64) { - exclude("*.h") - exclude("*.def") + if (androidArm64 != null) { + copy { + from(androidArm64) { + exclude("*.h") + exclude("*.def") + } + into("../android/src/androidMain/jniLibs/arm64-v8a") } - into("../android/src/androidMain/jniLibs/arm64-v8a") } - } - if (androidX64 != null) { - copy { - from(androidX64) { - exclude("*.h") - exclude("*.def") + if (androidX64 != null) { + copy { + from(androidX64) { + exclude("*.h") + exclude("*.def") + } + into("../android/src/androidMain/jniLibs/x86_64") } - into("../android/src/androidMain/jniLibs/x86_64") } - } - if (androidX86 != null) { - copy { - from(androidX86) { - exclude("*.h") - exclude("*.def") + if (androidX86 != null) { + copy { + from(androidX86) { + exclude("*.h") + exclude("*.def") + } + into("../android/src/androidMain/jniLibs/x86") } - into("../android/src/androidMain/jniLibs/x86") } - } - val linuxArm64 = getBinPath("linuxArm64") - val linuxX64 = getBinPath("linuxX64") - val mingwX64 = getBinPath("mingwX64") - val macosArm64 = getBinPath("macosArm64") - val macosX64 = getBinPath("macosX64") - - if (linuxArm64 != null) { - copy { - from(linuxArm64) { - exclude("*.h") - exclude("*.def") + val linuxArm64 = getBinPath("linuxArm64") + val linuxX64 = getBinPath("linuxX64") + val mingwX64 = getBinPath("mingwX64") + val macosArm64 = getBinPath("macosArm64") + val macosX64 = getBinPath("macosX64") + + if (linuxArm64 != null) { + copy { + from(linuxArm64) { + exclude("*.h") + exclude("*.def") + } + into("../desktop/resources/linux-arm64") } - into("../desktop/resources/linux-arm64") } - } - if (linuxX64 != null) { - copy { - from(linuxX64) { - exclude("*.h") - exclude("*.def") + if (linuxX64 != null) { + copy { + from(linuxX64) { + exclude("*.h") + exclude("*.def") + } + into("../desktop/resources/linux-x64") } - into("../desktop/resources/linux-x64") } - } - if (mingwX64 != null) { - copy { - from(mingwX64) { - exclude("*.h") - exclude("*.def") + if (mingwX64 != null) { + copy { + from(mingwX64) { + exclude("*.h") + exclude("*.def") + } + into("../desktop/resources/windows") } - into("../desktop/resources/windows") } - } - if (macosArm64 != null) { - copy { - from(macosArm64) { - exclude("*.h") - exclude("*.def") + if (macosArm64 != null) { + copy { + from(macosArm64) { + exclude("*.h") + exclude("*.def") + } + into("../desktop/resources/macos-arm64") } - into("../desktop/resources/macos-arm64") } - } - if (macosX64 != null) { - copy { - from(macosX64) { - exclude("*.h") - exclude("*.def") + if (macosX64 != null) { + copy { + from(macosX64) { + exclude("*.h") + exclude("*.def") + } + into("../desktop/resources/macos-x64") } - into("../desktop/resources/macos-x64") } } } \ No newline at end of file diff --git a/app/shared/sekret/build.gradle.kts b/app/shared/sekret/build.gradle.kts index cad14429..cec4e4f2 100644 --- a/app/shared/sekret/build.gradle.kts +++ b/app/shared/sekret/build.gradle.kts @@ -79,7 +79,7 @@ kotlin { sourceSets { val commonMain by getting { dependencies { - api("dev.datlag.sekret:sekret:0.1.0") + api(libs.sekret) } } val jniNativeMain by creating { diff --git a/app/shared/src/desktopMain/kotlin/dev/datlag/burningseries/PackageName.desktop.kt b/app/shared/src/desktopMain/kotlin/dev/datlag/burningseries/PackageName.desktop.kt index 1b37c6b6..7e0e99bd 100644 --- a/app/shared/src/desktopMain/kotlin/dev/datlag/burningseries/PackageName.desktop.kt +++ b/app/shared/src/desktopMain/kotlin/dev/datlag/burningseries/PackageName.desktop.kt @@ -4,7 +4,7 @@ package dev.datlag.burningseries actual fun getPackageName(): String { val clazz = AppIO::class - return clazz.java.packageName.ifBlank { null } ?: run { + return (clazz.java.packageName.ifBlank { null } ?: run { var cutPackage = (clazz.qualifiedName ?: clazz.java.canonicalName).substringBeforeLast(clazz.simpleName ?: clazz.java.simpleName) if (cutPackage.startsWith('.')) { @@ -15,5 +15,5 @@ actual fun getPackageName(): String { } cutPackage - } + }).trim() } \ No newline at end of file diff --git a/app/shared/src/desktopMain/kotlin/dev/datlag/burningseries/ui/screen/initial/home/component/DeviceContent.desktop.kt b/app/shared/src/desktopMain/kotlin/dev/datlag/burningseries/ui/screen/initial/home/component/DeviceContent.desktop.kt index 18293300..e14a050a 100644 --- a/app/shared/src/desktopMain/kotlin/dev/datlag/burningseries/ui/screen/initial/home/component/DeviceContent.desktop.kt +++ b/app/shared/src/desktopMain/kotlin/dev/datlag/burningseries/ui/screen/initial/home/component/DeviceContent.desktop.kt @@ -15,7 +15,7 @@ import dev.datlag.burningseries.common.LocalRestartRequired import dev.datlag.burningseries.common.header import dev.datlag.burningseries.other.CEFState import dev.datlag.burningseries.other.LocalCEFInitialization -import dev.datlag.burningseries.shared.SharedRes +import dev.datlag.burningseries.SharedRes import dev.datlag.burningseries.window.ApplicationDisposer import dev.icerock.moko.resources.compose.stringResource diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index d6d9a32c..ed38aaac 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,7 +2,7 @@ app = "5.0.0" aboutlibraries = "10.9.2" accompanist = "0.32.0" -activity = "1.8.0" +activity = "1.8.1" android = "8.1.3" android-core = "1.12.0" appcompat = "1.6.1" @@ -23,7 +23,7 @@ kodein = "7.20.2" kotlin = "1.9.20" ksp = "1.9.20-1.0.14" ktor = "2.3.6" -ktorfit = "1.10.0" +ktorfit = "1.10.1" ktsoup = "0.3.0" lang = "3.13.0" material = "1.10.0" @@ -34,8 +34,8 @@ osdetector = "1.7.3" parcelable = "1.2.0" protobuf = "0.9.4" protoc = "3.24.4" -realm = "1.11.0" -sekret = "0.1.0" +realm = "1.12.0" +sekret = "0.1.1" serialization-json = "1.6.0" splashscreen = "1.0.1" sqldelight = "2.0.0" @@ -94,6 +94,7 @@ protobuf = { group = "com.google.protobuf", name = "protobuf-kotlin", version.re protoc = { group = "com.google.protobuf", name = "protoc", version.ref = "protoc" } realm = { group = "io.realm.kotlin", name = "library-base", version.ref = "realm" } realm-sync = { group = "io.realm.kotlin", name = "library-sync", version.ref = "realm" } +sekret = { group = "dev.datlag.sekret", name = "sekret", version.ref = "sekret" } serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "serialization-json" } splashscreen = { group = "androidx.core", name = "core-splashscreen", version.ref = "splashscreen" } stdlib = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" }