maiflai / gradle-scalatest

A plugin to enable the use of scalatest in a gradle Scala project.
The Unlicense
73 stars 35 forks source link

Gradle 5.3 groovy.lang.GroovyRuntimeException: Could not find matching constructor #77

Closed tekumara closed 5 years ago

tekumara commented 5 years ago

With gradle 5.3 and com.github.maiflai.scalatest version 0.24 I'm getting

Caused by: groovy.lang.GroovyRuntimeException: Could not find matching constructor for: org.gradle.process.internal.DefaultExecActionFactory(org.gradle.api.internal.file.BaseDirFileResolver)
        at com.github.maiflai.BackwardsCompatibleJavaExecActionFactory.create(BackwardsCompatibleJavaExecActionFactory.groovy:17)
        at com.github.maiflai.BackwardsCompatibleJavaExecActionFactory$create.call(Unknown Source)
        at com.github.maiflai.ScalaTestAction.makeAction(ScalaTestAction.groovy:68)
        at com.github.maiflai.ScalaTestAction$makeAction.callStatic(Unknown Source)
        at com.github.maiflai.ScalaTestAction.execute(ScalaTestAction.groovy:32)
        at com.github.maiflai.ScalaTestAction.execute(ScalaTestAction.groovy)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:701)
        at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:668)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$4.run(ExecuteActionsTaskExecuter.java:337)
....
maiflai commented 5 years ago

Sorry, this changed in 0.24 to remove the internal class.

If you then want to use scalatest to run other Test tasks, you can instruct this plugin to configure those tasks.

task myTest(dependsOn: testClasses, type: Test, group: 'verification') {
com.github.maiflai.ScalaTestPlugin.configure(it)
tags {
include 'com.example.tags.MyTag'
}
}
mwz commented 5 years ago

If you then want to use scalatest to run other Test tasks, you can instruct this plugin to configure those tasks.

What about the default test task? Can't this just work out of the box?

maiflai commented 5 years ago

Sorry, I misread the stacktrace above and thought it was referring to a different issue.

I've now built the plugin against Gradle 5.3 and released 0.25 - please could you see if it resolves the issue?

Thanks. Stu

tjakway commented 5 years ago

I had a similar issue:

Could not find matching constructor for: org.gradle.process.internal.DefaultExecActionFactory(org.gradle.api.internal.file.BaseDirFileResolver)

Which was fixed by upgrading to 0.25

maiflai commented 5 years ago

Thanks - I'll close this issue then.