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.

Can't build, a problem occurred configuring project ':kotlinfrontend' #29

Open
@KirkBushman

Description

@KirkBushman

Hi,
when I try to build I get this error message,
I tried multiple configurations of gradle I found online, but nothing works...

this is the message:

* What went wrong:
A problem occurred configuring project ':kotlinfrontend'.
> Failed to notify project evaluation listener.
   > Could not create task of type 'GeneratePackagesJsonTask'.
   > Cannot add task ':kotlinfrontend:npm-preunpack' as a task with that name already exists.
   > Cannot add task ':kotlinfrontend:npm-preunpack' as a task with that name already exists.

this is my current config:

 apply plugin: 'kotlin2js'
 apply plugin: 'org.jetbrains.kotlin.frontend' 
 apply plugin: 'kotlin-dce-js'

 repositories {
      jcenter()
  }

dependencies {
      compile "org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version"
      compile "org.jetbrains.kotlinx:kotlinx-html:$html_version"
      compile "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
      testCompile "org.jetbrains.kotlin:kotlin-test-js:$kotlin_version"
}

 kotlinFrontend {
     downloadNodeJsVersion = "latest"

     npm {
         dependency "style-loader"

          devDependency("karma")
     }

     webpackBundle {
           bundleName = "main"
           contentPath = file('src/main/web')
     }

     define "PRODUCTION", false
}

 compileKotlin2Js {
       kotlinOptions.metaInfo = true
       kotlinOptions.outputFile = "${projectDir}/web/js/app.js"
       kotlinOptions.sourceMap = true
       kotlinOptions.moduleKind = 'commonjs'
       kotlinOptions.main = "call"
   }

Someone knows what is going on? Am I doing something wrong?
Thanks in advance...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions