-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
73e93e1
commit a3e9539
Showing
6 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
### Wire - Protobuf | ||
|
||
Run `./gradlew generateCommonMainProtos`, to generate Kotlin files form .proto files. | ||
The files will be generated in the following dir: `build/generated/source/wire/` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
android { | ||
namespace = "xyz.ksharma.krail.io.gtfs" | ||
} | ||
|
||
plugins { | ||
alias(libs.plugins.krail.android.library) | ||
alias(libs.plugins.krail.kotlin.multiplatform) | ||
alias(libs.plugins.krail.compose.multiplatform) | ||
alias(libs.plugins.compose.compiler) | ||
alias(libs.plugins.wire) | ||
} | ||
|
||
kotlin { | ||
applyDefaultHierarchyTemplate() | ||
|
||
androidTarget() | ||
iosArm64() | ||
iosSimulatorArm64() | ||
|
||
sourceSets { | ||
androidMain.dependencies { | ||
api(libs.di.koinAndroid) | ||
} | ||
|
||
commonMain { | ||
dependencies { | ||
implementation(projects.core.log) | ||
implementation(projects.core.di) | ||
|
||
implementation(libs.kotlinx.serialization.json) | ||
implementation(libs.ktor.client.core) | ||
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(compose.runtime) | ||
|
||
api(libs.di.koinComposeViewmodel) | ||
} | ||
} | ||
|
||
iosMain { | ||
dependencies { | ||
} | ||
} | ||
|
||
commonTest { | ||
dependencies { | ||
implementation(libs.test.kotlin) | ||
implementation(libs.test.turbine) | ||
implementation(libs.test.kotlinxCoroutineTest) | ||
} | ||
} | ||
} | ||
} | ||
|
||
|
||
wire { | ||
kotlin { | ||
javaInterop = true | ||
out = "$projectDir/build/generated/source/wire" | ||
} | ||
protoPath { | ||
srcDir("src/commonMain/proto") | ||
} | ||
sourcePath { | ||
srcDir("src/commonMain/proto") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
syntax = "proto3"; | ||
|
||
package app.krail.kgtfs.proto; | ||
|
||
message NswStop { | ||
|
||
/** The stop ID is a unique identifier for the stop. */ | ||
string stopId = 1; | ||
|
||
// The stop name is the name of the stop. | ||
string stopName = 2; | ||
|
||
double lat = 3; | ||
double lon = 4; | ||
|
||
// The product class is a list of transport modes that the stop is associated with. | ||
repeated int32 productClass = 5; | ||
} | ||
|
||
message NswStopList { | ||
repeated NswStop nswStops = 1; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters