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

v1.13.4 fails to build with Gradle 7 #3119

Closed
1 of 3 tasks
TheAlmightyBob opened this issue Mar 31, 2022 · 2 comments
Closed
1 of 3 tasks

v1.13.4 fails to build with Gradle 7 #3119

TheAlmightyBob opened this issue Mar 31, 2022 · 2 comments
Labels
Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided

Comments

@TheAlmightyBob
Copy link

TheAlmightyBob commented Mar 31, 2022

Description

Despite #2881, v1.13.4 is still incompatible with Gradle 7. Gradle 7 removed "compile" in favor of "implementation," and the android/build.gradle file is still using compile in the context of

task androidJavadoc(type: Javadoc) {
    source = android.sourceSets.main.java.srcDirs
    classpath += files(android.bootClasspath)
    classpath += files(project.getConfigurations().getByName('compile').asList())
    include '**/*.java'
}

which results in the error Configuration with name 'compile' not found.

Expected behavior

Projects using the latest v1 of react-native-reanimated can build with Gradle 7.

Actual behavior & steps to reproduce

Updating to Gradle 7 fails to build react-native-reanimated with Configuration with name 'compile' not found., specifically pointing at the files(project.getConfigurations().getByName('compile').asList()) line.

Alternate simple repro steps:

  1. Use npx react-native init to create a new React Native app
  2. yarn add react-native-reanimated@1.13.4
  3. yarn android

Snack or minimal code example

https://github.com/TheAlmightyBob/ReanimatedGradle7

(this is simply the result of following the "alternate simple repro steps" above)

Package versions

name version
react-native 0.66.4
react-native-reanimated 1.13.4
Java 11
Gradle 7.1.1 or 7.2

Affected platforms

  • Android
  • iOS
  • Web
@TheAlmightyBob TheAlmightyBob added the Needs review Issue is ready to be reviewed by a maintainer label Mar 31, 2022
@github-actions github-actions bot added Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario Platform: Android This issue is specific to Android labels Mar 31, 2022
@github-actions github-actions bot added Repro provided A reproduction with a snippet of code, snack or repo is provided and removed Missing info The user didn't precise the problem enough Missing repro This issue need minimum repro scenario labels Mar 31, 2022
piaskowyk pushed a commit that referenced this issue Apr 1, 2022
…ity with Gradle 7 (#3120)

## Description

<!--
Description and motivation for this PR.

Inlude Fixes #<number> if this is fixing some issue.

Fixes # .
-->

Fixes #3119. 

## Changes

Use `implementation` instead of `compile`. This is the same fix as auth0/react-native-auth0#450.

<!--
Please describe things you've changed here, make a **high level** overview, if change is simple you can omit this section.

For example:

- Added `foo` method which add bouncing animation
- Updated `about.md` docs
- Added caching in CI builds

-->

<!--

## Screenshots / GIFs

Here you can add screenshots / GIFs documenting your change.

You can add before / after section if you're changing some behavior.

### Before

### After

-->

## Test code and steps to reproduce

Include `react-native-reanimated` with this change in a project using Gradle 7 and it should successfully build.

<!--
Please include code that can be used to test this change and short description how this example should work.
This snippet should be as minimal as possible and ready to be pasted into editor (don't exclude exports or remove "not important" parts of reproduction example)
-->
@piaskowyk piaskowyk reopened this Apr 1, 2022
@piaskowyk
Copy link
Member

Sorry but we no longer support Reanimated v1, but this PR should resolve your problem: #3120

@TheAlmightyBob
Copy link
Author

@piaskowyk That was my PR, I just thought the PR should come with an Issue that it fixes (I think other projects prefer/require that, but maybe y'all don't)

Re: "we no longer support Reanimated v1", has that been communicated elsewhere? What I see on the documentation for v2 is:

Reanimated 2 is in an early version. As we wanted to share it with the community as soon as we could, the library still has some rough edges and limitations

(and it is indeed those rough edges and limitations that make v2 unusable for us at this time)

From which I thought v1 was still supported as the more stable option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android Repro provided A reproduction with a snippet of code, snack or repo is provided
Projects
None yet
Development

No branches or pull requests

2 participants