Search code examples
gradle-kotlin-dsl

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()


Solution

  • If you are looking for the equivalent of

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

    that would be:

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