generated from AdamMc331/AndroidAppTemplate
-
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.
Adding shared octanegg module. (#88)
- Loading branch information
Showing
27 changed files
with
250 additions
and
71 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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
name: Lint Checks | ||
|
||
on: push | ||
on: pull_request | ||
|
||
jobs: | ||
lint-checks: | ||
|
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
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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
plugins { | ||
kotlin("multiplatform") | ||
kotlin("plugin.serialization") | ||
id("com.android.library") | ||
} | ||
|
||
kotlin { | ||
android() | ||
|
||
listOf( | ||
iosX64(), | ||
iosArm64(), | ||
iosSimulatorArm64() | ||
).forEach { | ||
it.binaries.framework { | ||
baseName = "octanegg" | ||
} | ||
} | ||
|
||
sourceSets { | ||
val commonMain by getting { | ||
dependencies { | ||
implementation(project(":core-data")) | ||
implementation(project(":core-models")) | ||
implementation(project(":core-datetime")) | ||
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2") | ||
implementation("io.ktor:ktor-client-core:${Versions.ktor}") | ||
implementation("io.ktor:ktor-client-json:${Versions.ktor}") | ||
implementation("io.ktor:ktor-client-logging:${Versions.ktor}") | ||
implementation("io.ktor:ktor-client-serialization:${Versions.ktor}") | ||
} | ||
} | ||
val commonTest by getting { | ||
dependencies { | ||
implementation(kotlin("test")) | ||
} | ||
} | ||
val androidMain by getting { | ||
dependencies { | ||
implementation("io.ktor:ktor-client-android:${Versions.ktor}") | ||
} | ||
} | ||
val androidTest by getting | ||
val iosX64Main by getting | ||
val iosArm64Main by getting | ||
val iosSimulatorArm64Main by getting | ||
val iosMain by creating { | ||
dependsOn(commonMain) | ||
iosX64Main.dependsOn(this) | ||
iosArm64Main.dependsOn(this) | ||
iosSimulatorArm64Main.dependsOn(this) | ||
|
||
dependencies { | ||
implementation("io.ktor:ktor-client-ios:${Versions.ktor}") | ||
} | ||
} | ||
val iosX64Test by getting | ||
val iosArm64Test by getting | ||
val iosSimulatorArm64Test by getting | ||
val iosTest by creating { | ||
dependsOn(commonTest) | ||
iosX64Test.dependsOn(this) | ||
iosArm64Test.dependsOn(this) | ||
iosSimulatorArm64Test.dependsOn(this) | ||
} | ||
} | ||
} | ||
|
||
android { | ||
compileSdk = AndroidConfig.compileSDK | ||
sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml") | ||
defaultConfig { | ||
minSdk = AndroidConfig.minSDK | ||
targetSdk = AndroidConfig.targetSDK | ||
} | ||
} |
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,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest package="com.adammcneilly.pocketleague.data.remote.octanegg" /> |
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
15 changes: 15 additions & 0 deletions
15
...c/commonMain/kotlin/com/adammcneilly/pocketleague/data/remote/octanegg/dtos/AccountDTO.kt
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,15 @@ | ||
package com.adammcneilly.pocketleague.data.remote.octanegg.dtos | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
/** | ||
* Represents a [PlayerDTO] account within the octane.gg API. | ||
*/ | ||
@Serializable | ||
data class AccountDTO( | ||
@SerialName("id") | ||
val id: String? = null, | ||
@SerialName("platform") | ||
val platform: String? = null, | ||
) |
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
4 changes: 2 additions & 2 deletions
4
...ion/octanegg/dtos/EventListResponseDTO.kt → ...ote/octanegg/dtos/EventListResponseDTO.kt
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
4 changes: 2 additions & 2 deletions
4
...plementation/octanegg/dtos/LocationDTO.kt → .../data/remote/octanegg/dtos/LocationDTO.kt
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
31 changes: 31 additions & 0 deletions
31
...rc/commonMain/kotlin/com/adammcneilly/pocketleague/data/remote/octanegg/dtos/PlayerDTO.kt
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,31 @@ | ||
package com.adammcneilly.pocketleague.data.remote.octanegg.dtos | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
/** | ||
* Represents a person who is a player for a [TeamDTO] in the octane.gg API. | ||
*/ | ||
@Serializable | ||
data class PlayerDTO( | ||
@SerialName("accounts") | ||
val accounts: List<AccountDTO>? = null, | ||
@SerialName("coach") | ||
val coach: Boolean? = null, | ||
@SerialName("country") | ||
val country: String? = null, | ||
@SerialName("_id") | ||
val id: String? = null, | ||
@SerialName("name") | ||
val name: String? = null, | ||
@SerialName("relevant") | ||
val relevant: Boolean? = null, | ||
@SerialName("slug") | ||
val slug: String? = null, | ||
@SerialName("substitute") | ||
val substitute: Boolean? = null, | ||
@SerialName("tag") | ||
val tag: String? = null, | ||
@SerialName("team") | ||
val team: TeamOverviewDTO? = null, | ||
) |
4 changes: 2 additions & 2 deletions
4
.../implementation/octanegg/dtos/PrizeDTO.kt → ...gue/data/remote/octanegg/dtos/PrizeDTO.kt
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
package com.adammcneilly.pocketleague.event.implementation.octanegg.dtos | ||
package com.adammcneilly.pocketleague.data.remote.octanegg.dtos | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
/** | ||
* A data class mapping to a prize entity from the octane.gg API. | ||
*/ | ||
@Serializable | ||
internal data class PrizeDTO( | ||
data class PrizeDTO( | ||
val amount: Double? = null, | ||
val currency: String? = null, | ||
) |
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
15 changes: 15 additions & 0 deletions
15
.../src/commonMain/kotlin/com/adammcneilly/pocketleague/data/remote/octanegg/dtos/TeamDTO.kt
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,15 @@ | ||
package com.adammcneilly.pocketleague.data.remote.octanegg.dtos | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
/** | ||
* Represents a team within the octane.gg API domain. | ||
*/ | ||
@Serializable | ||
data class TeamDTO( | ||
@SerialName("players") | ||
val players: List<PlayerDTO>? = null, | ||
@SerialName("team") | ||
val team: TeamOverviewDTO? = null, | ||
) |
Oops, something went wrong.