Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 97ec469

Browse files
[fuchsia] use the api-level from gn-sdk (#54740)
https://crrev.com/c/5805927 provides the default api-level in gn-sdk, so as long as we have the latest gn-sdk / skia setup, the api-level would be updated automatically. Bug: [347373793](http://b/347373793) ## 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] and the [C++, Objective-C, Java style guides]. - [x] I listed at least one issue that this PR fixes in the description above. - [x] I added new tests to check the change I am making or feature I am adding, or the PR is [test-exempt]. See [testing the engine] for instructions on writing and running engine tests. - [x] I updated/added relevant documentation (doc comments with `///`). - [x] I signed the [CLA]. - [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/flutter/wiki/Tree-hygiene#overview [Tree Hygiene]: https://github.com/flutter/flutter/wiki/Tree-hygiene [test-exempt]: https://github.com/flutter/flutter/wiki/Tree-hygiene#tests [Flutter Style Guide]: https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style [testing the engine]: https://github.com/flutter/flutter/wiki/Testing-the-engine [CLA]: https://cla.developers.google.com/ [flutter/tests]: https://github.com/flutter/tests [breaking change policy]: https://github.com/flutter/flutter/wiki/Tree-hygiene#handling-breaking-changes [Discord]: https://github.com/flutter/flutter/wiki/Chat
1 parent a80d775 commit 97ec469

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

build/config/fuchsia/gn_configs.gni

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ declare_args() {
2121
# TODO(zijiehe): Remove the override and move it into declare_args once the one
2222
# in //build/config/sdk.gni being removed. - b/40935282
2323

24-
# The target API level for this repository. Embedders should override this
25-
# value to specify the API level the packages produced from this repository
26-
# should be targeting, e.g. in their top-level //.gn file. A value of -1
27-
# means that no API level will be passed to the tools that consumes it.
28-
fuchsia_target_api_level = 22
29-
3024
# The SDK manifest file. This is useful to include as a dependency
3125
# for some targets in order to cause a rebuild when the version of the
3226
# SDK is changed.

tools/fuchsia/build_fuchsia_artifacts.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,13 @@ def CopyToBucket(src, dst, product=False):
178178

179179

180180
def ReadTargetAPILevel():
181-
filename = os.path.join(os.path.dirname(__file__), '../../build/config/fuchsia/gn_configs.gni')
181+
filename = os.path.join(os.path.dirname(__file__), 'gn-sdk/src/gn_configs.gni')
182182
with open(filename) as f:
183183
for line in f:
184+
line = line.strip()
184185
if line.startswith('fuchsia_target_api_level'):
185186
return line.split('=')[-1].strip()
186-
assert False, 'No fuchsia_target_api_level found in //flutter/build/config/fuchsia/gn_configs.gni'
187+
assert False, 'No fuchsia_target_api_level found in ' + filename
187188

188189

189190
def CopyVulkanDepsToBucket(src, dst, arch):

tools/fuchsia/build_fuchsia_artifacts_test.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88
class BuildFuchsiaArtifactsTest(unittest.TestCase):
99

1010
def test_read_fuchsia_target_api_level(self):
11-
# It's expected to update this test each time the fuchsia_target_api_level
12-
# in //flutter/build/config/fuchsia/gn_configs.gni is changed, so we don't
13-
# accidentally publish the artifacts with an incorrect api level suffix.
14-
self.assertEqual(build_fuchsia_artifacts.ReadTargetAPILevel(), '22')
11+
self.assertGreater(int(build_fuchsia_artifacts.ReadTargetAPILevel()), 21)
1512

1613

1714
if __name__ == '__main__':

0 commit comments

Comments
 (0)