From 812a6028988c0b756b619fb0c0a0a192830cc164 Mon Sep 17 00:00:00 2001 From: Ibtixam Date: Tue, 28 Jan 2025 00:22:20 +0500 Subject: [PATCH] Update Gradle build configuration to use 'maven-publish' plugin and adjust JAR task properties --- android/build.gradle | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index c799ca8..a1d7e1d 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -20,7 +20,7 @@ buildscript { } apply plugin: 'com.android.library' -apply plugin: 'maven' +apply plugin: 'maven-publish' // Matches values in recent template from React Native 0.59 / 0.60 // https://github.com/facebook/react-native/blob/0.59-stable/template/android/build.gradle#L5-L9 @@ -99,17 +99,16 @@ afterEvaluate { project -> 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' + archiveClassifier = 'javadoc' from androidJavadoc.destinationDir } task androidSourcesJar(type: Jar) { - classifier = 'sources' + archiveClassifier = 'sources' from android.sourceSets.main.java.srcDirs include '**/*.java' } @@ -128,10 +127,9 @@ afterEvaluate { project -> task installArchives(type: Upload) { configuration = configurations.archives - repositories.mavenDeployer { - // Deploy to react-native-event-bridge/maven, ready to publish to npm + repositories{ + mavenDeployer { repository url: "file://${projectDir}/../android/maven" configureReactNativePom pom - } - } + }}} }