diff --git a/.github/scripts/convert_iconset_to_icns.sh b/.github/scripts/convert_iconset_to_icns.sh new file mode 100755 index 00000000..3e4096f1 --- /dev/null +++ b/.github/scripts/convert_iconset_to_icns.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +src="/Users/artur/AndroidStudioProjects/NoteDelight/iosApp/iosApp/Assets.xcassets/AppIcon.appiconset/1024.png" + +iconset="icon.iconset" +mkdir -p $iconset + +sizes=(16 32 128 256 512) +for size in "${sizes[@]}"; do + convert $src -resize ${size}x${size} $iconset/icon_${size}x${size}.png + convert $src -resize $(($size * 2))x$(($size * 2)) $iconset/icon_${size}x${size}@2x.png +done + +iconutil -c icns $iconset + +#mv $iconset/../icon.icns . +#rm -rf $iconset diff --git a/.github/workflows/desktop.yaml b/.github/workflows/desktop.yaml index 90c92c34..0356823d 100644 --- a/.github/workflows/desktop.yaml +++ b/.github/workflows/desktop.yaml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ ubuntu-latest, macos-latest, windows-latest ] steps: - name: Check out uses: actions/checkout@v2 @@ -33,13 +33,11 @@ jobs: with: java-version: 17 - name: Packaging - run: ./gradlew package - - name: Archive ui-tests-output artifacts - if: ${{ always() }} - uses: actions/upload-artifact@v2 + run: ./gradlew packageReleaseDistributionForCurrentOS #TODO packageRelease + - name: Release + uses: softprops/action-gh-release@v1 with: - name: output-ui-tests-artifacts - path: | - desktop-compose-app/build/compose/binaries/main/deb - desktop-compose-app/build/compose/binaries/main/dmg - desktop-compose-app/build/compose/binaries/main/msi \ No newline at end of file + files: | + desktop-compose-app/build/compose/binaries/main-release/deb/*.deb + desktop-compose-app/build/compose/binaries/main-release/dmg/*.dmg + desktop-compose-app/build/compose/binaries/main-release/msi/*.msi diff --git a/README.md b/README.md index 3ba44187..5c1b4410 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ Supported platforms: [![google_play_badge](screenshoots/badge-google-play.svg)](https://play.google.com/store/apps/details?id=com.softartdev.noteroom) [![app_store_badge](screenshoots/badge-app-store.svg)](https://apps.apple.com/ge/app/note-delight/id6444444290) +github_badge ## ARCHITECTURE 🏛 diff --git a/android-compose-app/src/main/java/com/softartdev/notedelight/MainApplication.kt b/android-compose-app/src/main/java/com/softartdev/notedelight/MainApplication.kt index 1319edb3..2940565b 100644 --- a/android-compose-app/src/main/java/com/softartdev/notedelight/MainApplication.kt +++ b/android-compose-app/src/main/java/com/softartdev/notedelight/MainApplication.kt @@ -2,9 +2,9 @@ package com.softartdev.notedelight import android.app.Application import com.softartdev.notedelight.shared.di.allModules +import com.softartdev.notedelight.shared.util.NapierKoinLogger import com.softartdev.notedelight.util.isInLeakCanaryAnalyzerProcess import com.softartdev.notedelight.util.log.CrashlyticsAntilog -import com.softartdev.notedelight.util.log.NapierKoinLogger import io.github.aakira.napier.DebugAntilog import io.github.aakira.napier.Napier import org.koin.android.ext.koin.androidContext diff --git a/desktop-compose-app/build.gradle.kts b/desktop-compose-app/build.gradle.kts index a9f81250..1db87fba 100644 --- a/desktop-compose-app/build.gradle.kts +++ b/desktop-compose-app/build.gradle.kts @@ -44,8 +44,18 @@ compose { mainClass = "com.softartdev.notedelight.MainKt" nativeDistributions { targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) - packageName = "com.softartdev.notedelight" - packageVersion = "1.0.1" + packageName = "Note Delight" + packageVersion = "1.1.3" + description = "Note app with encryption" + copyright = "© 2023 SoftArtDev" + macOS.iconFile.set(project.file("src/jvmMain/resources/app_icon.icns")) + windows.iconFile.set(project.file("src/jvmMain/resources/app_icon.ico")) + linux.iconFile.set(project.file("src/jvmMain/resources/app_icon.png")) + modules("java.sql") + } + buildTypes.release.proguard { + isEnabled = false //FIXME + configurationFiles.from(project.file("compose-desktop.pro")) } } } diff --git a/desktop-compose-app/compose-desktop.pro b/desktop-compose-app/compose-desktop.pro new file mode 100644 index 00000000..a6b54e27 --- /dev/null +++ b/desktop-compose-app/compose-desktop.pro @@ -0,0 +1,8 @@ +-dontwarn com.** +-dontwarn java.** +-dontwarn javax.** +-dontwarn jdk.** +-dontwarn kotlinx.** +-dontwarn org.** + +-keep class com.arkivanov.decompose.extensions.compose.jetbrains.mainthread.SwingMainThreadChecker diff --git a/desktop-compose-app/src/jvmMain/kotlin/com/softartdev/notedelight/Main.kt b/desktop-compose-app/src/jvmMain/kotlin/com/softartdev/notedelight/Main.kt index 821821dc..ad583576 100644 --- a/desktop-compose-app/src/jvmMain/kotlin/com/softartdev/notedelight/Main.kt +++ b/desktop-compose-app/src/jvmMain/kotlin/com/softartdev/notedelight/Main.kt @@ -13,6 +13,7 @@ import com.arkivanov.decompose.extensions.compose.jetbrains.lifecycle.LifecycleC import com.arkivanov.essenty.lifecycle.LifecycleRegistry import com.softartdev.notedelight.shared.di.allModules import com.softartdev.notedelight.shared.runOnUiThread +import com.softartdev.notedelight.shared.util.NapierKoinLogger import com.softartdev.notedelight.ui.MainRootUI import dev.icerock.moko.resources.desc.desc import io.github.aakira.napier.DebugAntilog @@ -23,7 +24,7 @@ import org.koin.core.logger.Level fun main() { Napier.base(antilog = DebugAntilog()) startKoin { - printLogger(level = Level.DEBUG) + logger(NapierKoinLogger(Level.DEBUG)) modules(allModules) } val lifecycle = LifecycleRegistry() diff --git a/desktop-compose-app/src/jvmMain/resources/app_icon.icns b/desktop-compose-app/src/jvmMain/resources/app_icon.icns new file mode 100644 index 00000000..6f0d2a7b Binary files /dev/null and b/desktop-compose-app/src/jvmMain/resources/app_icon.icns differ diff --git a/desktop-compose-app/src/jvmMain/resources/app_icon.ico b/desktop-compose-app/src/jvmMain/resources/app_icon.ico new file mode 100644 index 00000000..0ea27ee5 Binary files /dev/null and b/desktop-compose-app/src/jvmMain/resources/app_icon.ico differ diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 03fe8426..beec65e0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -4,7 +4,7 @@ targetSdk = "34" minSdk = "21" kotlin = "1.9.20" -agp = "8.1.3" +agp = "8.1.4" gms = "4.3.15" crashlytics = "2.9.8" compose = "1.5.10" diff --git a/ios-compose-kit/build.gradle.kts b/ios-compose-kit/build.gradle.kts index b2d88e0f..0a5d1a43 100644 --- a/ios-compose-kit/build.gradle.kts +++ b/ios-compose-kit/build.gradle.kts @@ -1,3 +1,5 @@ +import org.gradle.internal.os.OperatingSystem + plugins { alias(libs.plugins.kotlin.multiplatform) alias(libs.plugins.kotlin.cocoapods) @@ -26,6 +28,7 @@ kotlin { export(libs.mokoResources) export(libs.koin.core) } + if (!OperatingSystem.current().isMacOsX) noPodspec() } sourceSets { commonMain.dependencies { diff --git a/ios-compose-kit/src/commonMain/kotlin/com/softartdev/notedelight/AppHelper.kt b/ios-compose-kit/src/commonMain/kotlin/com/softartdev/notedelight/AppHelper.kt index d11eeabe..c16a3355 100644 --- a/ios-compose-kit/src/commonMain/kotlin/com/softartdev/notedelight/AppHelper.kt +++ b/ios-compose-kit/src/commonMain/kotlin/com/softartdev/notedelight/AppHelper.kt @@ -10,6 +10,7 @@ import com.arkivanov.essenty.lifecycle.resume import com.arkivanov.essenty.lifecycle.start import com.arkivanov.essenty.lifecycle.stop import com.softartdev.notedelight.shared.di.allModules +import com.softartdev.notedelight.shared.util.NapierKoinLogger import com.softartdev.notedelight.ui.MainRootUI import io.github.aakira.napier.DebugAntilog import io.github.aakira.napier.Napier @@ -25,7 +26,7 @@ class AppHelper { fun appInit() { Napier.base(antilog = DebugAntilog()) startKoin { - printLogger(level = Level.DEBUG) + logger(NapierKoinLogger(Level.DEBUG)) modules(allModules) } } diff --git a/screenshoots/badge-github.webp b/screenshoots/badge-github.webp new file mode 100644 index 00000000..7e3552bc Binary files /dev/null and b/screenshoots/badge-github.webp differ diff --git a/settings.gradle.kts b/settings.gradle.kts index 00d0ed1c..cad9fc54 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -16,6 +16,10 @@ pluginManagement { } } +plugins { + id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0" +} + dependencyResolutionManagement { repositories { google() diff --git a/shared/build.gradle.kts b/shared/build.gradle.kts index 5facb9e2..9893a3d0 100644 --- a/shared/build.gradle.kts +++ b/shared/build.gradle.kts @@ -1,3 +1,4 @@ +import org.gradle.internal.os.OperatingSystem import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation.Companion.MAIN_COMPILATION_NAME import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation.Companion.TEST_COMPILATION_NAME import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet @@ -130,6 +131,7 @@ kotlin { isStatic = true export(libs.mokoResources) } + if (!OperatingSystem.current().isMacOsX) noPodspec() } } sqldelight { diff --git a/android-compose-app/src/main/java/com/softartdev/notedelight/util/log/NapierKoinLogger.kt b/shared/src/commonMain/kotlin/com/softartdev/notedelight/shared/util/NapierKoinLogger.kt similarity index 93% rename from android-compose-app/src/main/java/com/softartdev/notedelight/util/log/NapierKoinLogger.kt rename to shared/src/commonMain/kotlin/com/softartdev/notedelight/shared/util/NapierKoinLogger.kt index debfb826..c4911d61 100644 --- a/android-compose-app/src/main/java/com/softartdev/notedelight/util/log/NapierKoinLogger.kt +++ b/shared/src/commonMain/kotlin/com/softartdev/notedelight/shared/util/NapierKoinLogger.kt @@ -1,4 +1,4 @@ -package com.softartdev.notedelight.util.log +package com.softartdev.notedelight.shared.util import io.github.aakira.napier.Napier import org.koin.core.logger.KOIN_TAG diff --git a/shared/src/jvmMain/kotlin/com/softartdev/notedelight/shared/db/JdbcDatabaseHolder.kt b/shared/src/jvmMain/kotlin/com/softartdev/notedelight/shared/db/JdbcDatabaseHolder.kt index 49e850a0..7c806484 100644 --- a/shared/src/jvmMain/kotlin/com/softartdev/notedelight/shared/db/JdbcDatabaseHolder.kt +++ b/shared/src/jvmMain/kotlin/com/softartdev/notedelight/shared/db/JdbcDatabaseHolder.kt @@ -28,7 +28,9 @@ class JdbcDatabaseHolder(props: Properties = Properties()) : DatabaseHolder() { try { NoteDb.Schema.create(driver) } catch (sqlException: SQLException) { - Napier.e("Error creating database", sqlException) + Napier.e(message = sqlException.localizedMessage) + } catch (t: Throwable) { + Napier.e(message = "Error creating database schema", throwable = t) } currentVersion = 1 } else if (NoteDb.Schema.version > currentVersion) {