Skip to content Skip to sidebar Skip to footer

How To Execute A Command In Windows Cmd Using Gradle?

I am trying to execute this command using Gradle . .\build\build.exe parse /p 246 /o '.\strings.xml.bcg' /novalidate /l 1033 /sr '@LbaRoot@\settings\default\lss\default.config' '..

Solution 1:

Ok I got the issue . Looks like for windows, we have to write like this

     task runLSBuild(type:Exec) {
    workingDir '../outer_build'

    //on windows:
    commandLine "cmd","/c",'.\\build\\build.exe parse /p 246 /o ".\\strings.xml.bcg" /novalidate /l 1033 /sr "@LbaRoot@\\settings\\default\\lss\\default.config" "..\\app\\src\\main\\res\\values\\strings.xml"'
}

Post a Comment for "How To Execute A Command In Windows Cmd Using Gradle?"