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

Use new Kotlin/JS plugin #1983

Merged
merged 3 commits into from
May 19, 2020
Merged

Use new Kotlin/JS plugin #1983

merged 3 commits into from
May 19, 2020

Conversation

turansky
Copy link
Contributor

@turansky turansky commented May 2, 2020

Part of #1938

@turansky turansky mentioned this pull request May 2, 2020
53 tasks
@qwwdfsad qwwdfsad requested review from elizarov and skuzmich May 7, 2020 12:23
@elizarov
Copy link
Contributor

elizarov commented May 7, 2020

Look good to me. Note, that the new Kotlin/JS has build-in Webpack support and it should be possible to completely get rid of the custom node configuration in gradle/node-js.gradle.

Copy link
Member

@skuzmich skuzmich left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! This is one step closer to enabling JS IR build of this example.

Please add

diff --git a/js/example-frontend-js/npm/webpack.config.js b/js/example-frontend-js/npm/webpack.config.js
index a208d047..8428c557 100644
--- a/js/example-frontend-js/npm/webpack.config.js
+++ b/js/example-frontend-js/npm/webpack.config.js
@@ -38,6 +38,7 @@ module.exports = {
     resolve: {
         modules: [
             path.resolve(__dirname, "kotlin-js-min/main"),
+            path.resolve(__dirname, "kotlin-js-min/legacy/main"),
             path.resolve(__dirname, "../src/main/web/")
         ]
     },

as this place is changed in 1.4-M1 with kotlin.js.compiler=both property. Can be tested it with -Pkotlin_version=1.4-M1 -Patomicfu_version=0.14.2-1.4-M1 -Phtml_version=0.7.1-build-1707 and a @file:Suppress("NO_EXPLICIT_VISIBILITY_IN_API_MODE")

Otherwise looks good to me.

@turansky
Copy link
Contributor Author

turansky commented May 7, 2020

Next 2 steps after this PR:

  1. Use new MPP plugin for core
  2. Use build/distributions in examples
    2.1. Remove old DCE

@skuzmich Could I skip your change request in this case (CR will be removed in step 2)?

@turansky
Copy link
Contributor Author

turansky commented May 7, 2020

Note, that the new Kotlin/JS has build-in Webpack support and it should be possible to completely get rid of the custom node configuration in gradle/node-js.gradle.

One of the goal of this PR - simplify migration to Kotlin DSL (no gradle/node-js.gradle == no migration required)

gradle/test-mocha-js.gradle also in "remove list"

@turansky turansky requested a review from skuzmich May 7, 2020 17:17
@skuzmich
Copy link
Member

skuzmich commented May 7, 2020

If kotlinx.coroutines maintainers are OK with temporarily breaking 1.4 builds in one more place, I can lift the change request.
cc @elizarov

@qwwdfsad qwwdfsad changed the base branch from develop to kts-transition May 19, 2020 15:03
@qwwdfsad qwwdfsad merged commit d85d33b into Kotlin:kts-transition May 19, 2020
qwwdfsad pushed a commit that referenced this pull request Aug 24, 2020
* Use new Kotlin/JS plugin
* Support legacy DCE mode for 1.4-M2
qwwdfsad pushed a commit that referenced this pull request Aug 25, 2020
Non-deprecated 'jmhJar' configuration (#2032) (+9 squashed commits)
Squashed commits:
[8d07d36] Use new Kotlin/JS plugin (#1983)
* Use new Kotlin/JS plugin
* Support legacy DCE mode for 1.4-M2
[d224640] Add Dokka configuration method
[56e1c9b] Dokka plugin in 'buildSrc'
[dfdd202] Remove unused repositories
[4cf1d02] Kotlin DSL - 'javafx'
[d8f7d50] Avoid task name duplication
[f06a56b] Avoid task name duplication
[a09df3d] Separate 'UnpackAar' action
[fd5bf6b] Separate 'RunR8' task
qwwdfsad pushed a commit that referenced this pull request Aug 25, 2020
Non-deprecated 'jmhJar' configuration (#2032) (+9 squashed commits)
Squashed commits:
[8d07d36] Use new Kotlin/JS plugin (#1983)
* Use new Kotlin/JS plugin
* Support legacy DCE mode for 1.4-M2
[d224640] Add Dokka configuration method
[56e1c9b] Dokka plugin in 'buildSrc'
[dfdd202] Remove unused repositories
[4cf1d02] Kotlin DSL - 'javafx'
[d8f7d50] Avoid task name duplication
[f06a56b] Avoid task name duplication
[a09df3d] Separate 'UnpackAar' action
[fd5bf6b] Separate 'RunR8' task
recheej pushed a commit to recheej/kotlinx.coroutines that referenced this pull request Dec 28, 2020
Non-deprecated 'jmhJar' configuration (Kotlin#2032) (+9 squashed commits)
Squashed commits:
[8d07d36] Use new Kotlin/JS plugin (Kotlin#1983)
* Use new Kotlin/JS plugin
* Support legacy DCE mode for 1.4-M2
[d224640] Add Dokka configuration method
[56e1c9b] Dokka plugin in 'buildSrc'
[dfdd202] Remove unused repositories
[4cf1d02] Kotlin DSL - 'javafx'
[d8f7d50] Avoid task name duplication
[f06a56b] Avoid task name duplication
[a09df3d] Separate 'UnpackAar' action
[fd5bf6b] Separate 'RunR8' task
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.

4 participants