Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
valdisrigdon opened this issue Jan 20, 2016 · 3 comments
Closed
Labels

Comments

@valdisrigdon
Copy link

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)
@ldaley
Copy link

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
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
@mcandre
Copy link
Contributor

mcandre commented Jul 29, 2016

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

@johnrengelman
Copy link
Owner

@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.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants