react-native-appmetrica icon indicating copy to clipboard operation
react-native-appmetrica copied to clipboard

Use maven in android gradle is deprecated

Open emami7495 opened this issue 2 years ago • 8 comments

Hi i recently add this package to my project but when i want to run android i faced with this issue : Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. that refers you must replace maven in android gradle with an alternative

emami7495 avatar Aug 06 '22 09:08 emami7495

Добрый день!Ваше письмо получено и зарегистрировано под уникальным номером № 18635050. Ответ обязательно будет предоставлен, пожалуйста, ожидайте.Просим Вас не отправлять повторное письмо по данному вопросу - оно будет считаться новой заявкой и может быть обработано позднее.Помощь сервиса: https://yandex.ru/support/direct/?from=email--С уважением,Отдел клиентского сервисател.: 8 800 234-24-80 (звонок из регионов России бесплатный)тел.: +7 495 739-37-77&nbsp06.08.2022, 12:00, "Mostafa Emami" @.***>: Hi i recently add this package to my project but when i want to run android i faced with this issue : Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. that refers you must replace maven in android gradle with an alternative

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

ghost avatar Aug 06 '22 09:08 ghost

Добрый день!Ваше письмо получено и зарегистрировано под уникальным номером № 18635050. Ответ обязательно будет предоставлен, пожалуйста, ожидайте.Просим Вас не отправлять повторное письмо по данному вопросу - оно будет считаться новой заявкой и может быть обработано позднее.Помощь сервиса: https://yandex.ru/support/direct/?from=email--С уважением,Отдел клиентского сервисател.: 8 800 234-24-80 (звонок из регионов России бесплатный)тел.: +7 495 739-37-77&nbsp06.08.2022, 12:00, "Mostafa Emami" @.>: Hi i recently add this package to my project but when i want to run android i faced with this issue : Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. that refers you must replace maven in android gradle with an alternative —Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.>

Такая же проблема

AndoInvest avatar Aug 09 '22 05:08 AndoInvest

Знаем о этой ситуации, активно занимаемся ее решением. Увы, но это займет некоторое время. В будущем обновлении этот issue будет решен.


We are aware of this situation and are actively working to resolve it as quickly as possible. In a future update the situation will be resolved.

ghost avatar Aug 10 '22 15:08 ghost

Any estimates on this issue? Now it's blocking issue for many.

alexanderoskin avatar Sep 13 '22 08:09 alexanderoskin

any solutions?

zhizas avatar Oct 18 '22 06:10 zhizas

Just added the package and got the same issue. Managed to overcome it with the following patch

diff --git a/node_modules/react-native-appmetrica/android/build.gradle b/node_modules/react-native-appmetrica/android/build.gradle
index 30d2c94..c534c2b 100644
--- a/node_modules/react-native-appmetrica/android/build.gradle
+++ b/node_modules/react-native-appmetrica/android/build.gradle
@@ -28,7 +28,7 @@ def safeExtGet(prop, fallback) {
 }
 
 apply plugin: 'com.android.library'
-apply plugin: 'maven'
+apply plugin: 'maven-publish'
 
 buildscript {
     // The Android Gradle plugin is only required when opening the android folder stand-alone.
@@ -47,7 +47,7 @@ buildscript {
 }
 
 apply plugin: 'com.android.library'
-apply plugin: 'maven'
+apply plugin: 'maven-publish'
 
 android {
     compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
@@ -113,47 +113,3 @@ def configureReactNativePom(def pom) {
     }
 }
 
-afterEvaluate { project ->
-    // some Gradle build hooks ref:
-    // https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html
-    task androidJavadoc(type: Javadoc) {
-        source = android.sourceSets.main.java.srcDirs
-        classpath += files(android.bootClasspath)
-        classpath += files(project.getConfigurations().getByName('compile').asList())
-        include '**/*.java'
-    }
-
-    task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
-        classifier = 'javadoc'
-        from androidJavadoc.destinationDir
-    }
-
-    task androidSourcesJar(type: Jar) {
-        classifier = 'sources'
-        from android.sourceSets.main.java.srcDirs
-        include '**/*.java'
-    }
-
-    android.libraryVariants.all { variant ->
-        def name = variant.name.capitalize()
-        def javaCompileTask = variant.javaCompileProvider.get()
-
-        task "jar${name}"(type: Jar, dependsOn: javaCompileTask) {
-            from javaCompileTask.destinationDir
-        }
-    }
-
-    artifacts {
-        archives androidSourcesJar
-        archives androidJavadocJar
-    }
-
-    task installArchives(type: Upload) {
-        configuration = configurations.archives
-        repositories.mavenDeployer {
-            // Deploy to react-native-event-bridge/maven, ready to publish to npm
-            repository url: "file://${projectDir}/../android/maven"
-            configureReactNativePom pom
-        }
-    }
-}

nikoswsn avatar Dec 03 '22 12:12 nikoswsn

Яндекс просто забил на эту библиотеку) Зачетно

Desintegrator avatar Feb 13 '23 12:02 Desintegrator

Яндекс просто забил на эту библиотеку) Зачетно

С кайфом ))

tpetrew avatar Apr 17 '23 12:04 tpetrew