Jenkins: From Gradle 2.2.2.pom com.android.tools.build:gradle:2.2.2

214 views Asked by At

I am setting up Jenkins for my Android projects automated build. Since VM has Internet disabled, I downloaded gradle.2.2.2.pom from:

https://jcenter.bintray.com/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom

In my build.gradle I have linked the gradle-2.2.2.pom file like this:

buildscript {
    repositories {
        jcenter{
        url file("C:/JenkinsSetup/gradle_2.2.2.pom_file/gradle-2.2.2.pom")
    }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

But, still I am getting this error:

> Could not resolve all dependencies for configuration ':classpath'.
   > Could not find com.android.tools.build:gradle:2.2.2.
     Searched in the following locations:
         file:/C:/JenkinsSetup/gradle_2.2.2.pom_file/gradle-2.2.2.pom/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom
         file:/C:/JenkinsSetup/gradle_2.2.2.pom_file/gradle-2.2.2.pom/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.jar
     Required by:
         :LocationSensing:unspecified

Any idea what should I do next? I have downloaded and linked the .pom file build system asked me.

1

There are 1 answers

1
Wu.Xiangdong On

you should put gradle-2.2.2.pom to the path:

C:/JenkinsSetup/gradle_2.2.2.pom_file/gradle-2.2.2.pom/com/android/tools/build/gradle/2.2.2/

if you use:

    url file("C:/JenkinsSetup/gradle_2.2.2.pom_file/gradle-2.2.2.pom")