yandexmobile / react-native-appmetrica

React Native bridge to the AppMetrica on both iOS and Android.
MIT License
52 stars 132 forks source link

Use maven in android gradle is deprecated #64

Open emami7495 opened 2 years ago

emami7495 commented 2 years ago

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

ghost commented 2 years ago

Добрый день!Ваше письмо получено и зарегистрировано под уникальным номером № 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 commented 2 years ago

Добрый день!Ваше письмо получено и зарегистрировано под уникальным номером № 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 commented 2 years ago

Знаем о этой ситуации, активно занимаемся ее решением. Увы, но это займет некоторое время. В будущем обновлении этот 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.

alexanderoskin commented 1 year ago

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

zhizas commented 1 year ago

any solutions?

nikoswsn commented 1 year ago

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
-        }
-    }
-}
Desintegrator commented 1 year ago

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

tpetrew commented 1 year ago

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

С кайфом ))