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: only do gradle afterEvaluate when building this lib alone #77

Merged
merged 1 commit into from
Nov 14, 2021

Conversation

zxcpoiu
Copy link

@zxcpoiu zxcpoiu commented Nov 5, 2021

Motivation

The afterEvaluate section in build.gradle breaks the RN building from source. ( I'm testing RN 0.67 )
Throws:

* What went wrong:
A problem occurred configuring project ':react-native-blob-util'.
> Could not resolve all files for configuration ':react-native-blob-util:debugCompileClasspath'.
   > Could not resolve com.facebook.react:react-native:+.
     Required by:
         project :react-native-blob-util
      > No matching configuration of project :ReactAndroid was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug' but:
          - None of the consumable configurations have attributes.

Seems the afterEvaluate in build.gradle is only needed when build/publish this lib alone, this PR add a check to ignore the process when building the RN app (via early return) to prevent unnecessary polluting variable and cause main RN app build failed.

Test Plan

maybe related: #72

@zxcpoiu
Copy link
Author

zxcpoiu commented Nov 5, 2021

@kklopfenstein sorry for bothering, is this PR make sense to you? I'm not quite sure what it does in detail in afterEvaluated

@RonRadtke RonRadtke merged commit 5674573 into RonRadtke:master Nov 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants