本文主要是介绍Gradle中的DSL,Groovy Kotlin 引用arr库新写法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
build.gradle 文件这样写
api fileTree(include: ['*.aar'], dir: 'libs')
api fileTree(include: ['*.aar'], dir: 'libs/gromore') //gromore为lib子目录
api fileTree(include: ['*.aar'], dir: 'libs/gromore/baidu')
api fileTree(include: ['*.aar'], dir: 'libs/gromore/ks')
api fileTree(include: ['*.aar'], dir: 'libs/gromore/pangle')
build.gradle.kts 文件这样写
// api(fileTree(mapOf("include" to listOf("*.aar"), "dir" to "libs")))//测试工具
// api(fileTree(mapOf("include" to listOf("*.aar"), "dir" to "libs/gromore")))
// implementation(fileTree(mapOf("include" to listOf("*.jar", "*.aar"), "dir" to "libs/gromore/baidu")))
// implementation(fileTree(mapOf("include" to listOf("*.jar", "*.aar"), "dir" to "libs/gromore/ks")))
// api(fileTree(mapOf("include" to listOf("*.jar", "*.aar"), "dir" to "libs/gromore/pangle")))
这篇关于Gradle中的DSL,Groovy Kotlin 引用arr库新写法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!