首页 > 解决方案 > How do you add local .jar file dependency to build.gradle.kt file?

问题描述

I have gone through similar questions regarding build.gradle and I have looked through the Gradle Kotlin Primer and I don't see how to add a .jar file to a build.gradle.kt file. I am trying to avoid using mavenLocal()

标签: gradle-kotlin-dsl

解决方案


如果您正在寻找相当于

implementation fileTree(dir: 'libs', include: ['*.jar'])

那将是:

implementation(fileTree(mapOf("dir" to "libs", "include" to listOf("*.jar"))))

推荐阅读