Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] Task ':sentry_react-native:generateCodegenArtifactsFromSchema' uses this output of task ':@sentry_react-native:generateCodegenSchemaFromJavaScript' without declaring an explicit or implicit dependency. #3585

Closed
5 of 11 tasks
skinnynpale opened this issue Feb 9, 2024 · 2 comments

Comments

@skinnynpale
Copy link

skinnynpale commented Feb 9, 2024

OS:

  • Windows
  • MacOS
  • Linux

Platform:

  • iOS
  • Android

SDK:

  • @sentry/react-native (>= 1.0.0)
  • react-native-sentry (<= 0.43.2)

SDK version: 5.18.0

react-native version: 0.73.3

Are you using Expo?

  • Yes
  • No

Are you using sentry.io or on-premise?

  • sentry.io (SaaS)
  • on-premise

I have the following issue:

[Description]

Steps to reproduce:
./gradlew assembleRelease or ./gradlew generateCodegenArtifactsFromSchema

Actual result:

> Task :sentry_react-native:generateCodegenArtifactsFromSchema FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':sentry_react-native:generateCodegenArtifactsFromSchema' (type 'GenerateCodegenArtifactsTask').
  - Gradle detected a problem with the following location: '/Users/skinnynpale/work_projects/mobile/node_modules/@sentry/react-native/android/build/generated/source/codegen/schema.json'.
    
    Reason: Task ':sentry_react-native:generateCodegenArtifactsFromSchema' uses this output of task ':@sentry_react-native:generateCodegenSchemaFromJavaScript' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
    
    Possible solutions:
      1. Declare task ':@sentry_react-native:generateCodegenSchemaFromJavaScript' as an input of ':sentry_react-native:generateCodegenArtifactsFromSchema'.
      2. Declare an explicit dependency on ':@sentry_react-native:generateCodegenSchemaFromJavaScript' from ':sentry_react-native:generateCodegenArtifactsFromSchema' using Task#dependsOn.
      3. Declare an explicit dependency on ':@sentry_react-native:generateCodegenSchemaFromJavaScript' from ':sentry_react-native:generateCodegenArtifactsFromSchema' using Task#mustRunAfter.
    
    For more information, please refer to https://docs.gradle.org/8.3/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.3/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 5s
100 actionable tasks: 2 executed, 98 up-to-date

Expected result:

[Expected result]

@skinnynpale
Copy link
Author

After delete this — is now working!

image

@krystofwoldrich
Copy link
Member

Hi @skinnynpale,
thank you for the message and the solution.

You are correct to remove the manual @sentry_react-native include. This is only needed in the case of manual linking.

In all other cases React Native Autolinking will correctly include the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Archived in project
Development

No branches or pull requests

2 participants