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

Document how to use from Gradle #324

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

epabst
Copy link

@epabst epabst commented Jul 3, 2020

No description provided.


Dukat will automatically run for npm dependencies by specifying the following in `build.gradle`:
```
kotlin.js.experimental.generateKotlinExternals=true
Copy link
Contributor

Choose a reason for hiding this comment

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

This is only correct for Kotlin/JS Gradle plugin 1.3.x.
With 1.4 the property was renamed and you can now even configure per dependency whether to run Dukat on it or not.
But do you really think this belongs in the Dukat documentation?
I think this is more suited in the Kotlin/JS Gradle Plugin documentation and actually it is documented there: https://kotlinlang.org/docs/reference/js-external-declarations-with-dukat.html

```
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin
...
NodeJsRootPlugin.apply(project).apply {
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of applying the root plugin manually, you should just configure the extension like

configure<NodeJsRootExtension> {
    versions.dukat.version = "0.5.7"
}

Which should probably also be shown in the Kotlin/JS Gradle plugin documentation.

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.

2 participants