-
Notifications
You must be signed in to change notification settings - Fork 52
Update android build.gradle template setup #135
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
Conversation
I think the tests are failing.. How do I regenerate the test fixtures @brodybits? |
do and I have some feedback coming up thanks @friederbluemle for the nice contribution! |
adf42e4
to
4b1acb6
Compare
Thanks @brodybits - Updated and rebased. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice, overall
I think there are some changes that should be in separate PRs, which I have already raised. I would be happy to merge the separate PRs in order to help unblock this proposal.
I also raised some comments on some items that I don't really understand here.
@friederbluemle I would also really appreciate it if you would update the title and probably the commit message to better describe the actual change. The purpose is to help people like myself, evidently not a Maven or Gradle expert, to understand what the change does and why.
I will now respond to the recent comments from @friederbluemle.
maven { | ||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm | ||
// Matches recent template from React Native 0.59 / 0.60 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove the comments here?
// https://github.com/facebook/react-native/blob/0.59-stable/template/android/build.gradle#L30 | ||
// https://github.com/facebook/react-native/blob/0.60-stable/template/android/build.gradle#L28 | ||
url "$projectDir/../node_modules/react-native/android" | ||
url "$rootDir/../node_modules/react-native/android" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
additional comment would be nice for people like me who evidently don't understand Gradle and Maven so well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are taken from the official RN template. I did not make any modification, since this is the file that will end up in an end user's generated project. I did not see any comments or reasons for this to be different here. If additional documentation/comments are necessary I'd suggest we go to the source (react-native) first to update it there.
} | ||
mavenCentral() | ||
google() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there is some reordering. Explanation would be helpful for people like me.
tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap
Outdated
Show resolved
Hide resolved
tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap
Outdated
Show resolved
Hide resolved
tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap
Outdated
Show resolved
Hide resolved
tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap
Outdated
Show resolved
Hide resolved
tests/integration/cli/create/view/__snapshots__/cli-create-with-view.test.js.snap
Outdated
Show resolved
Hide resolved
4b1acb6
to
88df273
Compare
@brodybits - As you requested, I lowered the Android Gradle plugin version to |
88df273
to
066c796
Compare
This wraps the buildscripts dependencies in a conditional. More information here: facebook/react-native#25569 (comment)
066c796
to
40afc0e
Compare
Resolved conflicts and rebased. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would appreciate it if we could fix a few more things before merging:
- Let me test and merge PR [tbd ???] update Android build tools Gradle classpath #139, to cleanup and update the Android build tools Gradle classpath item, and update this proposal accordingly
- Link to a new issue somewhere that describes the solution you proposed in Update build.gradle facebook/react-native#25569 (comment), like I requested in Add gradle plugin and androidX versions into project-level gradle react-native-community/discussions-and-proposals#151 (comment), without all of the surrounding noise.
- Some of your answers came with explanations and links that I think are really important to help people like me understand what is going on in the Gradle file. I would be grateful if you could help people like me by including this information in comments in the Gradle file. Otherwise I would probably want to do this in a followup PR.
One step further may be for you to open a new, clean PR with your proposed solution, after I have finished testing and merging PR #139.
I am sorry for all of this holdup, I just want to get this update as clean and understandable as possible for the sake of people like myself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tested the following cases:
- generate a view module with example using [email protected] (default) & run the example on Android
- generate a non-view module with example using [email protected] (default) & run the example on Android
- generate a non-view module with example using react-native@latest (0.60) & run the example on Android
- generate a non-view module with example using react-native@next (0.61-rc) & run the example on Android
followup items will be tracked in a new issue, merging now
thanks again to @friederbluemle for the nice work!
I just published version 0.11.0 with this update included. I think some followup fixes will be needed, will raise one or more issues for the tracking purposes. /cc @SaeedZhiany |
Wonderful update!
What kind of followup is needed? |
see #143 |
as a followup to updates from PR #135
as a followup to updates from PR #135 * move the other recommended references * remove react-native template reference no longer needed
This wraps the
buildscripts
section in the generatedbuild.gradle
file in a conditional, avoiding unnecessary downloads of/conflicts with different Android Gradle plugin distributions in application projects.Please check facebook/react-native#25569 for a related discussion, specifically this comment: facebook/react-native#25569 (comment)
The commit also includes some minor indentation fixes in the same file.
Closes #129
Once approved, please use a normal GitHub merge (i.e. NO rebase/squash merge) to integrate the commit(s) from the PR head branch. The changes are broken up into meaningful, atomic commits, and my branch should already be up-to-date with the latest base branch. If it isn't, or if you want me to change anything, please let me know, and I will update the branch as soon as possible. Thank you!