«

gradle new File报错

时间:2020-8-5     作者:new     分类: 安卓应用开发


android.applicationVariants.all { variant -> def variantName = variant.name.capitalize() def mergeTask = tasks["merge${variantName}Assets"] def processTask = tasks["process${variantName}Resources"] def outFile = new File (mergeTask.outputDir.getAsFile().get(), "xwalk-command-line") def newTask = project.task("createXwalkCommandLineFile${variantName}") doLast {
        mergeTask.outputDir.mkdirs()
        outFile.write("xwalk ${xwalkCommandLine}\n")
    }
    newTask.dependsOn(mergeTask)
    processTask.dependsOn(newTask)
}