All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.faker.android.gradle.StableIdUtlis.groovy Maven / Gradle / Ivy

The newest version!
package com.faker.android.gradle;

class StableIdUtlis {
    public static String xml2AaptArg(packageId, publicXmlFile,publicTxtFile) {
//        def result = new File(mProject.buildDir, "xml2AaptArg/$packageId/public.txt")
        if (!publicTxtFile.getParentFile().exists()) {
            publicTxtFile.getParentFile().mkdirs()
        }
        def sb = new StringBuilder()
        def nodes = new XmlParser().parse(publicXmlFile)
        nodes.each {
            sb.append("${packageId}:${it.@type}/${it.@name} = ${it.@id}\n")
        }
        publicTxtFile.write(sb.toString())
        return publicTxtFile.getAbsolutePath()
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy