0

I've deployed artifact to bintray as it whitten in documentation (using their plugin). All looks fine. It is opened in browder, structure looks fine: https://dl.bintray.com/flymob/maven/

Now I want to use it via gradle in Android Studio before publishing to jcenter(). I've read their documentation https://bintray.com/docs/usermanual/formats/formats_mavenrepositories.html#_working_with_gradle

I've tried:

buildscript {
    repositories {
        jcenter()
        maven {
            url "https://dl.bintray.com/flymob/maven"
        }
    }
}

and

compile 'flymob-sdk-sample:FlyMobSdk:1.3.0'

or

compile 'flymob-sdk-sample:FlyMobSdk:1.3.0@aar'

I'm getting error: Failed to resolve: flymob-sdk-sample:FlyMobSdk:1.3.0

What am I doing wrong?

1 Answers1

3

you added "https://dl.bintray.com/flymob/maven" inside the buildscript section. Those are the repos used by the buildscript (a.k.a. gradle script) only. Those are the repos where the system will find the plugins from apply plugin

to fix it is easy. Just move it to the repositories on the "root" of the script. Something like:

buildscript {
    repositories {
        // repos for the build script
        jcenter()
        ... etc
    }

    dependencies {
        // dependencies from the plugins from the build script
        classpath 'com.android.tools.build:gradle:2.1.2'
        ... etc
    }
}

apply plugin: 'android-sdk-manager'
apply plugin: ... etc

repositories {
    jcenter()
    maven { url "https://dl.bintray.com/flymob/maven" } <<<<< HERE 
}

dependencies {
    compile ... etc
Budius
  • 39,391
  • 16
  • 102
  • 144