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

Gradle 2.14 broke the enforce plugin #283

Open
jperezq opened this issue Jul 11, 2016 · 4 comments
Open

Gradle 2.14 broke the enforce plugin #283

jperezq opened this issue Jul 11, 2016 · 4 comments

Comments

@jperezq
Copy link

jperezq commented Jul 11, 2016

Apparently due to ProcessLoggerFactory changing packages, found some more info on the same issue for a different plugin.
openbakery/gradle-xcodePlugin#276

This is the important parts of the stack trace I'm getting.
Caused by: org.gradle.api.tasks.TaskInstantiationException: Could not create task of type 'RunTestTask'.
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.util.GUtil.uncheckedCall(GUtil.java:401)
at org.gradle.api.internal.AbstractTask.injectIntoNewInstance(AbstractTask.java:176)
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:101)
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.project.AbstractProject.task(AbstractProject.java:935)
at org.gradle.api.Project$task.call(Unknown Source)
at org.fundacionjala.gradle.plugins.enforce.EnforcePlugin.apply(EnforcePlugin.groovy:49)
at org.fundacionjala.gradle.plugins.enforce.EnforcePlugin.apply(EnforcePlugin.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)
... 57 more
Caused by: org.gradle.internal.service.UnknownServiceException: No service of type ProgressLoggerFactory available in ProjectScopeServices.
at org.gradle.internal.service.DefaultServiceRegistry.getServiceProvider(DefaultServiceRegistry.java:436)
at org.gradle.internal.service.DefaultServiceRegistry.doGet(DefaultServiceRegistry.java:426)
at org.gradle.internal.service.DefaultServiceRegistry.get(DefaultServiceRegistry.java:410)
at org.gradle.internal.service.ServiceRegistry$get.call(Unknown Source)
at org.fundacionjala.gradle.plugins.enforce.tasks.salesforce.unittest.RunTestTask.(RunTestTask.groovy:50)
at org.fundacionjala.gradle.plugins.enforce.tasks.salesforce.unittest.RunTestTask_Decorated.(Unknown Source)
at org.gradle.api.internal.DependencyInjectingInstantiator.newInstance(DependencyInjectingInstantiator.java:56)
at org.gradle.api.internal.ClassGeneratorBackedInstantiator.newInstance(ClassGeneratorBackedInstantiator.java:36)
at org.gradle.api.internal.project.taskfactory.TaskFactory$1.call(TaskFactory.java:121)
... 72 more

BUILD FAILED

@JimmyRojas
Copy link
Contributor

Hello @jperezq, thanks for use the plugin
We investigated further the issue and unfortunately the gradle version that you mention is facing more problems and those issues will be fixed later by the gradle's developers
elastic/elasticsearch#18935

We tried to use an strategy to solve the incompatibility issues by adding this configuration into the build.gradle file:

configurations.all {
    resolutionStrategy {
        // add dependency substitution rules
        dependencySubstitution {
            substitute module('org.gradle:api') with project(':api')
            substitute module('org.gradle:logging') with project(':internal')
        }
    }
}

Almost all issues were fixed thanks to that but not at all :(

We also tested the plugin with the gradle v2.13 and it's working well

We will let you know once we are able to provide entire support for gradle 2.14

Regards,
Jimmy

@jsun-tech
Copy link

jsun-tech commented Dec 6, 2016

Hello,

I tried
buildscript { repositories { mavenCentral() jcenter() } dependencies { classpath 'org.fundacionjala.gradle.plugins.enforce:enforce-gradle-plugin:1.1.5' } configurations.all { resolutionStrategy { // add dependency substitution rules dependencySubstitution { substitute module('org.gradle:api') with project(':api') substitute module('org.gradle:logging') with project(':internal') } } } } apply plugin: 'enforce' enforce { srcPath = 'src' deleteTemporaryFiles = true deleteSubComponents = ['*'] }

with gradle 3.2.1 and is giving this error aswell:

Failed to apply plugin [id 'enforce'] 12:47:47.435 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Could not create task of type 'RunTestTask'. 12:47:47.435 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] 12:47:47.435 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try: 12:47:47.435 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. 12:47:47.435 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] 12:47:47.435 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED]

@ziur
Copy link
Contributor

ziur commented Dec 6, 2016

@JunJS, It seems the version 1.1.5 is broken, and since gradle 2.14 a class was moved to another package.
Could you please give try again with build 1.1.4 and gradle 2.13? It should work with this version.
If you any need any help, please let me know.

@jsun-tech
Copy link

jsun-tech commented Dec 6, 2016

thanks @ziur, I will try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants