John "codefu" McDole 107997effa
fix: produce pom/jar files with content_hash (#172378)
fixes: #172259

The contents of the files (pom, .jar) produced by android also reference
the artifacts version number (which includes the git-hash). The flutter
recipies are just dumb re-uploaders for the content hash at the moment.
In order to change the contents, we can just update some GN files. This
has some local duplication of files, but is acceptible for now.

I've also added the content-hash as a string in the .so file and its
printed out next to the hash.

"Why is the folder name the git-hash?"

The recipies have a quirk - the logs will have you believe they upload
individual files such that "gsutil cp a.jar b.jar" would produce
"b.jar"; but that's not what's going on. The recipies recurisively
upload from the root of the temporary folder the files are copied to. At
the moment, the "Ensure" step of builder.py updates the URL path, so it
will handling uploading to the correct path, but not the file or its
contents (hence this change).

Plan for the future: at some point we can stop producing git-ref hashes.

E.g.
git-hash: dfd7318efc71019bce1665bc41c0e8c21d1344f9 content-hash:
3bfa6013b7be2b0bbadc22a9c3495d4efa46aba7

```shell
zip_archives
└── download.flutter.io
    └── io
        └── flutter
            ├── arm64_v8a_debug
            │   └── 1.0.0-dfd7318efc71019bce1665bc41c0e8c21d1344f9
            │       ├── arm64_v8a_debug-1.0.0-3bfa6013b7be2b0bbadc22a9c3495d4efa46aba7.jar
            │       ├── arm64_v8a_debug-1.0.0-3bfa6013b7be2b0bbadc22a9c3495d4efa46aba7.pom
            │       ├── arm64_v8a_debug-1.0.0-dfd7318efc71019bce1665bc41c0e8c21d1344f9.jar
            │       └── arm64_v8a_debug-1.0.0-dfd7318efc71019bce1665bc41c0e8c21d1344f9.pom
            └── flutter_embedding_debug
                └── 1.0.0-dfd7318efc71019bce1665bc41c0e8c21d1344f9
                    ├── flutter_embedding_debug-1.0.0-3bfa6013b7be2b0bbadc22a9c3495d4efa46aba7-sources.jar
                    ├── flutter_embedding_debug-1.0.0-3bfa6013b7be2b0bbadc22a9c3495d4efa46aba7.jar
                    ├── flutter_embedding_debug-1.0.0-3bfa6013b7be2b0bbadc22a9c3495d4efa46aba7.pom
                    ├── flutter_embedding_debug-1.0.0-dfd7318efc71019bce1665bc41c0e8c21d1344f9-sources.jar
                    ├── flutter_embedding_debug-1.0.0-dfd7318efc71019bce1665bc41c0e8c21d1344f9.jar
                    └── flutter_embedding_debug-1.0.0-dfd7318efc71019bce1665bc41c0e8c21d1344f9.pom
```
2025-07-19 01:35:59 +00:00
2025-07-16 01:05:07 +00:00
2025-07-16 01:05:07 +00:00

Flutter

Flutter CI Status Discord badge Twitter handle BlueSky badge codecov CII Best Practices SLSA 1

Flutter is Google's SDK for crafting beautiful, fast user experiences for mobile, web, and desktop from a single codebase. Flutter works with existing code, is used by developers and organizations around the world, and is free and open source.

Documentation

For announcements about new releases, follow the flutter-announce@googlegroups.com mailing list. Our documentation also tracks breaking changes across releases.

Terms of service

The Flutter tool may occasionally download resources from Google servers. By downloading or using the Flutter SDK, you agree to the Google Terms of Service: https://policies.google.com/terms

For example, when installed from GitHub (as opposed to from a prepackaged archive), the Flutter tool will download the Dart SDK from Google servers immediately when first run, as it is used to execute the flutter tool itself. This will also occur when Flutter is upgraded (e.g. by running the flutter upgrade command).

About Flutter

We think Flutter will help you create beautiful, fast apps, with a productive, extensible and open development model, whether you're targeting iOS or Android, web, Windows, macOS, Linux or embedding it as the UI toolkit for a platform of your choice.

Beautiful user experiences

We want to enable designers to deliver their full creative vision without being forced to water it down due to limitations of the underlying framework. Flutter's layered architecture gives you control over every pixel on the screen and its powerful compositing capabilities let you overlay and animate graphics, video, text, and controls without limitation. Flutter includes a full set of widgets that deliver pixel-perfect experiences whether you're building for iOS (Cupertino) or other platforms (Material), along with support for customizing or creating entirely new visual components.

Reflectly hero image

Fast results

Flutter is fast. It's powered by hardware-accelerated 2D graphics libraries like Skia (which underpins Chrome and Android) and Impeller. We architected Flutter to support glitch-free, jank-free graphics at the native speed of your device.

Flutter code is powered by the world-class Dart platform, which enables compilation to 32-bit and 64-bit ARM machine code for iOS and Android, JavaScript and WebAssembly for the web, as well as Intel x64 and ARM for desktop devices.

Dart diagram

Productive development

Flutter offers stateful hot reload, allowing you to make changes to your code and see the results instantly without restarting your app or losing its state.

Hot reload animation

Extensible and open model

Flutter works with any development tool (or none at all), and also includes editor plug-ins for both Visual Studio Code and IntelliJ / Android Studio. Flutter provides tens of thousands of packages to speed your development, regardless of your target platform. And accessing other native code is easy, with support for both FFI (on Android, on iOS, on macOS, and on Windows) as well as platform-specific APIs.

Flutter is a fully open-source project, and we welcome contributions. Information on how to get started can be found in our contributor guide.

Languages
Dart 75%
C++ 16.5%
Objective-C++ 2.9%
Java 2.8%
Objective-C 0.7%
Other 1.9%