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

Add jvm, js and wasmJs targets #3

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

frogggias
Copy link

Extends KMP support to JVM, JS, and JS WASM targets, closes #2

  • urlencoder:1.6.0 dependency is upgraded because it adds more KMP targets
  • Changes in Buffer, CharArrayBuffer, and ParserStateMachine are made because of the signature clash on the JS platform.

@frogggias
Copy link
Author

Also, I updated the publishing configuration and the Readme accordingly - verified on the local maven repository on the KMP project (JVM, Android, JS, WASM JS) and pure Android project.

Unable to verify that configuration is working for publishing to mavenCentral.


Add this to your dependencies:

`implementation 'io.stepuplabs.spaydkmp:spayd-kmp-android:<latest-version>'`
`implementation 'io.stepuplabs.spaydkmp:spayd-kmp:<latest-version>'`
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure about changing the artifact name. Is it because the code doesn't have any Android-specific dependencies and it's pure JVM code?

Copy link
Author

Choose a reason for hiding this comment

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

Exactly, there is nothing Android-specific right now. The whole Android-specific implementation can be removed, with the removal of minSdk limitation as a positive side effect.

Several generated modules for different platforms should be resolved correctly when using root spayd-kmp.

spayd-kmp
spayd-kmp-iosarm64
spayd-kmp-iossimulatorarm64
spayd-kmp-iosx64
spayd-kmp-js
spayd-kmp-jvm
spayd-kmp-wasm-js

For some reason, it doesn't work this way when using the deployer publishing, but works with publishToMavenLocal task and default shared-* artifacts.

I will investigate it further.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, I agree with removing Android specific implementation and changing the artifactId.

We are using MavenDeployer plugin for deploying to Central. It also support local deploy, so please try to deploy locally and see what artifacts in generated.

When it will be published to Central, there will be just one artifact or multiple?

Also, I'm not sure how it works in Javascript world with the KMP & dependencies - should we deploy to some JS specific repository like NPM?

@frogggias frogggias marked this pull request as draft January 10, 2025 06:46
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.

Broader KMP targets support
2 participants