Can't reference custom task when applying from a separate build file


(Eric Deandrea) #1

We have a very large infrastructure (500+ projects being built). Because of this we have developed custom plugins/tasks to gradle. When a new project is created, we ship a default build.gradle file to the project (which the project can not modify). This build.gradle sets up the bootstrapping between Gradle and our custom plugins (shipped as a jar file). The build.gradle file looks like this:

buildscript {
 dependencies {
  classpath files(fileTree(dir: 'lib/build', includes: ['*.jar']))
// Wire in the custom plugins/tasks into Gradle's bootstrapping
 }
}
  apply plugin: 'tiaa-base'
// Apply our default base plugin which does some filesystem setup
apply from: 'project-build.gradle'
// Apply the project's specific build instructions

What we expect is that each project can supply its own file called project-build.gradle where it can do anything specific to itself. This approach seems to work fine, although I notice something strange and I’m not sure if it is a bug within Gradle or something I’m not doing correctly.

If we look at a sample project’s project-build.gradle:

apply plugin: 'tiaa-war'
// Apply our own custom war plugin
  buildDistributionZip {
// Configure the task for creating our distribution
 from(buildDir) {
  include 'docs/**'
  include 'libs/**'
  include 'reports/**'
  include 'test-results/**'
 }
}
  // Declare a task which uses a custom type for generating sources off of an XSD schema
task generateContactsRSv1Schema(type: org.tiaa.reco.build.types.Xjc, description: 'Generate Contacts RS v1 sources from the schema') {
 javaPackageName = 'org.tiaa.prism.microsites.rest.services.types.contacts.v1'
 schemaFile = "contacts-rs-v1/contacts-rs-v1.xsd"
}

What’s happening when I try & run the build is I get this message:

FAILURE: Build failed with an exception.
  * Where:
Script 'C:\Projects1\MicrositesRS\project-build.gradle' line: 18
  * What went wrong:
A problem occurred evaluating script.
> Could not find property 'org' on root project 'MicrositesRS'.
  * Try:
Run with --info or --debug option to get more log output.
  * Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating script.
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory
.java:54)
        at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:12
7)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyScript(DefaultObjectConfigurationAction
.java:82)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$000(DefaultObjectConfigurationAction.
java:32)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$1.run(DefaultObjectConfigurationAction.java:
54)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.jav
a:114)
        at org.gradle.api.internal.project.AbstractProject.apply(AbstractProject.java:841)
        at org.gradle.api.Project$apply.call(Unknown Source)
        at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.groovy:34)
        at org.gradle.api.Script$apply.callCurrent(Unknown Source)
        at build_4ufgq0n1cmv0vgp71ugqv0ekjg.run(C:\Projects1\MicrositesRS\build.gradle:10)
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory
.java:52)
        at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:12
7)
        at org.gradle.configuration.BuildScriptProcessor.evaluate(BuildScriptProcessor.java:38)
        at org.gradle.configuration.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:43)
        at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:463)
        at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:75)
        at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:23)
        at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:21)
        at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:38)
        at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:35)
        at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:439)
        at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:434)
        at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:139)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:110)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:78)
        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:38)
        at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.
java:39)
        at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.
java:25)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
        at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:30)
        at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:22)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:20
0)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:17
3)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:138)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
        at org.gradle.launcher.Main.doAction(Main.java:48)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at org.gradle.launcher.Main.main(Main.java:39)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
Caused by: groovy.lang.MissingPropertyException: Could not find property 'org' on root project 'MicrositesRS'.
        at org.gradle.api.internal.AbstractDynamicObject.propertyMissingException(AbstractDynamicObject.java:43)
        at org.gradle.api.internal.AbstractDynamicObject.getProperty(AbstractDynamicObject.java:35)
        at org.gradle.api.internal.CompositeDynamicObject.getProperty(CompositeDynamicObject.java:60)
        at org.gradle.groovy.scripts.BasicScript.propertyMissing(BasicScript.java:70)
        at project_build_2lgaaa41l51un4uapfke0r5n76.run(C:\Projects1\MicrositesRS\project-build.gradle:18)
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory
.java:52)
        ... 44 more
    BUILD FAILED
  Total time: 2.48 secs

If, at the top of the project-build.gradle file I include the same block that is in the build.gradle file

buildscript {
 dependencies {
  classpath files(fileTree(dir: 'lib/build', includes: ['*.jar']))
 }
}

Then everything works. What’s weird is even though the block is not declared in the project-build.gradle file, gradle doesn’t complain about the line where I apply my custom plugin:

apply plugin: 'tiaa-war'

But it breaks at the line where I declare the task of the type org.tiaa.reco.build.types.Xjc, saying that the property ‘org’ can’t be found on the project. Obviously the classes are there on the classpath, otherwise the lines above it (applying the plugin, configuring the buildDistributionZip task) would fail, since the custom plugins introduce that stuff.

Why doesn’t declaring the task work? Why do I need to include the buildscript block again in my project-build.gradle file? Is this a bug with Gradle or am I not doing something correctly?


(Eric Deandrea) #2

Any takers?


(Peter Niederwieser) #3

Officially, a ‘buildscript’ block only affects the containing build script. In the current implementation, it also affects build scripts of subprojects, but not any other build scripts (at least not at build script compile time). To achieve your goal, you’ll have to employ some tricks:

configurations {
   sharedBuildDeps
}
  dependencies {
  sharedBuildDeps fileTree(dir: 'lib/build', includes: ['*.jar'])
}
  def urls = configurations.sharedBuildDeps.files.collect { it.toURI().toURL() } as URL[]
def buildDepsClassLoader = new URLClassLoader(urls)
gradle.scriptClassLoader.addParent(buildDepsClassLoader)

With that, it should be possible to use the libs from all build scripts. Note that the last line in my snippet uses some internal APIs.


(Eric Deandrea) #4

Thanks I’ll give it a try. Good to hear from you again - hope you had a good vacation!


(Eric Deandrea) #5

If what you say is true - that the buildscript block only affects the containing build script, then why does my project-build.gradle not fail at the line where I do

apply plugin: 'tiaa-war'

It seems to find the custom plugin with the id tiaa-war and seems to apply it fine. What it doesn’t do is allow me to use other classes within the jar file containing the plugins - it can’t seem to find those.


(Peter Niederwieser) #6

If what you say is true - that the buildscript block only affects the containing build script

What I said is that this is the only guaranteed behavior. Apparently, the current implementation will put the Jar on the runtime class path of a script plugin like ‘project-build.gradle’ (which is why ‘apply plugin: ‘tiaa-war’’ works), but not on the compile class path of the script plugin (which is why usage of the class won’t work). By “compile class path”, I mean the class path for compiling the build script itself.


(Eric Deandrea) #7

So I tried your suggestion but it doesn’t seem to work - I get this. Line 11 is the line where I apply my ‘tiaa-base’ plugin.

C:\Projects1\MicrositesRS>gradle clean testClasses --stacktrace
  FAILURE: Build failed with an exception.
  * Where:
Build file 'C:\Projects1\MicrositesRS\build.gradle' line: 11
  * What went wrong:
A problem occurred evaluating root project 'MicrositesRS'.
> groovy/lang/GroovyObject
  * Try:
Run with --info or --debug option to get more log output.
  * Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'MicrositesRS'.
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory
.java:54)
        at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:12
7)
        at org.gradle.configuration.BuildScriptProcessor.evaluate(BuildScriptProcessor.java:38)
        at org.gradle.configuration.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:43)
        at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:463)
        at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:75)
        at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:23)
        at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:21)
        at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:38)
        at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:35)
        at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:439)
        at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:434)
        at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:139)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:110)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:78)
        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:38)
        at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.
java:39)
        at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.
java:25)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
        at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:30)
        at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:22)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:20
0)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:17
3)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:138)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
        at org.gradle.launcher.Main.doAction(Main.java:48)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at org.gradle.launcher.Main.main(Main.java:39)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
Caused by: java.lang.NoClassDefFoundError: groovy/lang/GroovyObject
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.api.internal.plugins.DefaultPluginRegistry.getTypeForId(DefaultPluginRegistry.java:100)
        at org.gradle.api.internal.plugins.DefaultPluginRegistry.getTypeForId(DefaultPluginRegistry.java:76)
        at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.getTypeForId(DefaultProjectsPluginContainer.ja
va:102)
        at org.gradle.api.internal.plugins.DefaultProjectsPluginContainer.apply(DefaultProjectsPluginContainer.java:37)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.applyPlugin(DefaultObjectConfigurationAction
.java:101)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.access$200(DefaultObjectConfigurationAction.
java:32)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$3.run(DefaultObjectConfigurationAction.java:
72)
        at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.jav
a:114)
        at org.gradle.api.internal.project.AbstractProject.apply(AbstractProject.java:841)
        at org.gradle.api.Project$apply.call(Unknown Source)
        at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.groovy:34)
        at org.gradle.api.Script$apply.callCurrent(Unknown Source)
        at build_4ufgq0n1cmv0vgp71ugqv0ekjg.run(C:\Projects1\MicrositesRS\build.gradle:11)
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory
.java:52)
        ... 33 more
Caused by: java.lang.ClassNotFoundException: groovy.lang.GroovyObject
        ... 48 more
    BUILD FAILED
  Total time: 2.372 secs

(Peter Niederwieser) #8

Hmm, did work for me. Have you tried ‘new URLClassLoader(urls, getClass().classLoader)’?


(Eric Deandrea) #9

This is what I have now:

configurations {
   sharedBuildDeps
}
dependencies {
  sharedBuildDeps fileTree(dir: 'lib/build', includes: ['*.jar'])
}
def urls = configurations.sharedBuildDeps.files.collect { it.toURI().toURL() } as URL[]
def buildDepsClassLoader = new URLClassLoader(urls, getClass().classLoader)
gradle.scriptClassLoader.addParent(buildDepsClassLoader)

and this is what I get:

C:\Projects1\MicrositesRS>gradle clean testClasses --stacktrace
  FAILURE: Build failed with an exception.
  * What went wrong:
A problem occurred evaluating root project 'MicrositesRS'.
> java.lang.StackOverflowError (no error message)
  * Try:
Run with --info or --debug option to get more log output.
  * Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'MicrositesRS'.
        at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory
.java:54)
        at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:12
7)
        at org.gradle.configuration.BuildScriptProcessor.evaluate(BuildScriptProcessor.java:38)
        at org.gradle.configuration.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:43)
        at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:463)
        at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:75)
        at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:23)
        at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:21)
        at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:38)
        at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:35)
        at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:439)
        at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:434)
        at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:139)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:110)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:78)
        at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:38)
        at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.
java:39)
        at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.
java:25)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
        at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:30)
        at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:22)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:20
0)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:17
3)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:138)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
        at org.gradle.launcher.Main.doAction(Main.java:48)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at org.gradle.launcher.Main.main(Main.java:39)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
Caused by: java.lang.StackOverflowError
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.FilteringClassLoader.loadClass(FilteringClassLoader.java:60)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
        at org.gradle.util.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:52)
    BUILD FAILED
  Total time: 6.84 secs

(Peter Niederwieser) #10

The original solution is working for me. Can you provide a small self-contained example build that exhibits the problem?


(Eric Deandrea) #11

The problem seems to be when calling out to my custom plugins. I can’t post the source of my custom plugins due to company policy, but I can post the source of the .gradle files I have and I can email you the binary of the custom plugin for you to wire in if you would like. Let me know if this is acceptable.