JetBrains / markdown

Markdown parser written in kotlin
Apache License 2.0
706 stars 78 forks source link

Enable iOS build target #67

Closed ajalt closed 3 years ago

ajalt commented 3 years ago

iOS was disabled due to the fact that the test suite accessed files on the local file system which accessible on the simulator. This commit moves all such tests to a new source set: fileBasedTest. All test source set except ios depend on this new source set, so running gradle test on any platform will run all tests that run on that platform.

The resources for the performance test were moved into jvmTest instead of fileBasedTest, since the performance test is jvm-only.

Fixes #66

valich commented 3 years ago

I've merged this one manually due to simple conflicts I had to resolve in IDE.

Now the remaining question (an old one) is how to publish this thing to maven with all platform-dependent publications together. I remember you were saying that you have a working example of such thing on github actions, could you send me a link once more? I will try to set similar thing on TC

ajalt commented 3 years ago

Great! Here's a blog post talking about using multiple GitHub Actions runners to publish artifacts for the various KMP targets.

Here's the workflow of one of my projects that publishes to the various targets. I use the windows runner to publish the mingw target, and the mac runner to publish everything else. Once all targets have been published to the Sonatype staging repository, I go in to their UI and release all the artifacts manually.

For versioning the artifacts, I fetch the git tags and use them in a gradle script to determine the current version, and whether it's a snapshot or not. Many projects just manually write the snapshot version in gradle.properties, so you could do something like that instead if you want.

valich commented 3 years ago

Oh. I somehow thought that one has to collect all the artifacts on a single machine and then publish everything for all OSes from it. If we can do two publications (from macOS and Windows), that's pretty doable, I will try it now.

We store versions in gradle.properties and I'm fine with bumping version manually for now :)

valich commented 3 years ago

I've set up agents on TC and have released 0.2.3 to maven-central (they should appear tomorrow, I believe)

This is probably very obvious, but I've just realized, this whole thing actually works because

  1. Different OS targets are actually different artifacts with different ids
  2. Even if some OS can't produce artifacts for all targets, it still produces the correct .module file referencing nonexistnent (yet) artifacts