Hi,
I have a project after gradle build class files are automatically generated into build/classes folder.now i wont the class files which are generated after compilation should be moved to a different folder lat’s say “temp” not to classes.
i wrote code to create temp directory like
mkdir (‘build/temp’)
this’s working fine in windows machine but on unix machine if i run gradle i am getting error hence directory “temp” is not getting created.
Please help me to create a directory on unix machine.
Regards, Ananta
First time I hear about this problem. Usually, ‘mkdir’ works just fine on *nix machines. Can you provide the following information?
- Output of ‘gradle -v’ * Full stack trace (’-S’) * Debug log output (’-d’)
Please use HTML code blocks and GitHub Gist for the stack trace.
problem is…
we have a master project …when i execute master gradle build it automatically executes another dependant project biill-info’s gradle …
and in bill-info project my requirement is to create a folder under build folder “${project.buildDir}/test” sirDir = file("${project.buildDir}/test")
sirDir.mkdirs() so by this, test folder is created under bill-info/build/test
this’s working fine in windows…but in unix no folder named test is created.
if i directly use mkdir (‘build/test’) ,then in unix machine test folder is created in master project.i dont need that.i need test folder should be created under bill-info/build/test
C:\AMSS\v90_0\master>gradle build -v
------------------------------------------------------------ Gradle 1.3 ------------------------------------------------------------
Gradle build time: Tuesday, November 20, 2012 11:37:38 AM UTC Groovy: 1.8.6 Ant: Apache Ant™ version 1.8.4 compiled on May 22 2012 Ivy: 2.2.0 JVM: 1.7.0_03 (Oracle Corporation 22.1-b02) OS: Windows XP 5.1 x86
Peter can you please suggest what can be the problem?
task generateSar( type: JavaExec) {
description = ‘Create sar file for all operations’
sirDir = new File("${bill-info}/sar_files")
sirDir.mkdirs()
inputs.dir aifSrcDir
outputs.dir sarFile
}
this is a gradle build of project bill-info
if i run master project gradle build “sarfiles” directory is created in bill-info’s project
bill-info/build/sarfiles.(this’s working in windows)
But this’s not working on unix machine.
I have no idea what the problem is. Of course I’d need to see the requested information (‘gradle -v’, stack trace, debug log) for the Unix machine, not the Windows machine.