Add app icons for desktop

This commit is contained in:
Christian Basler
2025-05-30 06:06:51 +02:00
parent 935115ca65
commit fe45a0255c
8 changed files with 20 additions and 25 deletions

View File

@@ -35,8 +35,8 @@ android {
} }
compileOptions { compileOptions {
sourceCompatibility = JavaVersion.VERSION_11 sourceCompatibility = JavaVersion.toVersion(libs.versions.jdk.get())
targetCompatibility = JavaVersion.VERSION_11 targetCompatibility = JavaVersion.toVersion(libs.versions.jdk.get())
} }
buildTypes { buildTypes {
@@ -51,7 +51,7 @@ android {
} }
} }
kotlinOptions { kotlinOptions {
jvmTarget = "11" jvmTarget = libs.versions.jdk.get()
} }
} }
dependencies { dependencies {

View File

@@ -17,7 +17,7 @@ plugins {
tasks.withType<KotlinJvmCompile>().configureEach { tasks.withType<KotlinJvmCompile>().configureEach {
compilerOptions { compilerOptions {
jvmTarget.set(JvmTarget.JVM_11) jvmTarget.set(JvmTarget.fromTarget(libs.versions.jdk.get()))
} }
} }

View File

@@ -7,7 +7,7 @@ plugins {
} }
kotlin { kotlin {
jvmToolchain(11) jvmToolchain(libs.versions.jdk.get().toInt())
dependencies { dependencies {
implementation(compose.desktop.currentOs) implementation(compose.desktop.currentOs)
@@ -29,13 +29,22 @@ compose.desktop {
nativeDistributions { nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "ch.dissem.yaep" packageName = "YAEP"
packageVersion = "1.0.0" packageVersion = "1.0.0"
macOS {
iconFile.set(project.file("icon.icns"))
}
windows {
iconFile.set(project.file("icon.ico"))
}
linux {
iconFile.set(project.file("icon.png"))
}
buildTypes.release.proguard { buildTypes.release.proguard {
configurationFiles.from(project.file("proguard-rules.pro")) configurationFiles.from(project.file("proguard-rules.pro"))
isEnabled.set(true) isEnabled.set(false)
obfuscate.set(true) obfuscate.set(false)
} }
} }
} }

BIN
desktop/icon.icns Normal file

Binary file not shown.

BIN
desktop/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
desktop/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 174 KiB

View File

@@ -65,20 +65,6 @@ internal fun solve(
} catch (_: UnsolvablePuzzleException) { } catch (_: UnsolvablePuzzleException) {
return NO_SOLUTION return NO_SOLUTION
} }
// TODO: this breaks stuff and is probably unnecessary, but further tests might be needed
// grid.forEach { row -> row.forEach { cell -> row.cleanupOptions(cell) } }
// grid.forEach { row ->
// row.filter { it.selection == null && it.options.size in 2..row.size / 2 }
// .groupBy { cell -> cell.options }
// .filter { it.value.size == it.key.size }
// .forEach { entry ->
// val groupOptions = entry.key
// val group = entry.value
// println("removing options for group ${groupOptions.map { it.symbol }}")
// row.filter { !group.contains(it) }
// .forEach { it.options.removeAll(groupOptions) }
// }
// }
grid.cleanupOptions() grid.cleanupOptions()
} while (removedOptions) } while (removedOptions)

View File

@@ -5,7 +5,7 @@ android-compileSdk = "35"
android-minSdk = "24" android-minSdk = "24"
android-targetSdk = "35" android-targetSdk = "35"
androidx-activityCompose = "1.10.1" androidx-activityCompose = "1.10.1"
androidx-compose = "1.8.1" androidx-compose = "1.8.2"
compose-plugin = "1.7.0" compose-plugin = "1.7.0"
kotlin = "2.1.21" kotlin = "2.1.21"
coreKtx = "1.16.0" coreKtx = "1.16.0"
@@ -18,9 +18,9 @@ androidx-compose-foundation = { module = "androidx.compose.foundation:foundation
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
atrium = { module = "ch.tutteli.atrium:atrium-fluent", version.ref = "atrium" } atrium = { module = "ch.tutteli.atrium:atrium-fluent", version.ref = "atrium" }
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" } androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "coreKtx" }
kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.10.1" } kotlinx-coroutines = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version = "1.10.2" }
logging-jvm = { module = "io.github.oshai:kotlin-logging-jvm", version = "7.0.7" } logging-jvm = { module = "io.github.oshai:kotlin-logging-jvm", version = "7.0.7" }
logging-slf4j = { module = "org.slf4j:slf4j-simple", version = "2.0.13" } logging-slf4j = { module = "org.slf4j:slf4j-simple", version = "2.0.17" }
[bundles] [bundles]
logging = [ "logging-jvm", "logging-slf4j" ] logging = [ "logging-jvm", "logging-slf4j" ]