美文网首页
android gradle 命令学习

android gradle 命令学习

作者: 代瑶 | 来源:发表于2018-11-02 14:36 被阅读0次
    
    tasks.whenTaskAdded { task ->
        if (task.name == 'assemble') {
            task.dependsOn copyAssets
        }
    }
    
       task copyAssets() {
       println ("copyAssets")
       delete "$project.buildDir/../../navigationView/src/main/assets/"
    
        // variantDir's example: arp_na/debug
        copy {
            from "$project.buildDir/../../ARP/build/intermediates/assets/release/mapengine_config/"
            into "$project.buildDir/../../navigationView/src/main/assets/mapengine_config/"
        }
    
        copy {
            from "$project.buildDir/../../ARP/build/intermediates/assets/release/cn/mapengine_config/"
            into "$project.buildDir/../../navigationView/src/main/assets/cn/mapengine_config/"
        }
    
        copy {
            from "$project.buildDir/../../ARP/build/intermediates/assets/release/kr/mapengine_config/"
            into "$project.buildDir/../../navigationView/src/main/assets/kr/mapengine_config/"
        }
    
        copy {
            from "$project.buildDir/../../ARP/build/intermediates/assets/release/eu/mapengine_config/"
            into "$project.buildDir/../../navigationView/src/main/assets/eu/mapengine_config/"
        }
    
        copy {
            // use cluster es2_config for porch view
            from "$project.buildDir/../../ARP/src/main/assets/CLUSTER/mapengine_config/config/es2_config.json"
            into "$project.buildDir/../../navigationView/src/main/assets/mapengine_config/config/"
        }
    
        copy {
            from "$project.buildDir/../../ARP/build/intermediates/assets/release/autosdk_config/config/traffic_config/"
            into "$project.buildDir/../../navigationView/src/main/assets/traffic_config/"
        }
    
        copy {
            from "$project.buildDir/../../ARP/build/intermediates/assets/release/fonts/"
            into "$project.buildDir/../../navigationView/src/main/assets/fonts/"
        }
    
        copy {
            from "$project.buildDir/../../ARP/build/intermediates/assets/release/autosdk_config/config/backend_config/"
            into "$project.buildDir/../../navigationView/src/main/assets/backend_config/"
        }
    
        copy {
            from "$project.buildDir/../../ARP/build/navigationViewAIDL/build/intermediates/bundles/release/classes.jar"
            into "$project.buildDir/../../navigationView/libs"
            include "**"
            rename("classes.jar", "navigationViewAIDL.jar")
        }
    } 
    

    相关文章

      网友评论

          本文标题:android gradle 命令学习

          本文链接:https://www.haomeiwen.com/subject/ocfcxqtx.html