Add instructions to download the Gradle wrapper to FGP readme, and add to gitignore (#162332)

Fixes https://github.com/flutter/flutter/issues/161480.

Ended up going with just providing instructions instead of checking in
the binary, as the instructions is just one line.

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [ ] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [ ] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

Co-authored-by: Gray Mackall <mackall@google.com>
This commit is contained in:
Gray Mackall 2025-01-28 18:04:50 -08:00 committed by GitHub
parent 8b9b6a39af
commit 2d11b6a362
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 3 deletions

View File

@ -1742,7 +1742,7 @@ class Hash256 {
// We have a policy of not checking in binaries into this repository.
// If you are adding/changing template images, use the flutter_template_images
// package and a .img.tmpl placeholder instead.
// If you have other binaries to add, please consult Hixie for advice.
// If you have other binaries to add, please consult johnmccutchan for advice.
final Set<Hash256> _legacyBinaries = <Hash256>{
// DEFAULT ICON IMAGES
@ -2099,7 +2099,7 @@ Future<void> verifyNoBinaries(String workingDirectory, {Set<Hash256>? legacyBina
// We have a policy of not checking in binaries into this repository.
// If you are adding/changing template images, use the flutter_template_images
// package and a .img.tmpl placeholder instead.
// If you have other binaries to add, please consult Hixie for advice.
// If you have other binaries to add, please consult johnmccutchan for advice.
assert(
_legacyBinaries
.expand<int>((Hash256 hash) => <int>[hash.a, hash.b, hash.c, hash.d])

View File

@ -0,0 +1,3 @@
gradlew
gradlew.bat
gradle/**

View File

@ -18,7 +18,11 @@ new contributions will only be accepted in `src/main/kotlin` (and `src/test/kotl
### Testing
Tests can be run in Android Studio, or directly with Gradle: `./gradle test`
To run the tests from the CLI, you first need to download the Gradle wrapper.
1. Ensure you have run gclient sync recently (i.e., from the root of your framework checkout, run `gclient sync -D`).
2. From this directory, run `../../../engine/src/flutter/third_party/gradle/bin/gradle wrapper`.
Tests can be run in Android Studio, or directly with Gradle: `./gradlew test`
(note that this directory does not contain a version controlled Gradle file. You can find one in
the engines `third_party` directory at
`<flutter_root>/engine/src/flutter/third_party/gradle/bin/gradle`).