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

Multiplatform #39

Draft
wants to merge 39 commits into
base: master
Choose a base branch
from
Draft

Multiplatform #39

wants to merge 39 commits into from

Conversation

luca992
Copy link

@luca992 luca992 commented Jun 6, 2022

A multiplatform port of the project. Kotlin and dependencies have been updated to the latest

Targets:

"macosX64", "macosArm64",
"iosArm64", "iosX64", "iosSimulatorArm64",
"tvosArm64", "tvosX64", "tvosSimulatorArm64",
"watchosArm32", "watchosArm64", "watchosX86", "watchosX64", "watchosSimulatorArm64",
"linuxX64"
"mingwX64"
"jvm"
"js"

Libraries ported:
okhttp -> ktor
moshi -> kotlinx.serialization

Multiplatform file support with okio

It's working well so far for me. I published a release here:

implementation("io.github.luca992:ipfs-api:0.17.0")

Todo:

  • Port jvm tests to multiplatform
  • Figure out if anything in the root build.gradle.kts was needed

dependabot bot and others added 30 commits May 11, 2022 09:57
Bumps [mockk](https://github.com/mockk/mockk) from 1.12.0 to 1.12.4.
- [Release notes](https://github.com/mockk/mockk/releases)
- [Commits](mockk/mockk@v1.12.0...1.12.4)

---
updated-dependencies:
- dependency-name: io.mockk:mockk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
for tests set responses serving json to have a header of 

setHeader("Content-Type", ContentType.Application.Json)
note ktor automatically mulitpart request headers look like:
Content-Disposition: form-data; name=""; file; filename="temptestdir7160507879139843984%2Fsubdir"
Content-Transfer-Encoding: binary
Content-Type: application/x-directory
Content-Length: 0

vs Perviously with OkHttp:

Content-Disposition: file; filename="temptestdir14927010351886631568%2Fsubdir"
Content-Transfer-Encoding: binary
Content-Type: application/x-directory; charset=utf-8
Content-Length: 0
that way the library artifact has an appropriate name when publishing outside of jitpack
BufferedSource.readByteArray clears the source buffer. Which was not my intention
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.

None yet

1 participant