Skip to content

Issue with Gradle 7 #18

@Albermonte

Description

@Albermonte

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @gurukumparan/react-native-android-inapp-updates@1.0.24 for the project I'm working on.

I'm getting this error when compiling using Gradle 7.3.3:

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\Alberto\Desktop\Proyectos\Nimiq-Sunset-Cyberspace\node_modules\@gurukumparan\react-native-android-inapp-updates\android\build.gradle' line: 117

* What went wrong:
A problem occurred configuring project ':gurukumparan_react-native-android-inapp-updates'.
> Configuration with name 'compile' not found.

Here is the diff that solved my problem:

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..3267dcc 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,13 +108,19 @@ 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())
+        classpath += files(project.getConfigurations().getByName('implementation').asList())
         include '**/*.java'
     }
 

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions