add plugin to gradle buildscript from a local jar

后端 未结 2 2081
故里飘歌
故里飘歌 2020-12-30 10:59

I\'d like to apply the google-services Gradle plugin to a Java project from a local jar, such that my build does not need to connect to jcenter to download the

2条回答
  •  臣服心动
    2020-12-30 11:32

    I was able to add the plugin from the jar by adding the jar in my lib folder and call it from the project gradle dependencies like so :

    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:2.1.2'
            classpath fileTree(include: ['*.jar'], dir: 'app/libs')
            classpath files('app/libs/google-services-3.0.0.jar')
    
            // NOTE: Do not place your application dependencies here; they belong
            // in the individual module build.gradle files
        }
    }
    

提交回复
热议问题