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

[...] refactor stand-alone build definitions in android/build.gradle (generated artifact) #142

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

brody4hire
Copy link
Owner

What

  • define Android build tools classpath constant, near the beginning of generated android/build.gradle
  • rename the new constant in a FIX-UP commit TO BE SQUASHED before or when merging
  • add TEMPORARY logging statements for testing purposes only
  • explicitly define isStandalone in the beginning of generated android/build.gradle

in followup to updates from PRs #135, #140, and #141

Status

Attempt to build and run example on Android fails with the following output:

Build file '/Users/brodybits/dev/create-react-native-module/cc-788F9A47-CA77-4C23-8CDD-D9561C063828/react-native-bbb/example/node_modules/react-native-bbb/android/build.gradle' line: 17

* What went wrong:
A problem occurred evaluating project ':react-native-bbb'.
> Could not get unknown property 'isStandalone' for object of type org.gradle.api.internal.initialization.DefaultScriptHandler.

If I would test at 636cec6, with the TEMPORARY logging statements but no explicit definition of isStandalone, the following log output is interesting:

> Configure project :react-native-aaa
** starting buildscript for stand-alone
** defining STANDALONE_BUILD_TOOLS_CLASSPATH

This output indicates to me that the buildscript block with the stand-alone build support is executed before any of the initial def items.

At this time I do not understand this. Any help would be much appreciated.

TODO items

  • resolve the issue described above, so that it may be possible to define the standalone items in the beginning as proposed here
  • remove the TEMPORARY logging statements
  • update the tests
  • squash down to 1 or 2 commits before or during the merge

/cc @friederbluemle @SaeedZhiany

Christopher J. Brody added 4 commits September 19, 2019 17:13
near the beginning of generated android/build.gradle
results in the following added output when running the example on
Android:

** starting buildscript for stand-alone
** defining STANDALONE_BUILD_TOOLS_CLASSPATH

this output indicates that for some reason, the buildscript block is
executed *before* any of the initial defs are executed
(explicitly)

XXX NOT WORKING since the buildscript block is executed *before*
any of the initial defs are executed
@brody4hire brody4hire added the help wanted Extra attention is needed label Sep 19, 2019
@brody4hire brody4hire changed the base branch from dev to master November 15, 2019 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant