hi, i am trying to run gradle from groovy code called from a task, so i am doing a: ‘gradle.bat’.execute(null, new File(myPath)).
this starts gradle.bat on windows.
but dirname in the batch file gets set to myPath (which is where the project that i want to build lives). so app home is bad and so is classpath which causes the error.
the line: set DIRNAME=%~dp0 in the batch file evaluates to myPath when run from groovy! the %~dp0 evaluates to the drive and path of %0 which should be where the batch file lives.
if i run gradle.bat from the command line in myPath, the %~dp0 evaluates to where the gradle.bat file lives.
doc says this is deprecated and recommends using connector.
but the following says:
Could not find method compile() for arguments [org.gradle.api.internal.artifac ts.dependencies.DefaultSelfResolvingDependency_Decorated@433edba9] on root proje ct ‘a’.