chimbori / crux

Crux offers a flexible plugin-based API & implementation to extract interesting information from Web pages.
Apache License 2.0
239 stars 43 forks source link

Multiplatform support #29

Open LaatonWalaBhoot opened 10 months ago

LaatonWalaBhoot commented 10 months ago

As the title says. Provisions for KMP support by moving from OkHttp to Ktor And Jsoup to https://github.com/fleeksoft/ksoup I would be happy to provide a PR and contribute to this. Would anyone be interested in helping out?

chimbori commented 10 months ago

Sounds like a good idea! The way I would like to think about this is,

LaatonWalaBhoot commented 10 months ago

Would it not make it difficult to maintain? Having to provide feature updates to both libraries? As far as I understand if we can achieve consistent behavior then dependents won't have any issues no? Agree on the tests part.

chimbori commented 10 months ago

Crux exports both Jsoup and OkHttp as API dependencies, and also returns native JSoup objects. So moving to KSoup will be a breaking change for all clients.

Since many clients already use JSoup, we cannot reasonably expect everyone to fully move over to KSoup, even after it reaches full maturity.

LaatonWalaBhoot commented 10 months ago

Do I publish the KMP library separately from this? I will link it to Crux and give credits. Or is there an alternative that you can propose since functionality will be almost similar?

chimbori commented 10 months ago

It’s possible to have two or more separate libraries published from the same repo; that seems like a preferable approach so that everything stays in one place, and still can be optionally imported by clients.

LaatonWalaBhoot commented 8 months ago

@chimbori Have raised PR #30. Please take a look