SimonErm/react-native-job-queue

No support for Gradle 8

spsaucier opened this issue ยท 5 comments

Description

Upgrading to React Native 0.72 updates Gradle to version 8.0.1.

react-native-job-queue does not work with Gradle version 8.

Steps to Reproduce

Create new React Native app & try to install this package and build for Android.

Expected Behavior

App builds & installs

Relevant Logs / Console output

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':react-native-job-queue'.
> Could not create task ':react-native-job-queue:spotlessJava'.
   > Cannot use @TaskAction annotation on method SpotlessTask.performAction() because interface org.gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method.

Your Environment

System:
  OS: macOS 13.5
  CPU: (10) arm64 Apple M1 Max
  Memory: 102.03 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.14.2
    path: ~/.nvm/versions/node/v18.14.2/bin/node
  Yarn:
    version: 1.22.17
    path: /usr/local/bin/yarn
  npm:
    version: 9.6.7
    path: ~/.nvm/versions/node/v18.14.2/bin/npm
  Watchman:
    version: 2023.07.24.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.12.1
    path: /Users/stephensaucier/.gem/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 22.4
      - iOS 16.4
      - macOS 13.3
      - tvOS 16.4
      - watchOS 9.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2021.3 AI-213.7172.25.2113.9014738
  Xcode:
    version: 14.3.1/14E300c
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 11.0.16
    path: /usr/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: "18.2"
  react-native:
    installed: 0.72.4
    wanted: ^0.72.4
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

hi, is the only workaround to downgrade react native?

Same question, would really appreciate if this was addressed.

Hi folks, the last week we migrate from react native 0.68.7 to 0.72.5 and face this problem, our work around was update the spotless repo and version to 5.0, you can apply this changes with patch-package.

Create a file named: react-native-job-queue+0.5.0.patch on the patch folder and paste this content:

diff --git a/node_modules/react-native-job-queue/android/build.gradle b/node_modules/react-native-job-queue/android/build.gradle
index ce463bf..942dcd0 100644
--- a/node_modules/react-native-job-queue/android/build.gradle
+++ b/node_modules/react-native-job-queue/android/build.gradle
@@ -11,7 +11,7 @@ buildscript {
 }
 
 plugins {
-    id "com.diffplug.gradle.spotless" version "3.23.0"
+    id "com.diffplug.spotless" version "5.0.0"
 }
 
 spotless {

Hope Helps.

Can you test #101

Fixed in 0.5.1