Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion SharedCode/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@

@file:Suppress("OPT_IN_USAGE")

import org.jetbrains.kotlin.gradle.dsl.JvmTarget


plugins {
kotlin("multiplatform")
id("kotlinx-serialization")
Expand Down Expand Up @@ -119,6 +122,6 @@ kotlin.sourceSets.all {
}

tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions.jvmTarget = "17"
compilerOptions.jvmTarget.set(JvmTarget.JVM_17)
}

Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ import com.surrus.galwaybus.db.MyDatabase
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.MainScope
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.combine
import kotlinx.datetime.Clock
import kotlinx.datetime.Instant
import org.koin.core.component.KoinComponent
import org.koin.core.component.get
import org.koin.core.component.inject
import kotlin.time.Clock
import kotlin.time.Duration
import kotlin.time.ExperimentalTime
import kotlin.time.Instant


open class GalwayBusRepository : KoinComponent {
Expand All @@ -38,11 +40,11 @@ open class GalwayBusRepository : KoinComponent {
}).asFlow().mapToList(Dispatchers.Default)

@NativeCoroutines
val favorites = appSettings.favorites
val favorites: Flow<Set<String>> = appSettings.favorites

val favoriteBusStopList = busStops.combine(favorites) { busStops, favorites ->
Logger.i { "favoriteBusStopList, favorites = $favorites, busStops size = ${busStops.size}" }
favorites.map { favorite -> busStops.firstOrNull { it.stopRef == favorite } }.filterNotNull()
favorites.mapNotNull { favorite -> busStops.firstOrNull { it.stopRef == favorite } }
}

suspend fun fetchAndStoreBusStops() {
Expand Down Expand Up @@ -84,6 +86,7 @@ open class GalwayBusRepository : KoinComponent {
}
}

@OptIn(ExperimentalTime::class)
@NativeCoroutines
suspend fun fetchBusStopDepartures(stopRef: String): Result<List<GalwayBusDeparture>> {
try {
Expand Down
2 changes: 1 addition & 1 deletion fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ default_platform :android

platform :android do

versionNum = 86
versionNum = 87

before_all do
end
Expand Down
46 changes: 23 additions & 23 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
[versions]
kotlin = "2.1.21"
ksp = "2.1.21-2.0.1"
kotlin = "2.2.0"
ksp = "2.2.0-2.0.2"
kotlinx-coroutines = "1.10.2"
kotlinx-serialization = "1.8.1"
kotlinx-dateTime = "0.6.2"
kotlinx-serialization = "1.9.0"
kotlinx-dateTime = "0.7.0"


androidGradlePlugin = "8.10.1"
koin = "4.0.4"
ktor = "3.1.2"
androidGradlePlugin = "8.11.0"
koin = "4.1.0"
ktor = "3.2.1"
slf4j = "2.0.17"
sqlDelight = "2.1.0"
kmpNativeCoroutines = "1.0.0-ALPHA-42"
googleServices = "4.4.2"
kmpNativeCoroutines = "1.0.0-ALPHA-45"
googleServices = "4.4.3"

androidxActivity = "1.10.1"
androidxComposeBom = "2025.06.00"
androidxNavigationCompose = "2.9.0"
uiToolingPreview = "1.8.2"
androidxComposeBom = "2025.06.01"
androidxNavigationCompose = "2.9.1"
uiToolingPreview = "1.8.3"
androidxLifecycle = "2.9.1"
imageLoader = "1.9.0"
imageLoader = "1.10.0"
osmdroidAndroid = "6.1.20"
googleMapsCompose = "5.0.3"
googleMapsCompose = "6.6.0"

accompanist = "0.36.0"
coilCompose = "2.7.0"
horologist = "0.6.20"
okhttp = "5.0.0-alpha.14"
horologist = "0.6.23"
okhttp = "5.0.0"

junit = "4.13.2"
androidxTestJUnit = "1.2.1"
robolectric = "4.14.1"
robolectric = "4.15.1"
androidxTestCore = "1.6.1"
mockito = "3.11.2"
mockito = "5.2.0"

multiplatformSettings = "1.3.0"
kermit = "2.0.5"
kermit = "2.0.6"

minSdk = "24"
targetSdk = "35"
compileSdk = "35"
targetSdk = "36"
compileSdk = "36"
coreKtx = "1.16.0"
espressoCore = "3.6.1"
appcompat = "1.7.1"
material = "1.12.0"
constraintlayout = "2.2.1"
lifecycleLivedataKtx = "2.9.1"
navigationFragmentKtx = "2.9.0"
navigationUiKtx = "2.9.0"
navigationFragmentKtx = "2.9.1"
navigationUiKtx = "2.9.1"

mcp = "0.5.0"
shadowPlugin = "8.1.1"
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Sun May 28 21:12:18 IST 2023
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
version = "1.3">
<BuildAction>
<BuildActionEntries>
<BuildActionEntry
buildForRunning = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1A91940D249E81BD008E2AC8"
BuildableName = "GalwayBus.app"
BlueprintName = "GalwayBus"
ReferencedContainer = "container:GalwayBus.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<LaunchAction
useCustomWorkingDirectory = "NO"
buildConfiguration = "Debug"
allowLocationSimulation = "YES">
<BuildableProductRunnable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "1A91940D249E81BD008E2AC8"
BuildableName = "GalwayBus.app"
BlueprintName = "GalwayBus"
ReferencedContainer = "container:GalwayBus.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<dict>
<key>SchemeUserState</key>
<dict>
<key>GalwayBus.xcscheme_^#shared#^_</key>
<key>GalwayBus.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>2</integer>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict />
</plist>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.