mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 01:08:50 -06:00
Compare commits
10 Commits
245b0eb4d6
...
66fa56ea62
| Author | SHA1 | Date | |
|---|---|---|---|
| 66fa56ea62 | |||
| 951dabea8b | |||
| 76b9dd8bd9 | |||
| f68510f860 | |||
|
|
cc720e3dcb | ||
|
|
6e3d06cff9 | ||
|
|
d458cbd47a | ||
|
|
74ce269446 | ||
|
|
9eb8624863 | ||
|
|
c4bc301fb2 |
@@ -1,23 +1,11 @@
|
||||
plugins {
|
||||
val kotlinVersion = "2.1.10"
|
||||
id("com.android.application") version "8.8.0" apply (false)
|
||||
id("org.jetbrains.kotlin.android") version kotlinVersion apply (false)
|
||||
id("org.jetbrains.kotlin.kapt") version kotlinVersion apply (false)
|
||||
id("org.jetbrains.kotlin.multiplatform") version kotlinVersion apply (false)
|
||||
id("org.jlleitschuh.gradle.ktlint") version "11.6.1"
|
||||
alias(libs.plugins.agp) apply false
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
alias(libs.plugins.ksp) apply false
|
||||
alias(libs.plugins.ktlint.plugin) apply false
|
||||
alias(libs.plugins.shadow) apply false
|
||||
}
|
||||
|
||||
apply {
|
||||
from("translators.gradle.kts")
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
maven(url = "https://plugins.gradle.org/m2/")
|
||||
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
|
||||
maven(url = "https://jitpack.io")
|
||||
maven(url = "https://maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-js-wrappers/") // Repository for kotlin-css-jvm old versions, now that the Gradle Plugin Portal no longer brings these in by mirroring JCenter
|
||||
}
|
||||
from("gradle/translators.gradle.kts")
|
||||
}
|
||||
|
||||
@@ -6,3 +6,6 @@ android.enableJetifier=true
|
||||
android.defaults.buildfeatures.buildconfig=true
|
||||
android.nonTransitiveRClass=false
|
||||
android.nonFinalResIds=false
|
||||
org.gradle.configureondemand=true
|
||||
org.gradle.warning.mode=all
|
||||
org.gradle.caching=true
|
||||
102
gradle/libs.versions.toml
Normal file
102
gradle/libs.versions.toml
Normal file
@@ -0,0 +1,102 @@
|
||||
[versions]
|
||||
agp = "8.8.0"
|
||||
annotation = "1.9.1"
|
||||
appcompat = "1.7.0"
|
||||
appintro = "6.3.1"
|
||||
commonsCodec = "1.16.0"
|
||||
commonsIo = "1.3.2"
|
||||
commonsLang3 = "3.14.0"
|
||||
dagger = "2.55"
|
||||
desugar = "2.1.4"
|
||||
dexmaker = "2.28.3"
|
||||
espresso = "3.6.1"
|
||||
guava = "33.2.1-android"
|
||||
hamcrest = "2.2"
|
||||
jsr250 = "1.0"
|
||||
jsr305 = "3.0.2"
|
||||
junit = "1.2.1"
|
||||
junitJupiter = "5.10.1"
|
||||
junitVersion = "4.13.2"
|
||||
konfetti-xml = "2.0.2"
|
||||
kotlin = "2.1.10"
|
||||
kotlinxCoroutinesCoreCommon = "1.3.8"
|
||||
ksp = "2.1.10-1.0.30"
|
||||
ktlint-plugin = "11.6.1"
|
||||
ktor = "1.6.8"
|
||||
ktxCoroutine = "1.10.1"
|
||||
legacy-support = "1.0.0"
|
||||
material = "1.12.0"
|
||||
mockito-kotlin = "5.4.0"
|
||||
opencsv = "5.9"
|
||||
rules = "1.6.1"
|
||||
shadow = "8.1.1"
|
||||
sqliteJdbc = "3.45.1.0"
|
||||
uiautomator = "2.3.0"
|
||||
|
||||
[libraries]
|
||||
annotation = { group = "androidx.annotation", name = "annotation", version.ref = "annotation" }
|
||||
appIntro = { group = "com.github.AppIntro", name = "AppIntro", version.ref = "appintro" }
|
||||
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
|
||||
commons-codec = { module = "commons-codec:commons-codec", version.ref = "commonsCodec" }
|
||||
commons-io = { module = "org.apache.commons:commons-io", version.ref = "commonsIo" }
|
||||
commons-lang3 = { module = "org.apache.commons:commons-lang3", version.ref = "commonsLang3" }
|
||||
dagger = { group = "com.google.dagger", name = "dagger", version.ref = "dagger" }
|
||||
dagger-compiler = { group = "com.google.dagger", name = "dagger-compiler", version.ref = "dagger" }
|
||||
desugar_jdk_libs = { group = "com.android.tools", name = "desugar_jdk_libs", version.ref = "desugar" }
|
||||
dexmaker-mockito = { group = "com.linkedin.dexmaker", name = "dexmaker-mockito", version.ref = "dexmaker" }
|
||||
espresso-contrib = { group = "androidx.test.espresso", name = "espresso-contrib", version.ref = "espresso" }
|
||||
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espresso" }
|
||||
guava = { group = "com.google.guava", name = "guava", version.ref = "guava" }
|
||||
hamcrest = { module = "org.hamcrest:hamcrest", version.ref = "hamcrest" }
|
||||
jsr250-api = { group = "javax.annotation", name = "jsr250-api", version.ref = "jsr250" }
|
||||
jsr305 = { group = "com.google.code.findbugs", name = "jsr305", version.ref = "jsr305" }
|
||||
junit = { group = "androidx.test.ext", name = "junit", version.ref = "junit" }
|
||||
junit-junit = { module = "junit:junit", version.ref = "junitVersion" }
|
||||
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junitJupiter" }
|
||||
konfetti-xml = { group = "nl.dionsegijn", name = "konfetti-xml", version.ref = "konfetti-xml" }
|
||||
kotlin-stdlib-jdk8 = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib-jdk8", version.ref = "kotlin" }
|
||||
kotlinx-coroutines-android = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-android", version.ref = "ktxCoroutine" }
|
||||
kotlinx-coroutines-core = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "ktxCoroutine" }
|
||||
kotlinx-coroutines-core-common = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core-common", version.ref = "kotlinxCoroutinesCoreCommon" }
|
||||
kotlinx-coroutines-core-jvm = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm", version.ref = "ktxCoroutine" }
|
||||
ktor-client-android = { group = "io.ktor", name = "ktor-client-android", version.ref = "ktor" }
|
||||
ktor-client-core = { group = "io.ktor", name = "ktor-client-core", version.ref = "ktor" }
|
||||
ktor-client-jackson = { group = "io.ktor", name = "ktor-client-jackson", version.ref = "ktor" }
|
||||
ktor-client-json = { group = "io.ktor", name = "ktor-client-json", version.ref = "ktor" }
|
||||
ktor-client-mock = { group = "io.ktor", name = "ktor-client-mock", version.ref = "ktor" }
|
||||
ktor-jackson = { group = "io.ktor", name = "ktor-jackson", version.ref = "ktor" }
|
||||
legacy-preference-v14 = { group = "androidx.legacy", name = "legacy-preference-v14", version.ref = "legacy-support" }
|
||||
legacy-support-v4 = { group = "androidx.legacy", name = "legacy-support-v4", version.ref = "legacy-support" }
|
||||
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
||||
mockito-kotlin = { group = "org.mockito.kotlin", name = "mockito-kotlin", version.ref = "mockito-kotlin" }
|
||||
opencsv = { group = "com.opencsv", name = "opencsv", version.ref = "opencsv" }
|
||||
rules = { group = "androidx.test", name = "rules", version.ref = "rules" }
|
||||
sqlite-jdbc = { module = "org.xerial:sqlite-jdbc", version.ref = "sqliteJdbc" }
|
||||
uiautomator = { group = "androidx.test.uiautomator", name = "uiautomator", version.ref = "uiautomator" }
|
||||
|
||||
[bundles]
|
||||
androidTest = [
|
||||
"annotation",
|
||||
"dagger",
|
||||
"dexmaker-mockito",
|
||||
"espresso-contrib",
|
||||
"espresso-core",
|
||||
"junit",
|
||||
"ktor-client-mock",
|
||||
"ktor-jackson",
|
||||
"mockito-kotlin",
|
||||
"rules",
|
||||
"uiautomator"
|
||||
]
|
||||
test = [
|
||||
"dagger",
|
||||
"junit-junit",
|
||||
"mockito-kotlin",
|
||||
]
|
||||
|
||||
[plugins]
|
||||
agp = { id = "com.android.application", version.ref = "agp" }
|
||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
|
||||
ktlint-plugin = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint-plugin" }
|
||||
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
|
||||
@@ -1,13 +1,32 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
google()
|
||||
}
|
||||
resolutionStrategy.eachPlugin {
|
||||
if (requested.id.id == "com.android.application") {
|
||||
useModule("com.android.tools.build:gradle:${requested.version}")
|
||||
google {
|
||||
content {
|
||||
includeGroupByRegex("com\\.android.*")
|
||||
includeGroupByRegex("com\\.google.*")
|
||||
includeGroupByRegex("androidx.*")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include(":uhabits-android", ":uhabits-core")
|
||||
dependencyResolutionManagement {
|
||||
@Suppress("UnstableApiUsage")
|
||||
repositories {
|
||||
google {
|
||||
content {
|
||||
includeGroupByRegex("com\\.android.*")
|
||||
includeGroupByRegex("com\\.google.*")
|
||||
includeGroupByRegex("androidx.*")
|
||||
}
|
||||
}
|
||||
mavenCentral()
|
||||
maven(url = "https://plugins.gradle.org/m2/")
|
||||
maven(url = "https://oss.sonatype.org/content/repositories/snapshots/")
|
||||
maven(url = "https://jitpack.io")
|
||||
}
|
||||
}
|
||||
|
||||
include(":uhabits-android", ":uhabits-core")
|
||||
|
||||
@@ -18,10 +18,10 @@
|
||||
*/
|
||||
|
||||
plugins {
|
||||
id("com.android.application") version "8.8.0"
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("org.jetbrains.kotlin.kapt")
|
||||
id("org.jlleitschuh.gradle.ktlint")
|
||||
alias(libs.plugins.agp)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
alias(libs.plugins.ksp)
|
||||
alias(libs.plugins.ktlint.plugin)
|
||||
}
|
||||
|
||||
tasks.compileLint {
|
||||
@@ -40,7 +40,6 @@ kotlin {
|
||||
}
|
||||
|
||||
android {
|
||||
|
||||
namespace = "org.isoron.uhabits"
|
||||
compileSdk = 35
|
||||
// compileSdkPreview = "VanillaIceCream"
|
||||
@@ -66,7 +65,7 @@ android {
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
getByName("release") {
|
||||
release {
|
||||
isMinifyEnabled = true
|
||||
proguardFiles(getDefaultProguardFile("proguard-android.txt"), "proguard-rules.txt")
|
||||
if (signingConfigs.findByName("release") != null) {
|
||||
@@ -74,8 +73,8 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
getByName("debug") {
|
||||
isTestCoverageEnabled = true
|
||||
debug {
|
||||
enableUnitTestCoverage = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -84,64 +83,35 @@ android {
|
||||
targetCompatibility(JavaVersion.VERSION_11)
|
||||
sourceCompatibility(JavaVersion.VERSION_11)
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_11.toString()
|
||||
}
|
||||
|
||||
buildFeatures {
|
||||
viewBinding = true
|
||||
}
|
||||
|
||||
lint {
|
||||
abortOnError = false
|
||||
}
|
||||
kotlinOptions.jvmTarget = JavaVersion.VERSION_11.toString()
|
||||
buildFeatures.viewBinding = true
|
||||
lint.abortOnError = false
|
||||
}
|
||||
|
||||
dependencies {
|
||||
val daggerVersion = "2.51.1"
|
||||
val kotlinVersion = "2.1.10"
|
||||
val kxCoroutinesVersion = "1.10.1"
|
||||
val ktorVersion = "1.6.8"
|
||||
val espressoVersion = "3.6.1"
|
||||
|
||||
androidTestImplementation("androidx.test.espresso:espresso-contrib:$espressoVersion")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:$espressoVersion")
|
||||
androidTestImplementation("com.google.dagger:dagger:$daggerVersion")
|
||||
androidTestImplementation("com.linkedin.dexmaker:dexmaker-mockito:2.28.3")
|
||||
androidTestImplementation("io.ktor:ktor-client-mock:$ktorVersion")
|
||||
androidTestImplementation("io.ktor:ktor-jackson:$ktorVersion")
|
||||
androidTestImplementation("androidx.annotation:annotation:1.7.1")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.2.1")
|
||||
androidTestImplementation("androidx.test.uiautomator:uiautomator:2.3.0")
|
||||
androidTestImplementation("androidx.test:rules:1.6.1")
|
||||
androidTestImplementation("org.mockito.kotlin:mockito-kotlin:5.4.0")
|
||||
compileOnly("javax.annotation:jsr250-api:1.0")
|
||||
coreLibraryDesugaring("com.android.tools:desugar_jdk_libs:2.1.4")
|
||||
implementation("com.github.AppIntro:AppIntro:6.3.1")
|
||||
implementation("com.google.code.findbugs:jsr305:3.0.2")
|
||||
implementation("com.google.dagger:dagger:$daggerVersion")
|
||||
implementation("com.google.guava:guava:33.1.0-android")
|
||||
implementation("io.ktor:ktor-client-android:$ktorVersion")
|
||||
implementation("io.ktor:ktor-client-core:$ktorVersion")
|
||||
implementation("io.ktor:ktor-client-jackson:$ktorVersion")
|
||||
implementation("io.ktor:ktor-client-json:$ktorVersion")
|
||||
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlinVersion")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:$kxCoroutinesVersion")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kxCoroutinesVersion")
|
||||
implementation("androidx.appcompat:appcompat:1.7.0")
|
||||
implementation("androidx.legacy:legacy-preference-v14:1.0.0")
|
||||
implementation("androidx.legacy:legacy-support-v4:1.0.0")
|
||||
implementation("com.google.android.material:material:1.12.0")
|
||||
implementation("com.opencsv:opencsv:5.9")
|
||||
implementation("nl.dionsegijn:konfetti-xml:2.0.2")
|
||||
compileOnly(libs.jsr250.api)
|
||||
coreLibraryDesugaring(libs.desugar.jdk.libs)
|
||||
implementation(libs.appIntro)
|
||||
implementation(libs.jsr305)
|
||||
implementation(libs.dagger)
|
||||
implementation(libs.guava)
|
||||
implementation(libs.ktor.client.android)
|
||||
implementation(libs.ktor.client.core)
|
||||
implementation(libs.ktor.client.jackson)
|
||||
implementation(libs.ktor.client.json)
|
||||
implementation(libs.kotlin.stdlib.jdk8)
|
||||
implementation(libs.kotlinx.coroutines.android)
|
||||
implementation(libs.kotlinx.coroutines.core)
|
||||
implementation(libs.appcompat)
|
||||
implementation(libs.legacy.preference.v14)
|
||||
implementation(libs.legacy.support.v4)
|
||||
implementation(libs.material)
|
||||
implementation(libs.opencsv)
|
||||
implementation(libs.konfetti.xml)
|
||||
implementation(project(":uhabits-core"))
|
||||
kapt("com.google.dagger:dagger-compiler:$daggerVersion")
|
||||
kaptAndroidTest("com.google.dagger:dagger-compiler:$daggerVersion")
|
||||
testImplementation("com.google.dagger:dagger:$daggerVersion")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
testImplementation("org.mockito.kotlin:mockito-kotlin:5.4.0")
|
||||
}
|
||||
ksp(libs.dagger.compiler)
|
||||
|
||||
kapt {
|
||||
correctErrorTypes = true
|
||||
androidTestImplementation(libs.bundles.androidTest)
|
||||
testImplementation(libs.bundles.test)
|
||||
}
|
||||
|
||||
@@ -36,16 +36,17 @@ class NumberDialog : AppCompatDialogFragment() {
|
||||
val appComponent = (requireActivity().application as HabitsApplication).component
|
||||
val prefs = appComponent.preferences
|
||||
view = CheckmarkPopupBinding.inflate(LayoutInflater.from(context))
|
||||
arrayOf(view.yesBtn, view.skipBtn).forEach {
|
||||
arrayOf(view.yesBtn).forEach {
|
||||
it.setTextColor(requireArguments().getInt("color"))
|
||||
}
|
||||
arrayOf(view.noBtn, view.unknownBtn).forEach {
|
||||
arrayOf(view.noBtn, view.unknownBtnNumber).forEach {
|
||||
it.setTextColor(view.root.sres.getColor(R.attr.contrast60))
|
||||
}
|
||||
arrayOf(view.yesBtn, view.noBtn, view.skipBtn, view.unknownBtn).forEach {
|
||||
arrayOf(view.yesBtn, view.noBtn, view.unknownBtnNumber).forEach {
|
||||
it.typeface = InterfaceUtils.getFontAwesome(requireContext())
|
||||
}
|
||||
if (!prefs.isSkipEnabled) view.skipBtnNumber.visibility = View.GONE
|
||||
if (!prefs.areQuestionMarksEnabled) view.unknownBtnNumber.visibility = View.GONE
|
||||
view.numberButtons.visibility = View.VISIBLE
|
||||
fixDecimalSeparator(view)
|
||||
originalNotes = requireArguments().getString("notes")!!
|
||||
@@ -71,6 +72,12 @@ class NumberDialog : AppCompatDialogFragment() {
|
||||
view.value.setText(DecimalFormat("#.###").format((Entry.SKIP.toDouble() / 1000)))
|
||||
save()
|
||||
}
|
||||
|
||||
view.unknownBtnNumber.setOnClickListener {
|
||||
view.value.setText(DecimalFormat("#.###").format((Entry.UNKNOWN.toDouble() / 1000)))
|
||||
save()
|
||||
}
|
||||
|
||||
view.notes.setOnEditorActionListener { v, actionId, event ->
|
||||
save()
|
||||
true
|
||||
|
||||
@@ -224,6 +224,7 @@ class ListHabitsScreen
|
||||
}
|
||||
|
||||
override fun showConfetti(color: PaletteColor, x: Float, y: Float) {
|
||||
if (preferences.isConfettiAnimationDisabled) return
|
||||
val baseColor = themeSwitcher.currentTheme!!.color(color).toInt()
|
||||
rootView.get().konfettiView.start(
|
||||
Party(
|
||||
|
||||
@@ -23,32 +23,32 @@
|
||||
android:id="@+id/container"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:minHeight="128dp"
|
||||
android:background="@drawable/checkmark_dialog_bg"
|
||||
android:minWidth="208dp"
|
||||
app:divider="@drawable/checkmark_dialog_divider"
|
||||
app:showDividers="middle"
|
||||
android:minHeight="128dp"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/checkmark_dialog_bg">
|
||||
app:divider="@drawable/checkmark_dialog_divider"
|
||||
app:showDividers="middle">
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/notes"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:inputType="textCapSentences|textMultiLine"
|
||||
android:textSize="@dimen/smallTextSize"
|
||||
android:padding="4dp"
|
||||
android:background="@color/transparent"
|
||||
android:gravity="center"
|
||||
android:hint="@string/notes"
|
||||
android:text="" />
|
||||
android:inputType="textCapSentences|textMultiLine"
|
||||
android:padding="4dp"
|
||||
android:text=""
|
||||
android:textSize="@dimen/smallTextSize" />
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/booleanButtons"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
app:divider="@drawable/checkmark_dialog_divider"
|
||||
app:showDividers="middle">
|
||||
|
||||
@@ -75,10 +75,10 @@
|
||||
|
||||
<androidx.appcompat.widget.LinearLayoutCompat
|
||||
android:id="@+id/numberButtons"
|
||||
android:visibility="gone"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
app:divider="@drawable/checkmark_dialog_divider"
|
||||
app:showDividers="middle">
|
||||
|
||||
@@ -86,21 +86,26 @@
|
||||
android:id="@+id/value"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:layout_weight="2"
|
||||
android:background="@color/transparent"
|
||||
android:textAlignment="center"
|
||||
android:inputType="numberDecimal"
|
||||
android:selectAllOnFocus="true"
|
||||
android:textAlignment="center"
|
||||
android:textSize="@dimen/smallTextSize" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/saveBtn"
|
||||
style="@style/NumericalPopupBtn"
|
||||
android:text="@string/save" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/skipBtnNumber"
|
||||
style="@style/NumericalPopupBtn"
|
||||
android:text="@string/skip_day" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/saveBtn"
|
||||
style="@style/NumericalPopupBtn"
|
||||
android:text="@string/save" />
|
||||
android:id="@+id/unknownBtnNumber"
|
||||
style="@style/CheckmarkPopupBtn"
|
||||
android:text="@string/fa_question" />
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
@@ -233,4 +233,6 @@
|
||||
<string name="activity_not_found">No app was found to support this action</string>
|
||||
<string name="pref_midnight_delay_title">Extend day a few hours past midnight</string>
|
||||
<string name="pref_midnight_delay_description">Wait until 3:00 AM to show a new day. Useful if you typically go to sleep after midnight. Requires app restart.</string>
|
||||
<string name="pref_animations_title">Disable animations</string>
|
||||
<string name="pref_animations_description">Disable confetti animation after adding a checkmark.</string>
|
||||
</resources>
|
||||
|
||||
@@ -67,6 +67,13 @@
|
||||
android:title="@string/use_pure_black"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<SwitchPreferenceCompat
|
||||
android:defaultValue="false"
|
||||
android:key="pref_disable_animation"
|
||||
android:summary="@string/pref_animations_description"
|
||||
android:title="@string/pref_animations_title"
|
||||
app:iconSpaceReserved="false" />
|
||||
|
||||
<ListPreference
|
||||
android:defaultValue="255"
|
||||
android:entries="@array/widget_opacity_entries"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
plugins {
|
||||
kotlin("multiplatform")
|
||||
id("org.jlleitschuh.gradle.ktlint")
|
||||
alias(libs.plugins.ktlint.plugin)
|
||||
}
|
||||
|
||||
kotlin {
|
||||
@@ -30,7 +30,7 @@ kotlin {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-common"))
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-common:1.3.8")
|
||||
implementation(libs.kotlinx.coroutines.core.common)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,14 +44,14 @@ kotlin {
|
||||
val jvmMain by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("stdlib-jdk8"))
|
||||
compileOnly("com.google.dagger:dagger:2.51.1")
|
||||
implementation("com.google.guava:guava:33.1.0-android")
|
||||
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.10.1")
|
||||
implementation("androidx.annotation:annotation:1.7.1")
|
||||
implementation("com.google.code.findbugs:jsr305:3.0.2")
|
||||
implementation("com.opencsv:opencsv:5.9")
|
||||
implementation("commons-codec:commons-codec:1.16.0")
|
||||
implementation("org.apache.commons:commons-lang3:3.14.0")
|
||||
compileOnly(libs.dagger)
|
||||
implementation(libs.guava)
|
||||
implementation(libs.kotlinx.coroutines.core.jvm)
|
||||
implementation(libs.annotation)
|
||||
implementation(libs.jsr305)
|
||||
implementation(libs.opencsv)
|
||||
implementation(libs.commons.codec)
|
||||
implementation(libs.commons.lang3)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,19 +59,16 @@ kotlin {
|
||||
dependencies {
|
||||
implementation(kotlin("test"))
|
||||
implementation(kotlin("test-junit"))
|
||||
implementation("org.xerial:sqlite-jdbc:3.45.1.0")
|
||||
implementation("org.hamcrest:hamcrest:2.2")
|
||||
implementation("org.apache.commons:commons-io:1.3.2")
|
||||
implementation("org.mockito.kotlin:mockito-kotlin:5.4.0")
|
||||
implementation("org.junit.jupiter:junit-jupiter:5.10.1")
|
||||
implementation(libs.sqlite.jdbc)
|
||||
implementation(libs.hamcrest)
|
||||
implementation(libs.commons.io)
|
||||
implementation(libs.mockito.kotlin)
|
||||
implementation(libs.junit.jupiter)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.named<org.gradle.language.jvm.tasks.ProcessResources>("jvmProcessResources") {
|
||||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||
}
|
||||
tasks.named<org.gradle.language.jvm.tasks.ProcessResources>("jvmTestProcessResources") {
|
||||
tasks.withType<ProcessResources> {
|
||||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||
}
|
||||
|
||||
@@ -135,6 +135,12 @@ open class Preferences(private val storage: Storage) {
|
||||
storage.putBoolean("pref_short_toggle", enabled)
|
||||
}
|
||||
|
||||
var isConfettiAnimationDisabled: Boolean
|
||||
get() = storage.getBoolean("pref_disable_animation", false)
|
||||
set(enabled) {
|
||||
storage.putBoolean("pref_disable_animation", enabled)
|
||||
}
|
||||
|
||||
fun removeListener(listener: Listener) {
|
||||
listeners.remove(listener)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user