12 Commits

Author SHA1 Message Date
a3ea39db04 [animations] Remove .flutter-plugins reference from example app (#8002)
Removes `.flutter-plugins` reference from example by (1) deleting the `packages/animations/example/android` directory, (2) running (in the `packages/animations` directory)

```
flutter create example --platforms android -a kotlin --org "dev.flutter.packages.animations"
```
and then (3) manually made the following changes:

- Added back `packages/animations/example/android/.pluginToolsConfig.yaml` (removed by command)
- Updated the Gradle version from 8.7 to 8.3 (downgraded by command)
- Deleted  `example/analysis_options.yaml` (added by command)
- Deleted `example/test/` (added by command)
- Added back artifact hub
- Removed template TODOs
- Bumped Kotlin Gradle version to 1.9.0
- Bumped AGP version from 8.1.0 to 8.5.1.

Part of https://github.com/flutter/flutter/issues/157660.
2024-11-08 21:53:19 +00:00
4feddffcfa Applied Gradle Plugins Declaratively for path_provider (#7822)
Updated applying gradle plugins from usage of imperative apply to usage
of declarative blocks {} apply. Intending on updating all android
example apps under packages. Did one more as a proof of concept before
doing more.

More information on Flutter Gradle Plugin Apply
[here](https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply)

Partially addresses
[#152656](https://github.com/flutter/flutter/issues/152656)
## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] page, which explains my
responsibilities.
- [x] I read and followed the [relevant style guides] and ran the
auto-formatter. (Unlike the flutter/flutter repo, the flutter/packages
repo does use `dart format`.)
- [x] I signed the [CLA].
- [x] The title of the PR starts with the name of the package surrounded
by square brackets, e.g. `[shared_preferences]`
- [x] I [linked to at least one issue that this PR fixes] in the
description above.
- [x] I updated `pubspec.yaml` with an appropriate new version according
to the [pub versioning philosophy], or this PR is [exempt from version
changes].
- [x] I updated `CHANGELOG.md` to add a description of the change,
[following repository CHANGELOG style], or this PR is [exempt from
CHANGELOG changes].
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] 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/packages/blob/main/CONTRIBUTING.md
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md
[relevant style guides]:
https://github.com/flutter/packages/blob/main/CONTRIBUTING.md#style
[CLA]: https://cla.developers.google.com/
[Discord]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Chat.md
[linked to at least one issue that this PR fixes]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#overview
[pub versioning philosophy]: https://dart.dev/tools/pub/versioning
[exempt from version changes]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#version
[following repository CHANGELOG style]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog-style
[exempt from CHANGELOG changes]:
https://github.com/flutter/flutter/blob/master/docs/ecosystem/contributing/README.md#changelog
[test-exempt]:
https://github.com/flutter/flutter/blob/master/docs/contributing/Tree-hygiene.md#tests

---------

Co-authored-by: Reid Baker <reidbaker@google.com>
2024-10-30 12:38:55 -07:00
4afc383a6d [various] Update Java compatibility version to 11 (#7795)
Now that `stable` requires AGP 7.0, which in turn requires Java 11+, we should be able to set our compatibility version to 11 (setting the min Flutter SDK version to current stable).

Also removes the gradle conditionals for setting namespace (and the repo tool checks that it is present), as that was only needed for AGP 4.1 compatibility.

Part of https://github.com/flutter/flutter/issues/156111
2024-10-05 12:06:33 +00:00
3d358d921a [many] Ignore NewerVersionAvailable in android lint (#7218)
- **Updates android lint to ignore NewerVersionAvailable**
- **Update changelog**

Fixes https://github.com/flutter/flutter/issues/152316
2024-07-26 14:22:18 +00:00
88b7d1677c [most on Android] Bump compile SDK version to 34 (#5783)
This PR does the following:

1. Bumps compile SDK version to 34 for all packages on Android besides `webview_flutter_android`, which is blocked by finishing https://github.com/flutter/flutter/issues/137082.
2. Bumps legacy all_packages app to 33 because compiling failed after completing 1 (see example of failing build [here](https://ci.chromium.org/ui/p/flutter/builders/try/Linux_android%20android_build_all_packages%20master/5159/overview)). There was a Flutter fix available, so I believe this bump is safe.
3. Replaces all deprecated `compileSdkVersion` usages with `compileSdk`.
2024-01-22 22:39:06 +00:00
6cb2a32b7f [All] Expand artifact hub to all plugins (#4645)
- Adds artifact hub check to gradle command
- Add tests for build.gradle and settings.gradle check
- Update all example build.gradle and settings.gradle files

flutter/flutter/issues/120119

Expansion of https://github.com/flutter/packages/pull/4567
2023-08-07 18:33:26 +00:00
8febbba0c3 [ci] Enforce a minimum Kotlin version in examples (#3979)
https://github.com/flutter/packages/pull/3973 caused an out-of-band
failure after publishing, because an example that uses `url_launcher`
had a too-old Kotlin version set. This is not something we consider
client-breaking because `flutter` prodives a very clear error message
with a straightforward and actionable fix step (update the app's Kotlin
version), so the fix for the breakage is just to update our own
examples.

Since increasingly we're likely to hit problems where modern version of
dependencies don't work with old version of Kotlin, this adds repo-wide
CI enforcement that examples are set to a minimum version (matching the
current `flutter/flutter` template; we can increase this over time as we
feel it's useful to do so).
2023-05-15 10:54:35 -04:00
a86beafa89 [various] Conditionalize the namespace in all Android plugins (#3836)
The recent change to add `namespace` to all plugins broke builds for apps using AGP 4.1 or earlier. This conditionalizes setting the namespace based on whether the property exists at all, making it compatible with both AGP 8.0 and AGP <4.2.

Updates tooling to enforce this for plugin (but not example app) build.gradle files.

Fixes https://github.com/flutter/flutter/issues/125621
2023-04-28 00:34:33 +00:00
5ae8a1da2a [various] Add targetCompatibility to build.gradle (#3825)
While current docs about `targetCompatibility` say that it defaults to `sourceCompatibility`, for older toolchains (AGP?) that is apparently not the case, and it's a build error to set `sourceCompatibility` without `targetCompatibility`.

This adds enforcement that it's set to `gradle-check`, and fixes all of the violations.

Fixes https://github.com/flutter/flutter/issues/125482
2023-04-26 18:47:10 +00:00
3e88d03a16 [tool] Move Android lint checks (#3816)
Moves the checks for Android warning configuration from `lint-android`, where it made sense to put them at the time, to the new `check-gradle`, which is a newer command specifically for validating that our Gradle files are following best practices.

Makes minor changes to the Pigeon platform test projects to make them conform to the checks, since they are now included in the run. The changes shouldn't actually change the behavior of the Pigeon tests.
2023-04-26 02:11:12 +00:00
6284c2d4e4 [various] Adds Android namespace (#3791)
Adds a `namespace` attribute to the Android build.gradle, for compatibility with Android Gradle Plugin 8.0, and adds tooling to enforce that it's there.

This is necessary for plugins now; for examples this isn't needed yet, but since it will be needed to eventually update the apps to AGP 8.0 anyway, it's easiest to just enforce it everywhere now.
2023-04-25 15:38:53 +00:00
a4ced6bd36 [tool] Add initial gradle validation command (#3715)
Adds a repo tool command to validate that all plugins set an explicit Java compatibility version, instead of using whatever the local toolchain happens to be (which creates the potential for issues like https://github.com/flutter/flutter/issues/124839 where our CI passes but builds fail for some clients because our default is newer than theirs).

Currently that's all it checks, but we can add any other gradle best practices we want to enforce here in the future.

This also enables the new check in CI, and fixes all the violations it found.

Fixes https://github.com/flutter/flutter/issues/124839
2023-04-17 16:35:22 +00:00