realm / realm-java

Realm is a mobile database: a replacement for SQLite & ORMs
http://realm.io
Apache License 2.0
11.45k stars 1.75k forks source link

The archives configuration has been deprecated for resolution. This will fail with an error in Gradle 8.0. Please resolve the compileClasspath or runtimeClasspath configuration instead. #7641

Closed ErnestoDavidOlivaPerez closed 1 year ago

ErnestoDavidOlivaPerez commented 2 years ago

I have this warning when using apply plugin: 'realm-android', any idea how to solve it or what is the reason? I have searched the internet and have not found any answer, thanks in advance.

build.gradle file (Project)

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:7.1.0'
        classpath "io.realm:realm-gradle-plugin:10.10.1"

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

task clean(type: Delete) {
    delete rootProject.buildDir
}

build.gradle file (Module)

plugins {
    id 'com.android.application'
}

android {
    compileSdk 31

    defaultConfig {
        applicationId "ernestodavidolivaperez.calendariofamiliar"
        minSdk 26
        targetSdk 31
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.4.0'
    implementation 'com.google.android.material:material:1.4.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
    testImplementation 'junit:junit:4.+'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'

    implementation 'com.squareup.picasso:picasso:2.71828'

    implementation 'de.hdodenhof:circleimageview:3.1.0'

    implementation "com.naver.android.helloyako:imagecropview:1.2.3"

    implementation 'com.github.yalantis:ucrop:2.2.6'

    apply plugin: 'realm-android'
}
cmelchior commented 2 years ago

Hi @ErnestoDavidOlivaPerez Sorry for the late reply I tried to reproduce be behaviour on one of our sample projects, but that doesn't seem to have any errors (beside jcenter being removed)

And when I try to compile a project with the above, I'm getting other dependency errors. Can you also post your settings.gradle so we can reproduce it?

clementetb commented 1 year ago

Closing due to inactivity.