Migrate osm opening hours parsing to external library (#900)

* Fix: don't treat PH OpeningHours with specified time as `everyDay`

* migrate to osm-opening-hours, add tests for openinghours parsing

* Style nit

* implement 'PH,Su off'

* implement SpecificWeekdays

* decrypt source code (a little)

* fix constructor call in OpeningHoursTest.kt

* lint

* fix negative durations, add test for LastNth + test to combine everything implemented

* add copyright note for osm-opening-hours

* remove unused library
This commit is contained in:
Christoph
2024-10-20 11:47:16 +02:00
committed by GitHub
parent 7d490f2179
commit 16637265fb
9 changed files with 513 additions and 172 deletions
+4
View File
@@ -42,6 +42,8 @@ junit = "4.13.2"
junitVersion = "1.1.5"
espressoCore = "3.5.1"
osmOpeningHours = "0.1.0"
[libraries]
mustache-compiler = { module = "com.github.spullara.mustache.java:compiler", version.ref = "mustache" }
gradle = { group = "com.android.tools.build", name = "gradle", version.ref = "android-gradle-plugin" }
@@ -138,6 +140,8 @@ junit = { group = "junit", name = "junit", version.ref = "junit" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
osmopeninghours = { group = "de.westnordost", name = "osm-opening-hours", version.ref = "osmOpeningHours" }
[bundles]
kotlin = ["kotlin-stdlib", "kotlinx-coroutines-core", "kotlinx-coroutines-android", "kotlinx-collections-immutable", "kotlinx-serialization-json"]
androidx-lifecycle = ["androidx-lifecycle-viewmodel", "androidx-lifecycle-common", "androidx-lifecycle-runtime", "androidx-lifecycle-viewmodelcompose", "androidx-lifecycle-runtimecompose"]