shadow: Cannot execute null+configuration
Gradle version is 3.4.1. With the following (part of) build.gradle:
plugins {
id 'com.github.johnrengelman.shadow' version '2.0.0'
id 'me.champeau.gradle.jmh' version '0.3.1'
}
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'me.champeau.gradle.jmh'
I get:
An exception occurred applying plugin request [id: 'me.champeau.gradle.jmh', version: '0.3.1']
> Failed to apply plugin [id 'me.champeau.gradle.jmh']
> Cannot execute null+configuration ':backend:shadow'
This didn’t happen with 1.2.4. I’ve no idea what that error is or how to debug it. Please advise. 😃
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Reactions: 8
- Comments: 25 (4 by maintainers)
Commits related to this issue
- First steps at making JMH Gradle plugin compatible with Gradle 4 Note that this version would only be compatible with Gradle 4.0+ and Shadow plugin 2.0+. It makes use of the new worker API, which avo... — committed to melix/jmh-gradle-plugin by melix 9 years ago
- Update gradle-git and Shadow plugins -- Can't update to Shadow 2.0.0 due to johnrengelman/shadow#297 — committed to Choonster-Minecraft-Mods/TestMod3 by Choonster 9 years ago
- Closes #297 - uses compileClasspath configuration to apply shadow resources to compile tasks. — committed to GradleUp/shadow by deleted user 9 years ago
This is fixed in 2.0.1 which is now available.
Gradle 3.5.
I’m also getting this error, but it seems to be related to configuring
sourceSets.There are two subprojects and a main project. I can configure the subprojects to use the plugin independently, but the main project script has the
null+configurationfailure.This is the minimal failing script:
The stack trace is similar to the one above:
Ok, so it is related to order. First you don’t know both
javaandgroovyapplied.groovyimpliesjava. So removingjavawill fix it, also puttinggroovybeforejavafixes it. There definitely is a problem here with shadow, but that should get you moving for now.+1, though solved, by ordering plugins
Switching from 1.2.4 to 2.0.0 with plugins in this order:
Results in:
However, the build succeeds if the plugins are reordered:
Same error here: adding a source set will trigger the problem.