You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: produce pom/jar files with content_hash (flutter#172378)
fixes: flutter#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: dfd7318 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
```
0 commit comments