react-native-android-inapp-updates
react-native-android-inapp-updates copied to clipboard
React Native 0.70.x Support
To reproduce:
npx react-native init inappUpdates
cd inappUpdates
yarn add kumparan/react-native-android-inapp-updates # use git version to apply unpublished changes
cd android
./gradlew assembleRelease
Error:
FAILURE: Build failed with an exception.
* Where:
Build file '/home/i/tmp/inappUpdates/node_modules/@gurukumparan/react-native-android-inapp-updates/android/build.gradle' line: 123
* What went wrong:
A problem occurred configuring project ':gurukumparan_react-native-android-inapp-updates'.
> Could not resolve all files for configuration ':gurukumparan_react-native-android-inapp-updates:implementation'.
> Could not resolve com.facebook.react:react-native:+.
Required by:
project :gurukumparan_react-native-android-inapp-updates
> Cannot choose between the following variants of com.facebook.react:react-native:0.70.6:
- debugVariantDefaultRuntimePublication
- releaseVariantDefaultRuntimePublication
All of them match the consumer attributes:
- Variant 'debugVariantDefaultRuntimePublication' capability com.facebook.react:react-native:0.70.6:
- Unmatched attributes:
Demo repo: https://github.com/retyui/inapp-updates-rn-70
Same issue here with react native 0.71.3
@renopp Any way you could look into this?
I used patch-package to fix it:
diff --git a/node_modules/@gurukumparan/react-native-android-inapp-updates/android/build.gradle b/node_modules/@gurukumparan/react-native-android-inapp-updates/android/build.gradle
index 12090aa..725b158 100644
--- a/node_modules/@gurukumparan/react-native-android-inapp-updates/android/build.gradle
+++ b/node_modules/@gurukumparan/react-native-android-inapp-updates/android/build.gradle
@@ -108,20 +108,26 @@ def configureReactNativePom(def pom) {
}
}
+configurations {
+ implementation {
+ canBeResolved = true
+ }
+}
+
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 androidJavadoc(type: Javadoc) {
+// source = android.sourceSets.main.java.srcDirs
+// classpath += files(android.bootClasspath)
+// classpath += files(project.getConfigurations().getByName('implementation').asList())
+// include '**/*.java'
+// }
+
+// task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
+// classifier = 'javadoc'
+// from androidJavadoc.destinationDir
+// }
task androidSourcesJar(type: Jar) {
classifier = 'sources'
@@ -140,7 +146,7 @@ afterEvaluate { project ->
artifacts {
archives androidSourcesJar
- archives androidJavadocJar
+// archives androidJavadocJar
}
publishing {
Nice that patch worked for me!