Skip to content

Commit f3d2204

Browse files
gmackallGray Mackallreidbakergnprice
authored
[Android] Add .cxx directories to app template .gitignore (#161069)
Fixes (but I still need to write the draft of the blog section so don't autoclose github 🙏 ) flutter/flutter#160372. -Module templates [already exclude the entire `.android` directory](https://github.com/flutter/flutter/blob/d9b7e5664604a55a3e900b0c619ee319065abb0e/packages/flutter_tools/templates/module/common/.gitignore.tmpl#L40). -Plugin templates [already exclude `.cxx`](https://github.com/flutter/flutter/blob/d9b7e5664604a55a3e900b0c619ee319065abb0e/packages/flutter_tools/templates/plugin_shared/android.tmpl/.gitignore). Modified the existing gitignores with ``` nl=$'\n' sed -i'' -e '/GeneratedPluginRegistrant.java/a\'$'\n''.cxx/'"\\${nl}"'' $(find . -path \*android/.gitignore) ``` (which was probably not the best way) Fun fact: apparently the `.gitignore` files (including the ones we copy to the template apps) aren't indexed for search (the `.gitignore.tmpl` are, but not the ones that we copy exactly [such as this one](https://github.com/flutter/flutter/blob/27ba2f279075a9a66b48ce78d94d2999b06d6e26/packages/flutter_tools/templates/app/android.tmpl/.gitignore)). ## 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> Co-authored-by: Reid Baker <hamilton.reid.baker@gmail.com> Co-authored-by: Greg Price <gnprice@gmail.com>
1 parent 481950d commit f3d2204

File tree

11 files changed

+11
-0
lines changed

11 files changed

+11
-0
lines changed

dev/a11y_assessments/android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/
89

910
# Remember to never publicly share your keystore.
1011
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app

dev/integration_tests/android_verified_input/android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/
89

910
# Remember to never publicly share your keystore.
1011
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app

dev/integration_tests/deferred_components_test/android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/
89

910
# This app uses a test key and should not be used in a production app.
1011
# key.properties

dev/integration_tests/native_driver_test/android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/
89

910
# Remember to never publicly share your keystore.
1011
# See https://flutter.dev/to/reference-keystore

dev/integration_tests/non_nullable/android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/

dev/manual_tests/android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/
89

910
# Remember to never publicly share your keystore.
1011
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app

dev/tracing_tests/android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/
89

910
# Remember to never publicly share your keystore.
1011
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app

packages/flutter_tools/templates/app/android.tmpl/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ gradle-wrapper.jar
55
/gradlew.bat
66
/local.properties
77
GeneratedPluginRegistrant.java
8+
.cxx/
89

910
# Remember to never publicly share your keystore.
1011
# See https://flutter.dev/to/reference-keystore

packages/flutter_tools/templates/plugin/android.tmpl/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
.DS_Store
77
/build
88
/captures
9+
.cxx/

packages/integration_test/android/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
.DS_Store
77
/build
88
/captures
9+
.cxx/

0 commit comments

Comments
 (0)