Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch react-native-peripheral@0.0.3 for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/react-native-peripheral/android/build.gradle b/node_modules/react-native-peripheral/android/build.gradle
index b01733b..ccfb0a2 100644
--- a/node_modules/react-native-peripheral/android/build.gradle
+++ b/node_modules/react-native-peripheral/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
@@ -92,14 +92,16 @@ def configureReactNativePom(def pom) {
}
}
}
-
+configurations {
+ customConfig.extendsFrom implementation
+}
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())
+ classpath += files(project.getConfigurations().getByName('customConfig').asList())
include '**/*.java'
}
@@ -126,12 +128,12 @@ afterEvaluate { project ->
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
- }
- }
+ // 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
+ // }
+ // }
}
This issue body was partially generated by patch-package.
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
react-native-peripheral@0.0.3for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.