Skip to content
This repository has been archived by the owner on Aug 19, 2020. It is now read-only.

Adding a plugin on buildSrc compile classpath causes unexpected exception #1363

Closed
melix opened this issue Mar 14, 2019 · 0 comments
Closed

Comments

@melix
Copy link
Contributor

melix commented Mar 14, 2019

Expected Behavior

buildSrc should compile.

Current Behavior

Build fails with an exception:

Caused by: java.lang.IllegalStateException: implementationClass must not be null
        at org.gradle.kotlin.dsl.codegen.PluginIdExtensionsKt$pluginEntriesFrom$1$2.invoke(PluginIdExtensions.kt:256)
        at org.gradle.kotlin.dsl.codegen.PluginIdExtensionsKt$pluginEntriesFrom$1$2.invoke(PluginIdExtensions.kt)
        at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:172)
        at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:698)
        at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:728)
        at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:719)
        at org.gradle.kotlin.dsl.codegen.PluginIdExtensionsKt.pluginEntriesFrom(PluginIdExtensions.kt:257)
        at org.gradle.kotlin.dsl.accessors.PluginAccessorsClassPathKt$pluginSpecsFrom$2.invoke(PluginAccessorsClassPath.kt:374)
        at org.gradle.kotlin.dsl.accessors.PluginAccessorsClassPathKt$pluginSpecsFrom$2.invoke(PluginAccessorsClassPath.kt)
        at kotlin.sequences.FlatteningSequence$iterator$1.ensureItemIterator(Sequences.kt:277)
        at kotlin.sequences.FlatteningSequence$iterator$1.hasNext(Sequences.kt:265)
        at kotlin.sequences.TransformingSequence$iterator$1.hasNext(Sequences.kt:176)
        at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:698)
        at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:728)
        at kotlin.sequences.SequencesKt___SequencesKt$sortedWith$1.iterator(_Sequences.kt:563)
        at org.gradle.kotlin.dsl.accessors.PluginTree$Companion.of(PluginTree.kt:65)
        at org.gradle.kotlin.dsl.accessors.PluginAccessorsClassPathKt.buildPluginAccessorsFor(PluginAccessorsClassPath.kt:107)
        at org.gradle.kotlin.dsl.accessors.PluginAccessorsClassPathKt$$special$$inlined$getOrCreateProperty$lambda$1.invoke(PluginAccessorsClassPath.kt:86)
        at org.gradle.kotlin.dsl.accessors.PluginAccessorsClassPathKt$$special$$inlined$getOrCreateProperty$lambda$1.invoke(PluginAccessorsClassPath.kt)
        at org.gradle.kotlin.dsl.accessors.AccessorsClassPathKt$cachedAccessorsClassPathFor$cacheDir$1.invoke(AccessorsClassPath.kt:102)
        at org.gradle.kotlin.dsl.accessors.AccessorsClassPathKt$cachedAccessorsClassPathFor$cacheDir$1.invoke(AccessorsClassPath.kt)

Context

I'm building a plugin in buildSrc which needs to apply other plugins. But as soon as I add this plugin dependency, build fails:

compile("com.github.jruby-gradle:jruby-gradle-plugin:1.4.0")

Steps to Reproduce (for bugs)

$ touch build.gradle.kts
$ mkdir buildSrc
$ cat << EOF >> buildSrc/build.gradle.kts

plugins {
    `kotlin-dsl`
}

repositories {
    jcenter()
}

dependencies {
    compile("com.github.jruby-gradle:jruby-gradle-plugin:1.4.0")
}
EOF
$ gradle help
@bamboo bamboo self-assigned this Mar 14, 2019
@bamboo bamboo added this to the 1.2.0 milestone Mar 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants