Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix For: Plugin with id 'maven' not found; 'mavenDeployer' not found; 'compile' not found #125

Open
jacobira opened this issue May 12, 2023 · 2 comments

Comments

@jacobira
Copy link

jacobira commented May 12, 2023

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

This is my solution for a variety of issues as described in the title.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-static-server/android/build.gradle b/node_modules/react-native-static-server/android/build.gradle
index 0c7bca6..f0b6538 100644
--- a/node_modules/react-native-static-server/android/build.gradle
+++ b/node_modules/react-native-static-server/android/build.gradle
@@ -20,7 +20,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.
@@ -39,7 +39,7 @@ buildscript {
 }
 
 apply plugin: 'com.android.library'
-apply plugin: 'maven'
+apply plugin: 'maven-publish'
 
 android {
     compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
@@ -111,7 +111,6 @@ 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'
     }
 
@@ -142,10 +141,16 @@ afterEvaluate { project ->
 
     task installArchives(type: Upload) {
         configuration = configurations.archives
-        repositories.mavenDeployer {
+        /*repositories.mavenDeployer {
             // Deploy to react-native-event-bridge/maven, ready to publish to npm
             repository url: "file://${projectDir}/../android/maven"
             configureReactNativePom pom
-        }
+        }*/
     }
 }
+
+subprojects { subproject ->
+        if(project['name'] == 'react-native-static-server'){
+            project.configurations { compile { } }
+        }
+}

This issue body was partially generated by patch-package.

@jacobira jacobira changed the title Fix For: Plugin with id 'maven' not found Fix For: Plugin with id 'maven' not found; 'mavenDeployer' not found; 'compile' not found May 12, 2023
@rakeshprofusion
Copy link

#115

@MartinPavlik
Copy link

MartinPavlik commented Dec 13, 2023

Maybe this helps #123

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants