I'm trying to configure Bitbucket Pipelines on my Android project but I still haven't been able to make it work.
I'm receiving this error message:
A problem occurred configuring root project 'build'.
> Could not resolve all files for configuration ':classpath'.
> Could not download guava.jar (com.google.guava:guava:18.0)
> Could not get resource 'https://jcenter.bintray.com/com/google/guava/guava/18.0/guava-18.0.jar'.
> Response 304: Not Modified has no content!I'm not sure why is it trying to use Guava 18.0 if my build.gradle uses version 20.0.
Root build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.0.0'
/*classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'*/
classpath 'me.tatarka:gradle-retrolambda:3.3.1'
classpath 'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
dependencies {
}
ext {
// Sdk and tools
minSdkVersion = 15
targetSdkVersion = 25
compileSdkVersion = 25
buildToolsVersion = '25.0.2'
// App dependencies
supportLibraryVersion = '25.3.1'
guavaVersion = '20.0'
googlePlayServices = '10.2.1'
}Module build.gradle:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'me.tatarka.retrolambda'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
dexOptions {
maxProcessCount 2
javaMaxHeapSize "2g"
}
defaultConfig {
applicationId "br.com.myapp.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled = true
}
packagingOptions {
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
/*androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})*/
// Support libraries
compile "com.android.support:design:$rootProject.ext.supportLibraryVersion"
compile "com.android.support:cardview-v7:$rootProject.ext.supportLibraryVersion"
compile "com.android.support:recyclerview-v7:$rootProject.ext.supportLibraryVersion"
compile "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion"
compile "com.android.support:support-v4:$rootProject.ext.supportLibraryVersion"
compile "com.android.support:gridlayout-v7:$rootProject.ext.supportLibraryVersion"
compile "com.android.support:customtabs:$rootProject.ext.supportLibraryVersion"
// Google Maps
//compile 'com.google.android.gms:play-services:10.0.0'
compile "com.google.android.gms:play-services-maps:$rootProject.ext.googlePlayServices"
compile "com.google.android.gms:play-services-location:$rootProject.ext.googlePlayServices"
compile "com.google.android.gms:play-services-places:$rootProject.ext.googlePlayServices"
compile 'com.android.support:multidex:1.0.0'
// Firebase
// compile 'com.google.firebase:firebase-database:10.0.0'
// jUnit
/*testCompile 'junit:junit:4.12'*/
// Crashlytics
compile('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') {
transitive = true;
}
// Parceler
/*compile 'org.parceler:parceler-api:1.1.1'
apt 'org.parceler:parceler:1.1.1'*/
// Retrofit
compile 'com.google.code.gson:gson:2.7'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup:android-times-square:1.6.5@aar'
compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
// Glide
compile 'com.github.bumptech.glide:glide:3.7.0'
// Glide Transformations
compile 'jp.wasabeef:glide-transformations:2.0.1'
// ReactiveX
/*compile 'io.reactivex:rxandroid:1.2.0'
compile 'io.reactivex:rxjava:1.1.4'*/
// SparkButton
compile 'com.github.varunest:sparkbutton:1.0.2'
// DI
/*apt 'com.google.dagger:dagger-compiler:2.7'
compile 'com.google.dagger:dagger:2.7'
provided 'javax.annotation:jsr250-api:1.0'*/
// MaterialDatePicker
/*compile 'com.wdullaer:materialdatetimepicker:3.0.0'*/
// Date
/*compile 'joda-time:joda-time:2.9.6'*/
//CircleImageView
compile 'de.hdodenhof:circleimageview:2.1.0'
//HelpStack
compile 'com.tenmiles:helpstack:1.2.0'
// Guava
compile "com.google.guava:guava:$rootProject.ext.guavaVersion"
// compile 'com.microsoft.azure:azure-mobile-android:3.1.0'
/*compile 'com.microsoft.azure:azure-notifications-handler:1.0.1@jar'*/
compile 'com.jaredrummler:material-spinner:1.1.0'
}
apply plugin: 'com.google.gms.google-services'And here is my bitbucket-pipelines.yml:
image: uber/android-build-environment:latest
pipelines:
default:
- step:
script:
- echo y | android update sdk --filter "extra-android-m2repository" --no-ui -a # Grab the Android Support Repo which isn't included in the container
- bash ./gradlew build
What is wrong with it?