批量读取productFlavors

productFlavors {
        def path="./channel.txt"
        file(path).eachLine { line->
            def words = line.split(':')
            def key = words[0]
            def channel = words[1]
            if (key == '') {
                key = channel
            }
            def name = 's'+channel
            "$name" {
                manifestPlaceholders=[APP_KEY_PLACEHOLDER:key, APP_PID_PLACEHOLDER:name]
            }
        }
    }

你可能感兴趣的:(批量读取productFlavors)