Skip to content

Commit

Permalink
releasing desktop app
Browse files Browse the repository at this point in the history
  • Loading branch information
softartdev committed Nov 24, 2023
1 parent f10c0bd commit 456ce1d
Show file tree
Hide file tree
Showing 17 changed files with 65 additions and 18 deletions.
17 changes: 17 additions & 0 deletions .github/scripts/convert_iconset_to_icns.sh
Original file line number Diff line number Diff line change
@@ -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
18 changes: 8 additions & 10 deletions .github/workflows/desktop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
<a href="https://github.com/softartdev/NoteDelight/releases"><img src="screenshoots/badge-github.webp" alt="github_badge" height="40"></a>

## ARCHITECTURE 🏛

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 12 additions & 2 deletions desktop-compose-app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
}
}
}
Expand Down
8 changes: 8 additions & 0 deletions desktop-compose-app/compose-desktop.pro
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions ios-compose-kit/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import org.gradle.internal.os.OperatingSystem

plugins {
alias(libs.plugins.kotlin.multiplatform)
alias(libs.plugins.kotlin.cocoapods)
Expand Down Expand Up @@ -26,6 +28,7 @@ kotlin {
export(libs.mokoResources)
export(libs.koin.core)
}
if (!OperatingSystem.current().isMacOsX) noPodspec()
}
sourceSets {
commonMain.dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -25,7 +26,7 @@ class AppHelper {
fun appInit() {
Napier.base(antilog = DebugAntilog())
startKoin {
printLogger(level = Level.DEBUG)
logger(NapierKoinLogger(Level.DEBUG))
modules(allModules)
}
}
Expand Down
Binary file added screenshoots/badge-github.webp
Binary file not shown.
4 changes: 4 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ pluginManagement {
}
}

plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
}

dependencyResolutionManagement {
repositories {
google()
Expand Down
2 changes: 2 additions & 0 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -130,6 +131,7 @@ kotlin {
isStatic = true
export(libs.mokoResources)
}
if (!OperatingSystem.current().isMacOsX) noPodspec()
}
}
sqldelight {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 456ce1d

Please sign in to comment.