Skip to content

Commit

Permalink
Update CI for Krail
Browse files Browse the repository at this point in the history
  • Loading branch information
ksharma-xyz committed Nov 23, 2024
1 parent 26eb9f1 commit 246677b
Show file tree
Hide file tree
Showing 18 changed files with 14 additions and 279 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Android CI
name: Krail App CI

on:
push:
branches: [ commonMain ]
branches: [ main ]
pull_request:
branches: [ commonMain ]
branches: [ main ]

jobs:
build:
Expand Down Expand Up @@ -40,15 +40,15 @@ jobs:
- name: Firebase (Release) - Google Services.json file
env:
DATA: ${{ secrets.FIREBASE_GOOGLE_SERVICES_JSON_RELEASE }}
run: echo $DATA | base64 -di > android-app/google-services.json
run: echo $DATA | base64 -di > composeApp/src/androidMain/google-services.json

- name: Firebase (Debug) - Google Services.json file
env:
DATA: ${{ secrets.FIREBASE_GOOGLE_SERVICES_JSON_DEBUG }}
run: echo $DATA | base64 -di > android-app/src/debug/google-services.json
run: echo $DATA | base64 -di > composeApp/src/androidDebug/google-services.json

- name: Detekt Checks
run: ./gradlew detekt
# - name: Detekt Checks
# run: ./gradlew detekt

- name: Build Debug
run: ./gradlew assembleDebug test
Expand Down
63 changes: 0 additions & 63 deletions android-app/build.gradle.kts

This file was deleted.

31 changes: 0 additions & 31 deletions android-app/src/main/AndroidManifest.xml

This file was deleted.

65 changes: 0 additions & 65 deletions android-app/src/main/proguard-rules.pro

This file was deleted.

10 changes: 0 additions & 10 deletions android-app/src/main/res/color/gradient_background.xml

This file was deleted.

11 changes: 0 additions & 11 deletions android-app/src/main/res/drawable/ic_launcher_background.xml

This file was deleted.

9 changes: 0 additions & 9 deletions android-app/src/main/res/drawable/ic_launcher_foreground.xml

This file was deleted.

6 changes: 0 additions & 6 deletions android-app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions android-app/src/main/res/values-night/colors.xml

This file was deleted.

5 changes: 0 additions & 5 deletions android-app/src/main/res/values/colors.xml

This file was deleted.

3 changes: 0 additions & 3 deletions android-app/src/main/res/values/strings.xml

This file was deleted.

7 changes: 0 additions & 7 deletions android-app/src/main/res/values/themes.xml

This file was deleted.

13 changes: 0 additions & 13 deletions android-app/src/main/res/xml/backup_rules.xml

This file was deleted.

19 changes: 0 additions & 19 deletions android-app/src/main/res/xml/data_extraction_rules.xml

This file was deleted.

Empty file.
14 changes: 0 additions & 14 deletions feature/trip-planner/ui/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,6 @@ kotlin {
implementation(libs.kotlinx.serialization.json)
implementation(libs.navigation.compose)
implementation(libs.lifecycle.viewmodel.compose)

// TODO - remove once DI added - start
/*
implementation(libs.ktor.client.core)
implementation(libs.ktor.client.cio)
implementation(libs.ktor.client.auth)
implementation(libs.ktor.client.content.negotiation)
implementation(libs.ktor.client.logging)
implementation(libs.ktor.serialization.kotlinx.json)
implementation(libs.kotlinx.datetime)
implementation(libs.slf4j.simple) // Logging
*/
// TODO - remove once DI added - end

api(libs.di.koinComposeViewmodel)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.toImmutableList
import xyz.ksharma.krail.core.datetime.DateTimeHelper.calculateTimeDifference
import xyz.ksharma.krail.core.datetime.DateTimeHelper.calculateTimeDifferenceFromNow
import xyz.ksharma.krail.core.datetime.DateTimeHelper.formatTo12HourTime
import xyz.ksharma.krail.core.datetime.DateTimeHelper.toFormattedDurationTimeString
import xyz.ksharma.krail.core.datetime.DateTimeHelper.toGenericFormattedTimeString
import xyz.ksharma.krail.core.datetime.DateTimeHelper.toHHMM
import xyz.ksharma.krail.core.datetime.DateTimeHelper.utcToAEST
import xyz.ksharma.krail.core.datetime.DateTimeHelper.utcToLocalDateTimeAEST
import xyz.ksharma.krail.trip.planner.network.api.model.TripResponse
import xyz.ksharma.krail.trip.planner.ui.state.TransportMode
Expand Down Expand Up @@ -66,7 +68,7 @@ internal fun TripResponse.buildJourneyList(): ImmutableList<TimeTableState.Journ
legs = legsList,
totalUniqueServiceAlerts = legs.flatMap { leg -> leg.infos.orEmpty() }.toSet().size,
).also {
//println("\tJourneyId: ${it.journeyId}")
println("\tJourneyId: ${it.journeyId}")
}
} else {
null
Expand Down Expand Up @@ -246,7 +248,7 @@ private fun TripResponse.StopSequence.toUiModel(): TimeTableState.JourneyCardInf
}
}

/*internal fun TripResponse.logForUnderstandingData() {
internal fun TripResponse.logForUnderstandingData() {
println("Journeys: ${journeys?.size}")
journeys?.mapIndexed { jindex, j ->
println("JOURNEY #${jindex + 1}")
Expand Down Expand Up @@ -277,12 +279,12 @@ private fun TripResponse.StopSequence.toUiModel(): TimeTableState.JourneyCardInf
)
}
}
}*/
}

/**
* Prints the stops for legs when interchange required.
*/
/*private fun List<TripResponse.StopSequence>.interchangeStopsList() = this.mapNotNull {
private fun List<TripResponse.StopSequence>.interchangeStopsList() = this.mapNotNull {
// TODO - figure role of ARR vs DEP time
val timeArr = it.arrivalTimeEstimated?.utcToAEST()
?.formatTo12HourTime() ?: it.arrivalTimePlanned?.utcToAEST()?.formatTo12HourTime()
Expand All @@ -296,7 +298,7 @@ private fun TripResponse.StopSequence.toUiModel(): TimeTableState.JourneyCardInf
"\n\t\t\t\t Stop: ${it.name}," +
" depTime: ${timeArr ?: depTime}"
}
}*/
}

private fun String.fromUTCToDisplayTimeString() = this.utcToLocalDateTimeAEST().toHHMM()

Expand Down

0 comments on commit 246677b

Please sign in to comment.