Soren Valle
08/10/2019, 5:22 PMjcogilvie
08/12/2019, 7:42 PMoutputFile
onto compileKotlin2Js
actually seems to break the proposed code for assembleWeb
(since destinationDir
stops resolving)
https://kotlinlang.org/docs/tutorials/javascript/getting-started-gradle/getting-started-with-gradle.htmlBig Chungus
08/13/2019, 7:55 AMrobstoll
08/13/2019, 8:15 AMthana
08/13/2019, 1:31 PMThrowable
sean
08/13/2019, 1:37 PMts.d
or typescript definition off of compile to js?thana
08/13/2019, 1:56 PMasDynamic()
does not exist on tmp$
. How is that even possible? shouldn't asDynamic()
be inlined?hallvard
08/14/2019, 10:44 AMlooki
08/14/2019, 3:38 PMrince
08/14/2019, 3:38 PMJoffrey
08/14/2019, 5:47 PMmoduleKind
configuration in Gradle gives me a different error:
- default moduleKind
or `moduleKind="umd"`: " When accessing module declarations from UMD, they must be marked by both @JsModule and @JsNonModule "
- `moduleKind="plain"`: " Can't access function 'createStore' marked with @JsModule annotation from non-modular project "
- moduleKind="commonjs"
compiles the main
sources fine, but then I get the following for tests:
When accessing module declarations from UMD, they must be marked by both @JsModule and @JsNonModuleDid I miss something? Am I required to define a
moduleKind
separately for tests? Where is it then?Andrew K
08/15/2019, 4:41 AMspand
08/15/2019, 11:35 AMWarning:Kotlin: '.../.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlinx/kotlinx-coroutines-core-common/1.2.2/8b54928fbb813408684911eb27d6afeb23c92a4b/kotlinx-coroutines-core-common-1.2.2.jar' is not a valid Kotlin Javascript library
warningsSoren Valle
08/15/2019, 4:14 PMobject {}
with any number of properties and functions that will be processed in a given way. I would like to mark the properties to make logical decisions about them in the processor. If I understand correctly, js annotations are not possible. Is there another way? What I need specifically is I need properties of the object to exist in the definition but not the final product. Potentially I could have val prop1: String = "value" and val prop2: String = "value2"
and I would like to include prop1
but not prop2
.Sam Garfinkel
08/15/2019, 8:08 PMorg.jetbrains.kotlin.js
gradle plugin to run ts2kt
automatically? Does it do this already?FalseHonesty
08/18/2019, 10:41 PMKotlin
variable name. In my environment, I'd like to be able to use different versions of the stdlib, each containing the specific code it uses. To do this, I need to be able to control what the Kotlin
variable is actually called. Is this possible?thana
08/20/2019, 8:41 AMCannot add task 'processResources' as a task with that name already exists.
).
Or maybe it's gotten deprecated and i do not need it anymore?thana
08/20/2019, 1:55 PMSoren Valle
08/20/2019, 8:08 PMankushg
08/21/2019, 3:03 AMlibA
was a MPP that depended on stdlib
using implementation
- libB
was a MPP which depended on libA
and stdlib
using implementation
- libC
was a Kotlin/JS project, depending on libA
, libB
, and stdlib
using compile
I was able to build libC
with kotlin-dce-js
. I got a version of stdlib
that contained the overlap that was used by all three libraries. I could also use runDceKotlinJs.keep
to expose specific methods from libA
, libB
and libC
to be called from pure JS.
After bumping to Kotlin 1.3.41 however (still using kotlin2js
plugin), when I try to run :libC:runDceKotlinJs
, I get error messages complaining that error: duplicate target file will be created for '/opt/projects/my-repo/libA/build/libs/libA-js-0.1.4.jar!lib/kotlin.js' and '/Users/amgupt01/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-js/1.3.41/55b92e441b0ea9cbf079c6452b41687f95571524/kotlin-stdlib-js-1.3.41.jar!kotlin.js'
Any ideas?
EDIT: I've tried using the newer org.jetbrains.kotlin.js
plugin, as well as changing `libC`'s dependencies to be implementation
instead of compile
. Still no luck 😕spierce7
08/22/2019, 8:32 PMlinux_china
08/23/2019, 4:20 AMxlj44400
08/23/2019, 8:43 AMJuanoterocas
08/23/2019, 4:16 PMgalex
08/24/2019, 12:26 PMhellman
08/26/2019, 10:59 AMfcosta
08/26/2019, 1:44 PMwebpackTask {
runTask {
//todo: use dsl after KT-32016 will be fixed
devServer = new org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfigWriter.DevServer(
true, false, true, true, false,
8081,
["/api": "<http://0.0.0.0:8082>"],
["$projectDir/src/main/resources".toString()]
)
}
}
https://github.com/felipehjcosta/chat-app/blob/master/frontend/build.gradle#L26ankushg
08/27/2019, 12:48 AMankushg
08/27/2019, 4:32 AM@JsName
and automatically adds them to runDceKotlinJs.keep
?
Keeping DCE Keep and JsName declarations in sync seems to be a consistent annoyance for me, but doesn't seem to be getting much love from Jetbrains... would love to be able to write it myself, but I'm a little lost on figuring it out.hellman
08/27/2019, 5:53 AMgenerateExternals
is the task that calls Dukat and generates code for the TypeScript definitions? I’m having problems debugging it. The task completes successfully, but no code is generated for the NPM package I’ve included (lit-element).hellman
08/27/2019, 5:53 AMgenerateExternals
is the task that calls Dukat and generates code for the TypeScript definitions? I’m having problems debugging it. The task completes successfully, but no code is generated for the NPM package I’ve included (lit-element).snrostov
08/27/2019, 9:22 AM"typings": "lit-element.d.ts"
in lit-element/package.json
, but currently we are searching for types
key only. According to https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html, typings
should be supported too. hellman
08/27/2019, 1:54 PM