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

Support plain kotlin("js") project #1821

Closed
SerVB opened this issue Feb 10, 2022 · 3 comments · Fixed by #1851
Closed

Support plain kotlin("js") project #1821

SerVB opened this issue Feb 10, 2022 · 3 comments · Fixed by #1851
Assignees
Labels
gradle Gradle plugin problems question Not a bug, but question or comment web

Comments

@SerVB
Copy link
Member

SerVB commented Feb 10, 2022

For now, only kotlin("multiplatform") plugin is supported, but I have a project with kotlin("js") plugin and I don't want to switch it to multiplatform with a single source set.

@olonho
Copy link
Contributor

olonho commented Feb 10, 2022

What are your reasons?

@SerVB
Copy link
Member Author

SerVB commented Feb 10, 2022

Reasons why I don't want to switch my subproject from kotlin("js") to kotlin("multiplatform"):

  1. Paths for source roots become different, I have to move sources that can cause some git conflicts since there are multiple simultaneous contributors to the project. Another option is to configure paths manually to make them like old ones, but it makes the configuration more complex.
  2. Names of tasks now have js prefix, so I need to rewrite some of my buildscripts that reference tasks from this project that is quite tedious. Another option is to create wrapper tasks with old names that will call new tasks with the prefix, but it again adds boilerplate in the configuration.
  3. Configuration of a multiplatform module is itself a bit more wordy that the one of a similar js module.
  4. The project isn't intended to be multiplatform (at least for now), so there is no need of making the builder support multiplatform features.

Probably some other reasons that I will formulate later, not without thinking.

Also, some other plugins like kx.serialization support any kotlin plugin, not only multiplatform, and it's handy. So Compose plugin could provide the same experience.

@akurasov akurasov added web question Not a bug, but question or comment labels Feb 11, 2022
@JakeWharton
Copy link

Are there a list of reasons that the plain Kotlin JVM plugin is supported? Surely anyone targeting the JVM could use the multiplatform plugin with a JVM target. I would expect the justifications for the JVM plugin being supported are similar to those which advocate for the JS plugin being supported.

And if support of the JS plugin is to be rejected, does that mean we can expect the support for the JVM plugin to also be removed for symmetry?

While I echo the reasons that @SerVB listed, I also think simple symmetry with the support for the JVM plugin is itself a strong enough argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gradle Gradle plugin problems question Not a bug, but question or comment web
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants