How to add local jar files to your gradle dependencies

The easiest way to add external dependencies with local jar files to your gradle is:

dependencies {
    implementation(files("libs/YouTubeAndroidPlayerApi.jar"))

If you don’t want to add every lib individually you can use:

dependencies {
    implementation fileTree('libs')