From faa9fb3bbf09e4cbbf32dca2a1ff916304aa9bbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=BB=D1=8C=D1=8F=20=D0=A0=D0=B0=D0=B5=D0=B2=D1=81?= =?UTF-8?q?=D0=BA=D0=B8=D0=B9?= Date: Tue, 25 Jan 2022 19:38:25 +0500 Subject: [PATCH] =?UTF-8?q?Fix:=20Plugin=20with=20id=20=E2=80=98maven?= =?UTF-8?q?=E2=80=99=20not=20found.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/build.gradle | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 30d2c94..b1a6682 100644 --- a/android/build.gradle +++ b/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) @@ -124,12 +124,12 @@ afterEvaluate { project -> } task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) { - classifier = 'javadoc' + archiveClassifier = 'javadoc' from androidJavadoc.destinationDir } task androidSourcesJar(type: Jar) { - classifier = 'sources' + archiveClassifier = 'sources' from android.sourceSets.main.java.srcDirs include '**/*.java' } @@ -143,17 +143,14 @@ afterEvaluate { project -> } } - 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 + publishing { + publications { + maven(MavenPublication) { + artifact androidSourcesJar + } + } } } }