Search code examples
javaandroidkotlinartifactoryworldwind

How to import an artifactory repository (ie: worldwind) inside an Android project?


I followed the documentation to import WorldWind inside my project :

repositories { maven { url 'https://oss.jfrog.org/artifactory/oss-snapshot-local' } }

...

compile 'gov.nasa.worldwind.android:worldwind:0.9.0-SNAPSHOT'

However it throws me this exception :

Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':app:debugCompileClasspath'.

Here is my settings.gradle file :

pluginManagement {
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        maven{ url 'https://oss.jfrog.org/artifactory/oss-snapshot-local'}
    }
}
rootProject.name = "WorldWind"
include ':app'

And my build.gradle file :

...

dependencies {
    implementation 'androidx.core:core-ktx:1.10.1'
    implementation 'androidx.appcompat:appcompat:1.6.1'
    implementation 'com.google.android.material:material:1.9.0'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.5'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

    implementation 'gov.nasa.worldwind.android:worldwind:0.9.0-SNAPSHOT'
}

Any idea where this comes from?


Solution

  • You can get the 0.8.0 version from jcenter():

    // settings.gradle
    dependencyResolutionManagement {
        repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
        repositories {
            google()
            mavenCentral()
            jcenter()
        }
    }
    
    // app build.gradle
    implementation("gov.nasa.worldwind.android:worldwind:0.8.0")
    

    I think the repository has been discontinued.