Skip to content
This repository was archived by the owner on Jun 27, 2020. It is now read-only.
This repository was archived by the owner on Jun 27, 2020. It is now read-only.

Missing Gradle plugin ID inhibits usage in kotlin gradle scripts  #143

Open
@sambsnyd

Description

@sambsnyd

The kotlin-frontend plugin doesn't have a Gradle plugin id.
See Gradle's guide for including a plugin id.

I'm happy to provide a pull request that adds such an id. How does "org.jetbrains.kotlin.js.frontend" sound?

There are a number of unfortunate consequences of not having this id. Chiefly, it makes this plugin much harder to use with Gradle 5.0+ and .gradle.kts build scripts.

In Gradle 4.0, handy type safe accessors like DependencyHandler.compile() could be manually generated. As of Gradle 5.0 this is no longer an option. Only plugins applied via plugins get the nice, type safe DSL accessors. Plugins require an id to be applied via plugins. So the lack of such an ID makes it huge pain to use the kotlin-frontend plugin with kotlin build scripts.

buildscript {
   // configure repositories to include kotlin-eap 
}
apply plugin: "kotlin2js"
apply plugin: // kotlin frontend 
dependencies {
    compile("group:module:version") // script compilation will fail in Gradle 5.0
}

kotlinFrontend { // script compilation will fail in Gradle 5.0

}

Activity

markjfisher

markjfisher commented on May 2, 2019

@markjfisher

This would be a really nice thing to have, particularly as this whole plugin is being used in the context of kotlin.

The first thing I looked for was how to include it via an ID, and then subsequently found this issue.

Would it progress quicker if a PR was generated rather than waiting for someone to say "go ahead"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @markjfisher@sambsnyd

        Issue actions

          Missing Gradle plugin ID inhibits usage in kotlin gradle scripts · Issue #143 · Kotlin/kotlin-frontend-plugin