Unable to create task of type 'ShadowJar' with Gradle 2.11 rc 1 #177

Closed
valdisrigdon opened this Issue Jan 20, 2016 · 3 comments

Comments

Projects
None yet
4 participants
@valdisrigdon

Stacktrace:

Caused by: org.gradle.api.tasks.TaskInstantiationException: Could not create task of type 'ShadowJar'.
    at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:123)
    at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:118)
    at org.gradle.api.internal.AbstractTask.injectIntoNewInstance(AbstractTask.java:143)
    at org.gradle.api.internal.project.taskfactory.TaskFactory.create(TaskFactory.java:118)
    at org.gradle.api.internal.project.taskfactory.TaskFactory.createTask(TaskFactory.java:77)
    at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory.createTask(AnnotationProcessingTaskFactory.java:100)
    at org.gradle.api.internal.project.taskfactory.DependencyAutoWireTaskFactory.createTask(DependencyAutoWireTaskFactory.java:39)
    at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:62)
    at org.gradle.api.internal.tasks.DefaultTaskContainer.create(DefaultTaskContainer.java:97)
    at org.gradle.api.tasks.TaskContainer$create.call(Unknown Source)
    at com.github.jengelman.gradle.plugins.shadow.ShadowJavaPlugin.configureShadowTask(ShadowJavaPlugin.groovy:40)
    at com.github.jengelman.gradle.plugins.shadow.ShadowJavaPlugin.apply(ShadowJavaPlugin.groovy:35)
    at com.github.jengelman.gradle.plugins.shadow.ShadowJavaPlugin.apply(ShadowJavaPlugin.groovy)
    at org.gradle.api.internal.plugins.ImperativeOnlyPluginApplicator.applyImperative(ImperativeOnlyPluginApplicator.java:35)
    at org.gradle.api.internal.plugins.RuleBasedPluginApplicator.applyImperative(RuleBasedPluginApplicator.java:43)
    at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:137)
    ... 98 more
Caused by: java.lang.NoSuchMethodError: org.gradle.api.java.archives.internal.DefaultManifest.<init>(Lorg/gradle/api/internal/file/FileResolver;)V
    at com.github.jengelman.gradle.plugins.shadow.tasks.DefaultInheritManifest.<init>(DefaultInheritManifest.groovy:15)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar.<init>(ShadowJar.java:44)
    at com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar_Decorated.<init>(Unknown Source)
    at org.gradle.api.internal.DependencyInjectingInstantiator.newInstance(DependencyInjectingInstantiator.java:48)
    at org.gradle.api.internal.ClassGeneratorBackedInstantiator.newInstance(ClassGeneratorBackedInstantiator.java:36)
    at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:121)

@johnrengelman johnrengelman added the bug label Jan 20, 2016

@ldaley

This comment has been minimized.

Show comment
Hide comment
@ldaley

ldaley Jan 20, 2016

the DefaultManifest constructor has changed: https://github.com/gradle/gradle/blob/3d67a9b7012b28d346ea0a40c68cfe70951e37ad/subprojects/platform-jvm/src/main/java/org/gradle/api/java/archives/internal/DefaultManifest.java#L44-L44

You can get this type (PathToFileResolver) from the service registry just like FileResolver.

ldaley commented Jan 20, 2016

the DefaultManifest constructor has changed: https://github.com/gradle/gradle/blob/3d67a9b7012b28d346ea0a40c68cfe70951e37ad/subprojects/platform-jvm/src/main/java/org/gradle/api/java/archives/internal/DefaultManifest.java#L44-L44

You can get this type (PathToFileResolver) from the service registry just like FileResolver.

bibo38 added a commit to bibo38/Yamler-Bukkit that referenced this issue Jan 21, 2016

Quick fix for Gradle 2.11+ builds
Due to the fact, that the ShadowJar plugin is not yet compatible with this pre version of gradle it is now just disabled.
See johnrengelman/shadow#177

@roded roded referenced this issue in puniverse/capsule-daemon Feb 24, 2016

Merged

Upgrade gradle shadow plugin version #10

@GrandPubba GrandPubba referenced this issue in EMCECS/ecs-sync Mar 7, 2016

Closed

Could not create task of type 'ShadowJar’. #7

@mcandre

This comment has been minimized.

Show comment
Hide comment
@mcandre

mcandre Jul 29, 2016

Contributor

+1, please support both Gradle v2.11 and below if it's not too much trouble

Contributor

mcandre commented Jul 29, 2016

+1, please support both Gradle v2.11 and below if it's not too much trouble

@johnrengelman

This comment has been minimized.

Show comment
Hide comment
@johnrengelman

johnrengelman Jul 29, 2016

Owner

@mcandre the latest version of Shadow (v1.2.3) supports all current released versions of Gradle from 1.12+

Owner

johnrengelman commented Jul 29, 2016

@mcandre the latest version of Shadow (v1.2.3) supports all current released versions of Gradle from 1.12+

Repository owner locked and limited conversation to collaborators Jul 29, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.