snrostov
06/19/2019, 4:45 PMValentyn
06/19/2019, 5:31 PMJoffrey
06/19/2019, 9:49 PMsdeleuze
06/20/2019, 8:41 AMgradle.build.kts
that have been upgraded to use this new Gradle Kotlin/JS plugin?snrostov
06/20/2019, 8:43 AMsnrostov
06/20/2019, 8:45 AMsnrostov
06/20/2019, 8:45 AMsdeleuze
06/20/2019, 8:47 AMsdeleuze
06/20/2019, 8:48 AMgradle.build.kts
😉 ?snrostov
06/20/2019, 8:48 AMsnrostov
06/20/2019, 8:48 AMAny plan to migrate the sample app toYou mean sample app in wizard?😉 ?gradle.build.kts
sdeleuze
06/20/2019, 8:50 AMsdeleuze
06/20/2019, 8:54 AMsnrostov
06/20/2019, 8:54 AMsdeleuze
06/20/2019, 8:54 AMsdeleuze
06/20/2019, 8:55 AMsdeleuze
06/20/2019, 8:55 AMsdeleuze
06/20/2019, 8:55 AMsdeleuze
06/20/2019, 8:56 AMsdeleuze
06/20/2019, 8:57 AMsdeleuze
06/20/2019, 8:58 AMbuild.gradle.kts
files is generated.snrostov
06/20/2019, 9:15 AMhttps://github.com/sdeleuze/spring-kotlin-fullstackIt seems this sample using old multiplatform kotlin gradle plugins. Unfortunately new kotlin/js plugin incompatible with it. I can help with updating it to the new multiplatform plugin with new kotlin/js plugin features. I will send PR.
snrostov
06/20/2019, 9:15 AMsdeleuze
06/20/2019, 9:18 AMU75957
06/20/2019, 10:00 AMplugins {
id("kotlin2js") version "1.3.40"
}
to
plugins {
kotlin("js") version "1.3.40"
}
I get Task with name 'compileKotlin2Js' not found in root project 'project_name'.
I use compileKotlin2Js
task to specify KotlinJsOptions
.
Is there any documentation on how to use the plugin?
Also how to extend compileKotlin2Js
to create several tasks/compilations of one source set with different KotlinJsOptions
?
Also what about DCE? How to turn it on with new plugin?Joffrey
06/20/2019, 10:11 AMsnrostov
06/20/2019, 10:43 AMsnrostov
06/20/2019, 10:48 AMI getIn the new plugin, it is calledI useTask with name 'compileKotlin2Js' not found in root project 'project_name'.
task to specifycompileKotlin2Js
.KotlinJsOptions
compileKotlinJs
. The reason is that this new plugin works the same as the JS part of the multiplatform plugin.snrostov
06/20/2019, 10:52 AMAlso how to extendDebug/release and other build variants currently not supported out of box. We are just started to design it… But you can still create all tasks manually.to create several tasks/compilations of one source set with differentcompileKotlin2Js
? Also what about DCE? How to turn it on with new plugin?KotlinJsOptions
sdeleuze
06/20/2019, 11:48 AMU75957
06/20/2019, 11:48 AMcompileKotlinJs
do the job.
And just for note: my use-case with build variants is such that I need one build with main = "call"
and other with main = "noCall"
. For now I have Copy task, which also just remove line with main()
call from build. (not a very beautiful decision, but I don't know how to do otherwise)sdeleuze
06/20/2019, 1:00 PMsnrostov
06/20/2019, 1:04 PMU75957
06/20/2019, 2:39 PMsnrostov
06/21/2019, 6:06 AMpatrickdelconte
06/21/2019, 11:05 AMfrank
06/29/2019, 11:01 AMkotlin("js")
and you say:
In the new plugin, it is calledbut can't resolve the reference to task `compileKotlinJs`:.compileKotlinJs
compileKotlinJs.kotlinOptions {
outputFile = "routes/node/index2.js"
}
I changed to: (Work)
tasks {
"compileKotlinJs"(Kotlin2JsCompile::class) {
kotlinOptions.outputFile = "routes/node/index2.js"
kotlinOptions.metaInfo = false
}
}
Some reason why it doesn't work shortened call to compileKotlinJs?