Kotlin-dsl-samples: "api" configuration extension method is not generated when using the 'java-library' plugin

Created on 28 Feb 2017  路  2Comments  路  Source: gradle/kotlin-dsl-samples

Overview

The api configuration extension method for DependencyHandler is not generated.
This results in having to use the invoke style by doing "api"("dependencyNotation").

My guess is that is because the configuration is apiConfiguration.setVisible(false);.

Impact

IntelliJ missing extension API

> Could not open cache directory 9t3fw39dt9byoj40h82pk8ubn (/Users/mkobit/.gradle/caches/3.5-20170227190532+0000/gradle-script-kotlin/9t3fw39dt9byoj40h82pk8ubn).
   > Internal error: org.jetbrains.kotlin.codegen.CompilationException: Back-end (JVM) Internal error: No resolved call for 'api("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")' at (61,3) in /
Users/mkobit/Workspace/personal/junit/docker-junit-extension/build.gradle.kts
     Cause: No resolved call for 'api("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")' at (61,3) in /Users/mkobit/Workspace/personal/junit/docker-junit-extension/build.gradle.kts
     File being compiled and position: (61,3) in /Users/mkobit/Workspace/personal/junit/docker-junit-extension/build.gradle.kts
     PsiElement: api("org.junit.jupiter:junit-jupiter-api:$junitJupiterVersion")
     The root cause was thrown at: callUtil.kt:188
        at org.jetbrains.kotlin.codegen.ExpressionCodegen.genQualified(ExpressionCodegen.java:324)
        at org.jetbrains.kotlin.codegen.ExpressionCodegen.genStatement(ExpressionCodegen.java:368)

Version

GSK version: distributionUrl = "https://repo.gradle.org/gradle/dist-snapshots/gradle-script-kotlin-3.5-20170227190532+0000-all.zip"

bug kotlin-dsl-api kotlin-dsl-runtime ease-of-use groovy-parity superseded

Most helpful comment

With gradle 4.6, this still not works

All 2 comments

Superseded by #337

With gradle 4.6, this still not works

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wuchengithub picture wuchengithub  路  4Comments

cbeams picture cbeams  路  3Comments

AlexCzar picture AlexCzar  路  3Comments

jaredsburrows picture jaredsburrows  路  3Comments

cbeams picture cbeams  路  5Comments