Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[apollo-normalized-cache] Add the Kotlin multiplatform plugin #2447

Conversation

martinbonnin
Copy link
Contributor

@martinbonnin martinbonnin commented Jul 15, 2020

This PR is dependent on #2446

It adds the Kotlin multiplatform plugin to apollo-normalized-cache. Everything ApolloStore and LruNormalizedCache is still in jvmMain due to JVM dependencies.

@martinbonnin martinbonnin changed the title Feature 2144/make apollo normalized cache multiplatform [apollo-normalized-cache] add the Kotlin multiplatform plugin Jul 15, 2020
@martinbonnin martinbonnin changed the title [apollo-normalized-cache] add the Kotlin multiplatform plugin [apollo-normalized-cache] Add the Kotlin multiplatform plugin Jul 15, 2020

fun map(): Map<String, Any?> {
return Collections.unmodifiableMap(buffer)
return buffer.toList().sortedBy { it.first }.toMap()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should buffer.toSortedMap() do the same?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't find a toSortedMap for iOS :(

@martinbonnin martinbonnin force-pushed the feature-2144/make-apollo-normalized-cache-multiplatform branch from 3dca6a6 to ad59c55 Compare July 20, 2020 12:37
@martinbonnin martinbonnin merged commit c797786 into feature-2144/convert-apollo-normalized-cache-to-kotlin Jul 20, 2020
@martinbonnin martinbonnin deleted the feature-2144/make-apollo-normalized-cache-multiplatform branch July 20, 2020 17:28
martinbonnin added a commit that referenced this pull request Jul 20, 2020
* Rename .java to .kt

* convert ResponseNormalizer to Kotlin

* Rename .java to .kt

* convert SimpleStack to Kotlin

* Rename .java to .kt

* convert NoOpApolloStore to Kotlin

* make it compile

* make it compile

* unbreak tests

* add comments

* code review

* [apollo-normalized-cache] Add the Kotlin multiplatform plugin (#2447)

* introduce the plugin multiplatform plugin

* remove some java imports

* remove the fieldNameComparator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants