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

Extension with name 'kotlin' does not exist #146

Closed
steelxt opened this issue Mar 21, 2019 · 3 comments
Closed

Extension with name 'kotlin' does not exist #146

steelxt opened this issue Mar 21, 2019 · 3 comments

Comments

@steelxt
Copy link

steelxt commented Mar 21, 2019

despite #142 warn about must include kotlin plugin first I'm getting:

Extension with name 'kotlin' does not exist. Currently registered extension names: [ext, defaultArtifacts, reporting, sourceSets, java]

yes I have settings setup :

`pluginManagement {

repositories {
    gradlePluginPortal()
    maven { setUrl("https://jcenter.bintray.com/") }
    maven { setUrl("https://dl.bintray.com/kotlin/kotlin-eap") }    }


resolutionStrategy {
    eachPlugin {
        println "req id =  $requested.id.id"
        println "req id =  $requested.version"

        if (requested.id.id == "kotlin2js") {


            useModule("org.jetbrains.kotlin:kotlin-gradle-plugin:${requested.version}")
        }
        if( requested.id.id == 'org.jetbrains.kotlin.frontend') {
            useModule("org.jetbrains.kotlin:kotlin-frontend-plugin:${requested.version}")
        }
    }
}

}`

but I'm using build.gradle.kts in my sub project:

plugins { id("kotlin2js") id("org.jetbrains.kotlin.frontend") version "0.0.45" }

without no luck, can you help and guide my to right direction?

@Lewik
Copy link

Lewik commented Mar 26, 2019

+1

@steelxt
Copy link
Author

steelxt commented Mar 27, 2019

Solved.
I was applying some plugins in gradle.build.kts parent, It seems to be working only applying local build files with.

@steelxt steelxt closed this as completed Mar 27, 2019
@Lewik
Copy link

Lewik commented Apr 19, 2019

In addition, check order of plugins

https://stackoverflow.com/questions/42158019/extension-with-name-android-does-not-exist-error-when-adding-kotlin-to-andro

my config was (and it fails)

apply plugin: 'org.jetbrains.kotlin.frontend'
apply plugin: 'kotlin-platform-js'
apply plugin: 'kotlinx-serialization'

Order below works

apply plugin: 'kotlin-platform-js'
apply plugin: 'kotlinx-serialization'
apply plugin: 'org.jetbrains.kotlin.frontend'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants