gradle-processes
gradle-processes copied to clipboard
Could not find property 'Fork' on root project XXX
after installed like describe I got an error (see headline) gradleWrapperVersion=2.3
any ideas why?
Also getting this with JavaFork, any clue?
UPDATE: you need to import it
I have the same problem, yet I can't fix it by importing the class. This is using gradle 2.7.
I tried using both approaches that are published here: https://plugins.gradle.org/plugin/com.github.johnrengelman.processes
Always returns the following:
Could not find property 'JavaFork' on project
As @tsouza pointed out, you need to import the Fork/JavaFork task in your build file:
import com.github.jengelman.gradle.plugins.processes.tasks.*
Similar to @kungfoo, I'm importing it as well, using the import string provided by @ChristophSchall and still getting the same error. (Using Gradle 2.11)
import org.gradle.internal.os.OperatingSystem;
import com.github.jengelman.gradle.plugins.processes.tasks.*
...
project.plugins.each {
println it
}
task runJavaServer(type: JavaFork) {
main = 'com.something.JavaServer'
classpath = sourceSets.main.runtimeClasspath
jvmArgs "-Xmx1g"
args "--someArgs"
}
But still getting this output (the plugins are printed out to show that it is being imported):
gradle runJavaServer
org.gradle.api.plugins.HelpTasksPlugin@58da76
com.dorongold.gradle.tasktree.TaskTreePlugin@46a59486
com.github.jengelman.gradle.plugins.processes.ProcessesPlugin@688a9d9e
org.gradle.api.plugins.ReportingBasePlugin@647225b0
org.gradle.testing.jacoco.plugins.JacocoPlugin@518eea9a
org.gradle.language.base.plugins.LifecycleBasePlugin@685ec827
org.gradle.api.plugins.BasePlugin@1b2caac2
org.gradle.language.base.plugins.LanguageBasePlugin@64ee13f
org.gradle.platform.base.plugins.BinaryBasePlugin@6e1a8535
org.gradle.api.plugins.JavaBasePlugin@bcbc73
org.gradle.api.plugins.JavaPlugin@370bf5a4
FAILURE: Build failed with an exception.
* Where:
Script '/code/full-tree/trunk/backend/functions.gradle' line: 79
* What went wrong:
A problem occurred evaluating script.
> Could not find property 'JavaFork' on root project 'backend'.
@johnrengelman Any thoughts?
also seeing this on gradle 2.11 with Fork works fine on 2.10
I'm seeing this with gradle 5.5