react-native-async-storage / async-storage

An asynchronous, persistent, key-value storage system for React Native.
https://react-native-async-storage.github.io/async-storage/
MIT License
4.61k stars 459 forks source link

Execution failed for task ':app:lintVitalRelease' #1025

Closed hypnocill closed 7 months ago

hypnocill commented 7 months ago

What happened?

In react-native 0.67.5 during build in CI/CD since we updated @react-native-async-storage/async-storage from 1.17.12 to 1.19.3 we get the following issue:

Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':react-native-async-storage_async-storage:debugUnitTestRuntimeClasspath'.
   > Failed to transform bcprov-jdk15on-1.68.jar (org.bouncycastle:bcprov-jdk15on:1.68) to match attributes {artifactType=processed-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
      > Execution failed for JetifyTransform: /Users/runner/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.68/46a080368d38b428d237a59458f9bc915222894d/bcprov-jdk15on-1.68.jar.
         > Failed to transform '/Users/runner/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.68/46a080368d38b428d237a59458f9bc915222894d/bcprov-jdk15on-1.68.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 59. (Run with --stacktrace for more details.)
           Suggestions:
            - Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
            - If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).

Version

1.19.3

What platforms are you seeing this issue on?

System Information

Could not run directly since it's in closed CI/CD environment but it uses Node v16, JDK 15, com.android.tools.build:gradle:4.2.2 in build.gradle and https\://services.gradle.org/distributions/gradle-7.4-all.zip in gradle-wrapper.properties in gradle-wrapper.properties, react-native 0.67.5

Steps to Reproduce

React Native Android Release Build Process

krizzu commented 7 months ago

message: Unsupported class file major version 59 Version 59 is JDK 15, while your env is using 11, but desugaring should handle that case. Which Android Gradle Plugin do you use?

hypnocill commented 7 months ago

message: Unsupported class file major version 59 Version 59 is JDK 15, while your env is using 11, but desugaring should handle that case. Which Android Gradle Plugin do you use?

Sorry, my mistake, I saw the $(JAVA_HOME_11_X64) env variable and mentioned that. Will edit the original post.

The gradle version is com.android.tools.build:gradle:4.2.2 in build.gradle and https\://services.gradle.org/distributions/gradle-7.4-all.zip in gradle-wrapper.properties

krizzu commented 7 months ago

Try with AGP version 7.x.x https://developer.android.com/build/releases/past-releases/agp-7-4-0-release-notes

hypnocill commented 7 months ago

Try with AGP version 7.x.x https://developer.android.com/build/releases/past-releases/agp-7-4-0-release-notes

Yes, it did work. Thank you, closing the issue now