diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index 90c3d0e1..9870e198 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -189,7 +189,7 @@ compose.desktop { nativeDistributions { targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb) packageName = "Hush Timer" - packageVersion = "1.0.3" + packageVersion = "1.2.0" linux { iconFile.set(project.file("desktopAppIcons/LinuxIcon.png")) @@ -217,7 +217,8 @@ if (localPropertiesFile.exists()) { } } -val isReleaseBuild = project.hasProperty("mode") && project.property("mode") == "release" +val flavor = project.findProperty("buildkonfig.flavor")?.toString() +val isReleaseBuild = flavor == "release" || (project.hasProperty("mode") && project.property("mode") == "release") fun getSecret( key: String, diff --git a/composeApp/src/androidMain/kotlin/com/rickyhu/hushtimer/core/domain/Const.android.kt b/composeApp/src/androidMain/kotlin/com/rickyhu/hushtimer/core/domain/Const.android.kt index 2a7d3505..d97f8a63 100644 --- a/composeApp/src/androidMain/kotlin/com/rickyhu/hushtimer/core/domain/Const.android.kt +++ b/composeApp/src/androidMain/kotlin/com/rickyhu/hushtimer/core/domain/Const.android.kt @@ -1,3 +1,5 @@ package com.rickyhu.hushtimer.core.domain actual fun getAppUpdateUrl(): String = "https://play.google.com/store/apps/details?id=com.rickyhu.hushtimer.androidApp" + +actual fun showSupportButton(): Boolean = true diff --git a/composeApp/src/commonMain/kotlin/com/rickyhu/hushtimer/core/domain/ChangelogData.kt b/composeApp/src/commonMain/kotlin/com/rickyhu/hushtimer/core/domain/ChangelogData.kt index 62762f1f..1cfc9fb8 100644 --- a/composeApp/src/commonMain/kotlin/com/rickyhu/hushtimer/core/domain/ChangelogData.kt +++ b/composeApp/src/commonMain/kotlin/com/rickyhu/hushtimer/core/domain/ChangelogData.kt @@ -10,6 +10,17 @@ data class VersionChangelog( object ChangelogData { private val changelogs = listOf( + VersionChangelog( + version = Version(1, 2, 0), + changes = + listOf( + "Improve scramble generation speed", + "UI improvement for scramble preview", + "Keep screen awake during timer runs", + "Check for updates automatically and notify users of new versions", + "Add Libraries screen in Settings page to show open-source libraries", + ), + ), VersionChangelog( version = Version(1, 1, 0), changes = diff --git a/composeApp/src/commonMain/kotlin/com/rickyhu/hushtimer/core/domain/Const.kt b/composeApp/src/commonMain/kotlin/com/rickyhu/hushtimer/core/domain/Const.kt index 18520805..f4847645 100644 --- a/composeApp/src/commonMain/kotlin/com/rickyhu/hushtimer/core/domain/Const.kt +++ b/composeApp/src/commonMain/kotlin/com/rickyhu/hushtimer/core/domain/Const.kt @@ -12,4 +12,6 @@ const val DEFAULT_SESSION_ID = 1 expect fun getAppUpdateUrl(): String +expect fun showSupportButton(): Boolean + const val SUPPORT_URL = "https://buymeacoffee.com/ricky9667" diff --git a/composeApp/src/commonMain/kotlin/com/rickyhu/hushtimer/settings/presentation/SettingsScreen.kt b/composeApp/src/commonMain/kotlin/com/rickyhu/hushtimer/settings/presentation/SettingsScreen.kt index 67e7cb5f..7481f555 100644 --- a/composeApp/src/commonMain/kotlin/com/rickyhu/hushtimer/settings/presentation/SettingsScreen.kt +++ b/composeApp/src/commonMain/kotlin/com/rickyhu/hushtimer/settings/presentation/SettingsScreen.kt @@ -26,6 +26,7 @@ import androidx.compose.ui.Modifier import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.architect.kmpessentials.launcher.KmpLauncher import com.rickyhu.hushtimer.core.domain.SUPPORT_URL +import com.rickyhu.hushtimer.core.domain.showSupportButton import com.rickyhu.hushtimer.core.presentation.ChangelogDialogForVersion import com.rickyhu.hushtimer.settings.domain.options.PenaltyControlType import com.rickyhu.hushtimer.settings.presentation.components.ColorSettingsDropdownTile @@ -222,16 +223,18 @@ fun SettingsScreen( modifier = Modifier.clickable { onLibrariesClick() }, ) - ListItem( - headlineContent = { Text(stringResource(Res.string.support)) }, - leadingContent = { - Icon( - vectorResource(Res.drawable.ic_favorite), - contentDescription = "Support icon", - ) - }, - modifier = Modifier.clickable { KmpLauncher.launchExternalUrlViaBrowser(SUPPORT_URL) }, - ) + if (showSupportButton()) { + ListItem( + headlineContent = { Text(stringResource(Res.string.support)) }, + leadingContent = { + Icon( + vectorResource(Res.drawable.ic_favorite), + contentDescription = "Support icon", + ) + }, + modifier = Modifier.clickable { KmpLauncher.launchExternalUrlViaBrowser(SUPPORT_URL) }, + ) + } } } diff --git a/composeApp/src/iosMain/kotlin/com/rickyhu/hushtimer/core/domain/Const.ios.kt b/composeApp/src/iosMain/kotlin/com/rickyhu/hushtimer/core/domain/Const.ios.kt index 7ae4910f..bd14ad52 100644 --- a/composeApp/src/iosMain/kotlin/com/rickyhu/hushtimer/core/domain/Const.ios.kt +++ b/composeApp/src/iosMain/kotlin/com/rickyhu/hushtimer/core/domain/Const.ios.kt @@ -2,3 +2,5 @@ package com.rickyhu.hushtimer.core.domain // TODO: replace with App Store URL after released actual fun getAppUpdateUrl(): String = "https://hushtimer.app" + +actual fun showSupportButton(): Boolean = false diff --git a/composeApp/src/jvmMain/kotlin/com/rickyhu/hushtimer/core/domain/AppVersionImpl.jvm.kt b/composeApp/src/jvmMain/kotlin/com/rickyhu/hushtimer/core/domain/AppVersionImpl.jvm.kt index 014566c8..52ba5d22 100644 --- a/composeApp/src/jvmMain/kotlin/com/rickyhu/hushtimer/core/domain/AppVersionImpl.jvm.kt +++ b/composeApp/src/jvmMain/kotlin/com/rickyhu/hushtimer/core/domain/AppVersionImpl.jvm.kt @@ -3,13 +3,13 @@ package com.rickyhu.hushtimer.core.domain import io.github.z4kn4fein.semver.Version class AppVersionImpl : AppVersion { - override fun getVersionName(): Version? { + override fun getVersionName(): Version { // NOTE: Update this when changing packageVersion in build.gradle.kts desktop configuration - return Version(1, 0, 4) + return Version(1, 2, 0) } override fun getVersionCode(): Int { // NOTE: Update this when changing versionCode in build.gradle.kts android configuration - return 5 + return 6 } } diff --git a/composeApp/src/jvmMain/kotlin/com/rickyhu/hushtimer/core/domain/Const.jvm.kt b/composeApp/src/jvmMain/kotlin/com/rickyhu/hushtimer/core/domain/Const.jvm.kt index ec07b7a6..a43873a2 100644 --- a/composeApp/src/jvmMain/kotlin/com/rickyhu/hushtimer/core/domain/Const.jvm.kt +++ b/composeApp/src/jvmMain/kotlin/com/rickyhu/hushtimer/core/domain/Const.jvm.kt @@ -1,3 +1,5 @@ package com.rickyhu.hushtimer.core.domain actual fun getAppUpdateUrl(): String = "https://hushtimer.app" + +actual fun showSupportButton(): Boolean = true diff --git a/gradle.properties b/gradle.properties index ad5d594d..c3732c9c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -31,8 +31,11 @@ android.generateSyncIssueWhenLibraryConstraintsAreEnabled=false org.jetbrains.compose.experimental.jscanvas.enabled=true #Release Version -appVersionName=1.1.0 -appBuildNumber=5 +appVersionName=1.2.0 +appBuildNumber=7 + +#Build Flavor (only change to release when you want to publish a release build) +buildkonfig.flavor=debug kotlin.mpp.enableCInteropCommonization.nowarn=true kotlin.mpp.enableCInteropCommonization=true diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 74f342e6..215d57e7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -23,7 +23,7 @@ kotlinx-coroutines = "1.10.2" kotlinx-datetime = "0.7.1" kotlinx-serialization = "1.10.0" ksp = "2.3.4" -material-kolor = "4.1.0" +material-kolor = "4.1.1" multiplatform-settings = "1.3.0" navigation-compose = "2.9.1" room = "2.8.4" diff --git a/iosApp/Versions.xcconfig b/iosApp/Versions.xcconfig index fca25ec4..27ec39a0 100644 --- a/iosApp/Versions.xcconfig +++ b/iosApp/Versions.xcconfig @@ -1,3 +1,3 @@ // GENERATED FILE - DO NOT EDIT -MARKETING_VERSION = 1.1.0 -CURRENT_PROJECT_VERSION = 5 +MARKETING_VERSION = 1.2.0 +CURRENT_PROJECT_VERSION = 7 diff --git a/iosApp/iosApp.xcodeproj/project.pbxproj b/iosApp/iosApp.xcodeproj/project.pbxproj index 3084f9fe..99a19d03 100644 --- a/iosApp/iosApp.xcodeproj/project.pbxproj +++ b/iosApp/iosApp.xcodeproj/project.pbxproj @@ -16,21 +16,8 @@ A93A953F29CC810D00F8E227 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A93A953E29CC810D00F8E227 /* Assets.xcassets */; }; A93A954229CC810D00F8E227 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = A93A954129CC810D00F8E227 /* Preview Assets.xcassets */; }; E18A4C532F23149800FA27BC /* TNoodle.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = E18A4C512F23149200FA27BC /* TNoodle.xcframework */; }; - E18A4C542F23149800FA27BC /* TNoodle.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E18A4C512F23149200FA27BC /* TNoodle.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ -/* Begin PBXCopyFilesBuildPhase section */ - E18BD1AF2F116BC800244547 /* Embed Frameworks */ = { - isa = PBXCopyFilesBuildPhase; - dstPath = ""; - dstSubfolder = Frameworks; - files = ( - E18A4C542F23149800FA27BC /* TNoodle.xcframework in Embed Frameworks */, - ); - name = "Embed Frameworks"; - }; -/* End PBXCopyFilesBuildPhase section */ - /* Begin PBXFileReference section */ A2E8B6332EB353420091921A /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = ""; }; A93A953729CC810C00F8E227 /* Hush Timer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Hush Timer.app"; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -46,10 +33,10 @@ A93A953429CC810C00F8E227 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; files = ( + E18A4C532F23149800FA27BC /* TNoodle.xcframework in Frameworks */, A2E8B6372EB354980091921A /* FirebaseAnalytics in Frameworks */, A2E8B63D2EB354980091921A /* FirebaseCrashlytics in Frameworks */, A2E8B63B2EB354980091921A /* FirebaseCore in Frameworks */, - E18A4C532F23149800FA27BC /* TNoodle.xcframework in Frameworks */, A2E8B6392EB354980091921A /* FirebaseAnalyticsCore in Frameworks */, ); }; @@ -115,7 +102,6 @@ A93A953529CC810C00F8E227 /* Resources */, D8F134DBF3B24C6E9849CF36 /* Sync Version Info */, A2E8B63E2EB3581E0091921A /* Run Script */, - E18BD1AF2F116BC800244547 /* Embed Frameworks */, ); buildRules = ( ); @@ -389,10 +375,12 @@ CFBundleShortVersionString = "$(MARKETING_VERSION)"; CFBundleVersion = "$(CURRENT_PROJECT_VERSION)"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++23"; - CODE_SIGN_STYLE = Automatic; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; + CODE_SIGN_STYLE = Manual; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; - DEVELOPMENT_TEAM = 6838583E88; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8DPH862SRB; DRIVERKIT_DEPLOYMENT_TARGET = 25.0; ENABLE_PREVIEWS = YES; FRAMEWORK_SEARCH_PATHS = ""; @@ -417,8 +405,10 @@ "-framework", Security, ); - PRODUCT_BUNDLE_IDENTIFIER = com.rickyhu.hushtimer.iosApp; + PRODUCT_BUNDLE_IDENTIFIER = com.rickyhu.hushtimer; PRODUCT_NAME = "Hush Timer"; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = HUSH_Timer_AppStore_Profile; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_OBJC_INTEROP_MODE = objcxx; SWIFT_STRICT_MEMORY_SAFETY = YES; @@ -441,9 +431,11 @@ CFBundleShortVersionString = "$(MARKETING_VERSION)"; CFBundleVersion = "$(CURRENT_PROJECT_VERSION)"; CLANG_CXX_LANGUAGE_STANDARD = "gnu++23"; - CODE_SIGN_STYLE = Automatic; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; + CODE_SIGN_STYLE = Manual; DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\""; - DEVELOPMENT_TEAM = 6838583E88; + DEVELOPMENT_TEAM = ""; + "DEVELOPMENT_TEAM[sdk=iphoneos*]" = 8DPH862SRB; DRIVERKIT_DEPLOYMENT_TARGET = 25.0; ENABLE_PREVIEWS = YES; FRAMEWORK_SEARCH_PATHS = ""; @@ -468,8 +460,10 @@ "-framework", Security, ); - PRODUCT_BUNDLE_IDENTIFIER = com.rickyhu.hushtimer.iosApp; + PRODUCT_BUNDLE_IDENTIFIER = com.rickyhu.hushtimer; PRODUCT_NAME = "Hush Timer"; + PROVISIONING_PROFILE_SPECIFIER = ""; + "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = HUSH_Timer_AppStore_Profile; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_OBJC_INTEROP_MODE = objcxx; SWIFT_STRICT_MEMORY_SAFETY = YES;