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
6 changes: 6 additions & 0 deletions .idea/codeStyles/Project.xml

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

1 change: 1 addition & 0 deletions .idea/codeStyles/codeStyleConfig.xml

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

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![CI-MASTER](https://github.com/jarroyoesp/ComposeMultiplatformApp/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/jarroyoesp/ComposeMultiplatformApp/actions/workflows/ci.yml)
[![Latest release](https://img.shields.io/github/v/release/JetBrains/compose-multiplatform?color=blue&label=Compose%20multiplatform)](https://github.com/JetBrains/compose-multiplatform/releases/tag/v1.8.2)
![Kotlin Version](https://img.shields.io/badge/Kotlin-2.2.10-blue?logo=kotlin&logoColor=white)
![Kotlin Version](https://img.shields.io/badge/Kotlin-2.2.20-blue?logo=kotlin&logoColor=white)
<div align="center">
<img alt="Compose multiplatform charts" src="./screenshots/compose_multiplatform_logo.png"/>
<h1>🚀 Example project to show SpaceX data built with Kotlin Multiplatform and Compose UI Multiplatform</h1>
Expand Down

Large diffs are not rendered by default.

2,741 changes: 1,367 additions & 1,374 deletions app/versions/dependencies/debugRuntimeClasspathDependencies.txt

Large diffs are not rendered by default.

2,695 changes: 1,344 additions & 1,351 deletions app/versions/dependencies/debugUnitTestRuntimeClasspathDependencies.txt

Large diffs are not rendered by default.

2,509 changes: 1,251 additions & 1,258 deletions app/versions/dependencies/releaseRuntimeClasspathDependencies.txt

Large diffs are not rendered by default.

2,569 changes: 1,281 additions & 1,288 deletions app/versions/dependencies/releaseUnitTestRuntimeClasspathDependencies.txt

Large diffs are not rendered by default.

Binary file modified build-conventions/build/libs/build-conventions.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ easylauncher {
}

aboutLibraries {
duplicationMode = DuplicateMode.MERGE
duplicationRule = DuplicateRule.SIMPLE
library.duplicationMode = DuplicateMode.MERGE
library.duplicationRule = DuplicateRule.SIMPLE
}

dependencies {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import java.util.Date

if (config.params.saveBuildLogToFile.get()) {
val datetime = SimpleDateFormat("yyyy-MM-dd-HH-mm-ss").format(Date())
val buildLogDir = "${buildDir}/logs"
val buildLogDir = "${layout.buildDirectory}/logs"
mkdir(buildLogDir)
val buildLog = File("${buildLogDir}/buildlog-${datetime}.txt")

Expand Down
48 changes: 24 additions & 24 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,36 @@

[versions]
aboutlibraries = "12.2.4"
agp = "8.12.2"
agp = "8.13.0"
androidCompileSdk = "36"
androidx-compose = "1.9.0"
androidx-compose = "1.9.3"
apollo = "4.3.3"
coil3 = "3.3.0"
coroutines = "1.10.2"
detekt = "1.23.8"
diktat = "1.2.5"
gitlive = "2.1.0"
gradle = "8.1.1"
jetbrains-lifecycle = "2.9.3"
jetbrains-navigation = "2.9.0-rc01"
koin = "4.1.0"
koin-ksp = "2.1.0"
kotlin = "2.2.10"
jetbrains-lifecycle = "2.9.5"
jetbrains-navigation = "2.9.1"
koin = "4.1.1"
koin-ksp = "2.3.0"
kotlin = "2.2.20"
kotlinpoet = "2.2.0"
kotlin-multiplatform = "1.8.2"
kotlin-multiplatform = "1.9.1"
kotlin-result = "2.1.0"
ksp = "2.2.10-2.0.2"
ksp = "2.2.20-2.0.3"
ktlint = "0.43.0"
ktor = "3.2.3"
material3 = "1.8.2"
mockk = "1.14.5"
ktor = "3.3.1"
material3 = "1.9.0"
mockk = "1.14.6"
okhttp = "4.12.0"
prettier = "2.7.1"
sqlDelight = "2.1.0"
junitVersion = "1.3.0"

[libraries]
androidx-activity-compose = { module = "androidx.activity:activity-compose", version = "1.10.1" }
androidx-activity-compose = { module = "androidx.activity:activity-compose", version = "1.11.0" }
androidx-compose-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "androidx-compose" }
androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4", version.ref = "androidx-compose" }
androidx-compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest", version.ref = "androidx-compose" }
Expand All @@ -46,14 +46,14 @@ apollo-adapters = { module = "com.apollographql.apollo:apollo-adapters", version
apollo-cache = { module = "com.apollographql.apollo:apollo-normalized-cache", version.ref = "apollo" }
apollo-cache-sqlite = { module = "com.apollographql.apollo:apollo-normalized-cache-sqlite", version.ref = "apollo" }
apollo-testing-support = { module = "com.apollographql.apollo:apollo-testing-support", version.ref = "apollo" }
calendar = { module = "com.kizitonwose.calendar:compose-multiplatform", version = "2.5.4" }
calendar = { module = "com.kizitonwose.calendar:compose-multiplatform", version = "2.9.0" }
composemultiplatformcharts = { module = "io.github.koalaplot:koalaplot-core", version = "0.9.1" }
composemultiplatformcharts2 = { module = "io.github.thechance101:chart", version = "Beta-0.0.5" }
coil-compose = { module = "io.coil-kt.coil3:coil-compose", version.ref = "coil3" }
coil-compose-core = { module = "io.coil-kt.coil3:coil-compose-core", version.ref = "coil3" }
coil-network = { module = "io.coil-kt.coil3:coil-network-ktor3", version.ref = "coil3" }
composecharts = { module = "io.github.bytebeats:compose-charts", version = "0.2.1" }
compose-placeholder = { module = "com.eygraber:compose-placeholder", version = "1.0.11" }
compose-placeholder = { module = "com.eygraber:compose-placeholder", version = "1.0.12" }
coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "coroutines" }
coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
Expand All @@ -64,7 +64,7 @@ detekt-twitter-compose-rules = { module = "com.twitter.compose.rules:detekt", ve
gitlive-firebase-auth = { module = "dev.gitlive:firebase-auth", version.ref = "gitlive" }
gitlive-firebase-firestore = { module = "dev.gitlive:firebase-firestore", version.ref = "gitlive" }
gitlive-firebase-common = { module = "dev.gitlive:firebase-common", version.ref = "gitlive" }
gitlive-firebase-java = { module = "dev.gitlive:firebase-java-sdk", version = "0.6.2" }
gitlive-firebase-java = { module = "dev.gitlive:firebase-java-sdk", version = "0.6.3" }
jetbrains-compose-material-icons-extended = { module = "org.jetbrains.compose.material:material-icons-extended", version = "1.7.3" }
jetbrains-compose-material3 = { module = "org.jetbrains.compose.material3:material3", version.ref = "material3" }
jetbrains-compose-ui = { module = "org.jetbrains.compose.ui:ui", version.ref = "kotlin-multiplatform" }
Expand All @@ -82,7 +82,7 @@ jetbrains-lifecycle-viewmodel = { module = "org.jetbrains.androidx.lifecycle:lif
jetbrains-lifecycle-viewmodel-compose = { module = "org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "jetbrains-lifecycle" }
jetbrains-navigation-compose = { module = "org.jetbrains.androidx.navigation:navigation-compose", version.ref = "jetbrains-navigation" }
junit = { module = "junit:junit", version = "4.13.2" }
koin-android = {module = "io.insert-koin:koin-android", version = "4.1.0"}
koin-android = {module = "io.insert-koin:koin-android", version = "4.1.1"}
koin-annotations = {module = "io.insert-koin:koin-annotations", version.ref = "koin-ksp"}
koin-compose-viewmodel = {module = "io.insert-koin:koin-compose-viewmodel", version.ref = "koin"}
koin-compiler = {module = "io.insert-koin:koin-ksp-compiler", version = "koin-ksp"}
Expand All @@ -106,8 +106,8 @@ ktor-client-mock = { module = "io.ktor:ktor-client-mock", version.ref = "ktor" }
leakcanary = { module = "com.squareup.leakcanary:leakcanary-android", version = "2.14" }
mockk = { module = "io.mockk:mockk", version.ref = "mockk" }
mockk-android = { module = "io.mockk:mockk-android", version.ref = "mockk" }
multiplatform-log = { module = "co.touchlab:kermit", version = "2.0.6" }
multiplatform-constraintlayout-compose = { module = "tech.annexflow.compose:constraintlayout-compose-multiplatform", version = "0.6.0" }
multiplatform-log = { module = "co.touchlab:kermit", version = "2.0.8" }
multiplatform-constraintlayout-compose = { module = "tech.annexflow.compose:constraintlayout-compose-multiplatform", version = "0.6.1" }
sqldelight-androidDriver = { module = "app.cash.sqldelight:android-driver", version.ref = "sqlDelight" }
sqldelight-jvmDriver = { module = "app.cash.sqldelight:sqlite-driver", version.ref = "sqlDelight" }
sqldelight-nativeDriver = { module = "app.cash.sqldelight:native-driver", version.ref = "sqlDelight" }
Expand All @@ -116,27 +116,27 @@ timber = { module = "com.jakewharton.timber:timber", version = "5.0.1" }

# plugins
plugin-aboutlibraries = { module = "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin", version.ref = "aboutlibraries" }
plugin-android-gradle = { module = "com.android.tools.build:gradle", version = "8.12.2" }
plugin-android-gradle = { module = "com.android.tools.build:gradle", version = "8.13.0" }
plugin-androidcachefix = { module = "gradle.plugin.org.gradle.android:android-cache-fix-gradle-plugin", version = "3.0.1" }
plugin-appversioning = { module = "io.github.reactivecircus.appversioning:app-versioning-gradle-plugin", version = "1.5.0" }
plugin-compose-compiler = { module = "org.jetbrains.kotlin:compose-compiler-gradle-plugin", version.ref = "kotlin" }
plugin-detekt = { module = "io.gitlab.arturbosch.detekt:detekt-gradle-plugin", version.ref = "detekt" }
plugin-easylauncher = { module = "com.project.starter:easylauncher", version = "6.4.1" }
plugin-firebase-perf = { module = "com.google.firebase:perf-plugin", version = "2.0.1" }
plugin-google-services = { module = "com.google.gms:google-services", version = "4.4.3" }
plugin-google-services = { module = "com.google.gms:google-services", version = "4.4.4" }
plugin-kotlin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" }
plugin-ksp = { module = "com.google.devtools.ksp:com.google.devtools.ksp.gradle.plugin", version.ref = "ksp" }
plugin-ruler = { module = "com.spotify.ruler:ruler-gradle-plugin", version = "1.4.0" }
plugin-spotless = { module = "com.diffplug.spotless:spotless-plugin-gradle", version = "7.2.1" }
plugin-spotless = { module = "com.diffplug.spotless:spotless-plugin-gradle", version = "8.0.0" }
plugin-versions = "com.github.ben-manes:gradle-versions-plugin:0.52.0"
plugin-versions-update = "nl.littlerobots.vcu:plugin:1.0.0"
plugin-versions-update = "nl.littlerobots.vcu:plugin:1.0.1"
plugin-violation = { module = "se.bjurr.violations:violation-comments-to-github-gradle-plugin", version = "1.70.0" }
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }

[plugins]
apollo = { id = "com.apollographql.apollo", version.ref = "apollo" }
google-secrets = { id = "com.google.android.libraries.mapsplatform.secrets-gradle-plugin", version = "2.0.1" }
gradledoctor = { id = "com.osacky.doctor", version = "0.12.0" }
gradledoctor = { id = "com.osacky.doctor", version = "0.12.1" }
kotlinx-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
multiplatform = { id = "org.jetbrains.compose", version.ref = "kotlin-multiplatform" }
Expand Down
8 changes: 4 additions & 4 deletions iosApp/iosApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
0457A8632DAADD9500408A38 /* FirebaseFirestore in Frameworks */ = {isa = PBXBuildFile; productRef = 0457A8622DAADD9500408A38 /* FirebaseFirestore */; };
0457A8652DAADE5400408A38 /* FirebaseDatabase in Frameworks */ = {isa = PBXBuildFile; productRef = 0457A8642DAADE5400408A38 /* FirebaseDatabase */; };
0457A8672DAADEA700408A38 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0457A8662DAADEA700408A38 /* libsqlite3.tbd */; };
0457A8692DAADF5700408A38 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 0457A8682DAADF5700408A38 /* GoogleService-Info.plist */; };
048D4A842DE8ADDD00724956 /* FirebaseAuth in Frameworks */ = {isa = PBXBuildFile; productRef = 048D4A832DE8ADDD00724956 /* FirebaseAuth */; };
04965E412B8BAEC700395EB9 /* iosAppApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04965E402B8BAEC700395EB9 /* iosAppApp.swift */; };
04965E432B8BAEC700395EB9 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04965E422B8BAEC700395EB9 /* ContentView.swift */; };
04965E452B8BAEC800395EB9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 04965E442B8BAEC800395EB9 /* Assets.xcassets */; };
04965E492B8BAEC800395EB9 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 04965E482B8BAEC800395EB9 /* Preview Assets.xcassets */; };
1B5856502E9ED71100438B3A /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 1B58564F2E9ED71100438B3A /* GoogleService-Info.plist */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -26,7 +26,6 @@
0457A8592DAAD9DD00408A38 /* FirebaseCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = FirebaseCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
0457A85C2DAADA5200408A38 /* FirebaseCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = FirebaseCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
0457A8662DAADEA700408A38 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS18.2.sdk/usr/lib/libsqlite3.tbd; sourceTree = DEVELOPER_DIR; };
0457A8682DAADF5700408A38 /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
04965E3D2B8BAEC700395EB9 /* iosApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iosApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
04965E402B8BAEC700395EB9 /* iosAppApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = iosAppApp.swift; sourceTree = "<group>"; };
04965E422B8BAEC700395EB9 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = "<group>"; };
Expand All @@ -37,6 +36,7 @@
04ACCBDF2D87500200857DA4 /* FirebaseCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = FirebaseCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
04BD92462CC57A34006084B7 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
04C6C2632D82C5F600DDB971 /* FirebaseCore.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = FirebaseCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
1B58564F2E9ED71100438B3A /* GoogleService-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -75,7 +75,7 @@
04965E3F2B8BAEC700395EB9 /* iosApp */ = {
isa = PBXGroup;
children = (
0457A8682DAADF5700408A38 /* GoogleService-Info.plist */,
1B58564F2E9ED71100438B3A /* GoogleService-Info.plist */,
04BD92462CC57A34006084B7 /* Info.plist */,
04965E402B8BAEC700395EB9 /* iosAppApp.swift */,
04965E422B8BAEC700395EB9 /* ContentView.swift */,
Expand Down Expand Up @@ -173,7 +173,7 @@
buildActionMask = 2147483647;
files = (
04965E492B8BAEC800395EB9 /* Preview Assets.xcassets in Resources */,
0457A8692DAADF5700408A38 /* GoogleService-Info.plist in Resources */,
1B5856502E9ED71100438B3A /* GoogleService-Info.plist in Resources */,
04965E452B8BAEC800395EB9 /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?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>
<key>SchemeUserState</key>
<dict>
<key>iosApp.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
Binary file not shown.
8 changes: 6 additions & 2 deletions iosApp/iosApp/GoogleService-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>129903346150-rcl4gve552q0g6ock3riei1uupq2moce.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.129903346150-rcl4gve552q0g6ock3riei1uupq2moce</string>
<key>API_KEY</key>
<string>AIzaSyCEcoV6soF-T9LMLMmXFXgR6JmbGfp1vf0</string>
<key>GCM_SENDER_ID</key>
<string>129903346150</string>
<key>PLIST_VERSION</key>
<string>1</string>
<key>BUNDLE_ID</key>
<string>com.jarroyo.composeapp.debug</string>
<string>com.jarroyo.composeapp</string>
<key>PROJECT_ID</key>
<string>virtualgym-684f7</string>
<key>STORAGE_BUCKET</key>
Expand All @@ -25,6 +29,6 @@
<key>IS_SIGNIN_ENABLED</key>
<true></true>
<key>GOOGLE_APP_ID</key>
<string>1:129903346150:ios:c5248395c469a52e09d627</string>
<string>1:129903346150:ios:48885efc4065251609d627</string>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import kotlinx.datetime.format
import kotlinx.datetime.format.char

fun LocalDateTime.format(): String = format(LocalDateTime.Format {
dayOfMonth()
day()
char('/')
monthNumber()
char('/')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import org.koin.compose.viewmodel.koinViewModel
import kotlinx.datetime.Clock
import kotlin.time.Clock
import kotlin.time.ExperimentalTime

@Composable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ import com.jarroyo.composeapp.library.network.api.graphql.fragment.LaunchFragmen
import com.jarroyo.feature.launches.ui.launchlist.LaunchListContract.Event
import com.jarroyo.library.ui.shared.component.placeholder
import com.jarroyo.library.ui.shared.theme.Spacing
import kotlinx.datetime.TimeZone
import kotlinx.datetime.toLocalDateTime
import kotlin.time.ExperimentalTime

@OptIn(ExperimentalMaterialApi::class)
@OptIn(ExperimentalMaterialApi::class, ExperimentalTime::class)
@Composable
fun LaunchListItem(
item: LaunchFragment,
Expand Down Expand Up @@ -89,10 +88,10 @@ fun LaunchListItem(
"- Company: ${item.rocket?.rocket?.rocketFragment?.company.orEmpty()}",
modifier = Modifier.placeholder(placeholder),
)
Text(
"- Date: ${item.launch_date_local?.toLocalDateTime(TimeZone.UTC)}",
modifier = Modifier.placeholder(placeholder),
)
Text(
"- Date: ${item.launch_date_local}",
modifier = Modifier.placeholder(placeholder),
)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import org.koin.compose.viewmodel.koinViewModel
import kotlin.time.ExperimentalTime
import kotlinx.datetime.Clock
import kotlin.time.Clock

@Composable
fun LaunchListScreen(viewModel: LaunchListViewModel = koinViewModel<LaunchListViewModel>()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import kotlin.test.BeforeTest
import kotlin.test.Test
import kotlin.test.assertEquals
import kotlin.test.assertIs
import kotlin.time.Clock
import kotlin.time.ExperimentalTime

class GetLaunchDetailInteractorImplTest {
Expand Down Expand Up @@ -77,7 +78,7 @@ class FakeResolver : DefaultFakeResolver(
@OptIn(ExperimentalTime::class)
override fun resolveLeaf(context: FakeResolverContext): Any =
when (context.mergedField.type.rawType().name) {
"Date" -> kotlinx.datetime.Clock.System.now()
"Date" -> Clock.System.now()
else -> super.resolveLeaf(context)
}
}
4 changes: 2 additions & 2 deletions modules/library-network-api/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ apollo {
generateDataBuilders.set(true)
mapScalar(
"Date",
"kotlinx.datetime.Instant",
"com.apollographql.apollo.adapter.KotlinxInstantAdapter"
"kotlin.time.Instant",
"com.jarroyo.library.network.api.adapter.KotlinTimeInstantAdapter"
)
introspection {
endpointUrl.set("https://spacex-production.up.railway.app/")
Expand Down
Loading
Loading