Hi,
I upgraded my gradle version to 5.5.1 from 3.5.
Since .execute() got deprecated in gradle 5, i removed execute() in calling of task.
Here is my code.
def testExecTask = project.tasks.create(name: "test${testFile.name.capitalize()}" - '.uip', type: Exec) {
inputs.file testFile
inputs.files "${project.stage.testStageDir}"
commandLine ["${installShieldRoot}/sab/${installShieldExecutable}",
"${testFile}".replaceAll('\\\\', '/'),
"-pathVariable",
"staging=${finalLocation}".replaceAll('\\\\', '/'),
"-pathVariable",
"staging64=${finalLocation}".replaceAll('\\\\', '/'),
"-pathVariable",
"ASSEMBLY_DIR=${project.buildDir}/build/kitting/assembly64".replaceAll('\\\\', /'),
"-pathVariable",
"images_dir=${project.stage.dir}/images".replaceAll('\\\\', '/'),
"-build",
"${configurationName}"]
environment KIT_OS_ARCH: "64"
}
testExecTask.execute()
Instead of testExecTask.execute(), now i am just calling task as testExecTask after upgrading to gradle 5.
Task is called but commandLine doesn’t get executed. Please can someone help as to how to make sure commandLine code is executed. Everything worked well in 3.5 gradle version.
Regards,
Anand