{"action":"created","issue":{"url":"https://api.github.com/repos/Kotlin/dokka/issues/212","repository_url":"https://api.github.com/repos/Kotlin/dokka","labels_url":"https://api.github.com/repos/Kotlin/dokka/issues/212/labels{/name}","comments_url":"https://api.github.com/repos/Kotlin/dokka/issues/212/comments","events_url":"https://api.github.com/repos/Kotlin/dokka/issues/212/events","html_url":"https://github.com/Kotlin/dokka/issues/212","id":254395997,"node_id":"MDU6SXNzdWUyNTQzOTU5OTc=","number":212,"title":"KotlinNullPointerException when running gradle task in kotlin2js project","user":{"login":"motorro","id":924536,"node_id":"MDQ6VXNlcjkyNDUzNg==","avatar_url":"https://avatars0.githubusercontent.com/u/924536?v=4","gravatar_id":"","url":"https://api.github.com/users/motorro","html_url":"https://github.com/motorro","followers_url":"https://api.github.com/users/motorro/followers","following_url":"https://api.github.com/users/motorro/following{/other_user}","gists_url":"https://api.github.com/users/motorro/gists{/gist_id}","starred_url":"https://api.github.com/users/motorro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/motorro/subscriptions","organizations_url":"https://api.github.com/users/motorro/orgs","repos_url":"https://api.github.com/users/motorro/repos","events_url":"https://api.github.com/users/motorro/events{/privacy}","received_events_url":"https://api.github.com/users/motorro/received_events","type":"User","site_admin":false},"labels":[{"id":113468585,"node_id":"MDU6TGFiZWwxMTM0Njg1ODU=","url":"https://api.github.com/repos/Kotlin/dokka/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"semoro","id":1918780,"node_id":"MDQ6VXNlcjE5MTg3ODA=","avatar_url":"https://avatars0.githubusercontent.com/u/1918780?v=4","gravatar_id":"","url":"https://api.github.com/users/semoro","html_url":"https://github.com/semoro","followers_url":"https://api.github.com/users/semoro/followers","following_url":"https://api.github.com/users/semoro/following{/other_user}","gists_url":"https://api.github.com/users/semoro/gists{/gist_id}","starred_url":"https://api.github.com/users/semoro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/semoro/subscriptions","organizations_url":"https://api.github.com/users/semoro/orgs","repos_url":"https://api.github.com/users/semoro/repos","events_url":"https://api.github.com/users/semoro/events{/privacy}","received_events_url":"https://api.github.com/users/semoro/received_events","type":"User","site_admin":false},"assignees":[{"login":"semoro","id":1918780,"node_id":"MDQ6VXNlcjE5MTg3ODA=","avatar_url":"https://avatars0.githubusercontent.com/u/1918780?v=4","gravatar_id":"","url":"https://api.github.com/users/semoro","html_url":"https://github.com/semoro","followers_url":"https://api.github.com/users/semoro/followers","following_url":"https://api.github.com/users/semoro/following{/other_user}","gists_url":"https://api.github.com/users/semoro/gists{/gist_id}","starred_url":"https://api.github.com/users/semoro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/semoro/subscriptions","organizations_url":"https://api.github.com/users/semoro/orgs","repos_url":"https://api.github.com/users/semoro/repos","events_url":"https://api.github.com/users/semoro/events{/privacy}","received_events_url":"https://api.github.com/users/semoro/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2017-08-31T16:34:03Z","updated_at":"2018-07-09T10:21:05Z","closed_at":null,"author_association":"NONE","body":"Hi!\r\n\r\nI'm having problem running dokka task in a kotlin2js project.\r\nGot `kotlin.KotlinNullPointerException (no error message)` [here](https://github.com/Kotlin/dokka/blob/41221f77786f945d7bceb558cfcfdbdcb42951f3/runners/gradle-plugin/src/main/kotlin/main.kt#L216) after:\r\n```\r\n18:12:56.616 [DEBUG] [org.gradle.api.Task] Dokka found AbstractKotlinCompile task: task ':compileKotlin2Js'\r\n```\r\n\r\nStack trace:\r\n```\r\nkotlin.KotlinNullPointerException\r\n  at org.jetbrains.dokka.ReflectDsl$CallOrPropAccess.v(ReflectDsl.kt:30)\r\n  at org.jetbrains.dokka.ReflectDsl$CallOrPropAccess.get(ReflectDsl.kt:18)\r\n  at org.jetbrains.dokka.gradle.DokkaTask.extractClasspathAndSourceRootsFromKotlinTasks(main.kt:216)\r\n  at org.jetbrains.dokka.gradle.DokkaTask.access$extractClasspathAndSourceRootsFromKotlinTasks(main.kt:54)\r\n  at org.jetbrains.dokka.gradle.DokkaTask$kotlinCompileBasedClasspathAndSourceRoots$2.invoke(main.kt:116)\r\n  at org.jetbrains.dokka.gradle.DokkaTask$kotlinCompileBasedClasspathAndSourceRoots$2.invoke(main.kt:54)\r\n  at kotlin.SynchronizedLazyImpl.getValue(Lazy.kt:130)\r\n  at org.jetbrains.dokka.gradle.DokkaTask.getKotlinCompileBasedClasspathAndSourceRoots$gradle_plugin_main(main.kt)\r\n  at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)\r\n  at org.gradle.api.internal.project.taskfactory.TaskPropertyInfo$4.create(TaskPropertyInfo.java:99)\r\n  at org.gradle.util.SingleMessageLogger.whileDisabled(SingleMessageLogger.java:217)\r\n  at org.gradle.api.internal.project.taskfactory.TaskPropertyInfo.getValue(TaskPropertyInfo.java:97)\r\n  at org.gradle.api.internal.project.taskfactory.TaskClassValidator.validate(TaskClassValidator.java:78)\r\n  at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:41)\r\n  at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)\r\n  at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)\r\n  at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)\r\n  at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)\r\n  at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)\r\n  at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)\r\n  at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:242)\r\n  at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:317)\r\n  at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:309)\r\n  at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:185)\r\n  at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:95)\r\n  at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:235)\r\n  at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:224)\r\n  at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:121)\r\n  at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:77)\r\n  at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:102)\r\n  at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:96)\r\n  at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:612)\r\n  at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:567)\r\n  at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:96)\r\n  at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)\r\n  at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:46)\r\n  at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)\r\n```\r\nBuild file (based on [this example](https://github.com/JetBrains/kotlin-examples/tree/master/gradle/js-tests/mocha)) :\r\n```\r\napply plugin: 'kotlin2js'\r\napply plugin: 'org.jetbrains.dokka'\r\napply plugin: 'com.moowork.node'\r\n\r\nbuildscript {\r\n    ext.kotlin_version = '1.1.4-3'\r\n    repositories {\r\n        jcenter()\r\n        mavenCentral()\r\n        maven { url \"https://plugins.gradle.org/m2/\" }\r\n    }\r\n    dependencies {\r\n        classpath \"org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version\"\r\n        classpath 'com.moowork.gradle:gradle-node-plugin:1.2.0'\r\n        classpath 'org.jetbrains.dokka:dokka-gradle-plugin:0.9.15'\r\n    }\r\n}\r\n\r\nrepositories {\r\n    mavenCentral()\r\n    jcenter()\r\n}\r\n\r\ndependencies {\r\n    compile \"org.jetbrains.kotlin:kotlin-stdlib-js:$kotlin_version\"\r\n    testCompile \"org.jetbrains.kotlin:kotlin-test-js:$kotlin_version\"\r\n}\r\n\r\n[compileKotlin2Js, compileTestKotlin2Js]*.configure {\r\n    kotlinOptions.metaInfo = true\r\n    kotlinOptions.sourceMap = true\r\n    kotlinOptions.moduleKind = \"commonjs\"\r\n}\r\n\r\ntask populateNodeModules(type: Copy, dependsOn: compileKotlin2Js) {\r\n   from compileKotlin2Js.destinationDir\r\n\r\n   configurations.testCompile.each {\r\n       from zipTree(it.absolutePath).matching { include '*.js' }\r\n   }\r\n\r\n   into \"${buildDir}/node_modules\"\r\n}\r\n\r\nnode { \r\n  download = true\r\n}\r\n\r\ndokka {\r\n    outputFormat = 'html'\r\n    outputDirectory = \"${projectDir}/doc\"\r\n}\r\n\r\ntask installMocha(type: NpmTask) {\r\n    args = ['install', 'mocha']\r\n}\r\n\r\ntask runMocha(type: NodeTask, dependsOn: [compileTestKotlin2Js, populateNodeModules, installMocha]) {\r\n    script = file('node_modules/mocha/bin/mocha')\r\n    args = [compileTestKotlin2Js.outputFile]\r\n}\r\n\r\ntest.dependsOn runMocha\r\n```\r\nGradle version: 4.0"},"comment":{"url":"https://api.github.com/repos/Kotlin/dokka/issues/comments/403432148","html_url":"https://github.com/Kotlin/dokka/issues/212#issuecomment-403432148","issue_url":"https://api.github.com/repos/Kotlin/dokka/issues/212","id":403432148,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzQzMjE0OA==","user":{"login":"rjaros","id":5646804,"node_id":"MDQ6VXNlcjU2NDY4MDQ=","avatar_url":"https://avatars2.githubusercontent.com/u/5646804?v=4","gravatar_id":"","url":"https://api.github.com/users/rjaros","html_url":"https://github.com/rjaros","followers_url":"https://api.github.com/users/rjaros/followers","following_url":"https://api.github.com/users/rjaros/following{/other_user}","gists_url":"https://api.github.com/users/rjaros/gists{/gist_id}","starred_url":"https://api.github.com/users/rjaros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rjaros/subscriptions","organizations_url":"https://api.github.com/users/rjaros/orgs","repos_url":"https://api.github.com/users/rjaros/repos","events_url":"https://api.github.com/users/rjaros/events{/privacy}","received_events_url":"https://api.github.com/users/rjaros/received_events","type":"User","site_admin":false},"created_at":"2018-07-09T10:21:05Z","updated_at":"2018-07-09T10:21:05Z","author_association":"NONE","body":"Any roadmap for JS support?"}}
{"actor":{"display_login":"rjaros"}}