feat(android_sdk_repository): support string-based platform API level#473
Open
larryxiao625 wants to merge 1 commit intobazelbuild:mainfrom
Open
Conversation
…s (e.g., "36.1") Previously, API levels were handled as integers, which prevented support for minor version formats like "36.1". This change migrates the entire android_sdk_repository rule to treat API levels as strings throughout. Changes: - Rename `int_flag`/`_int_flag_impl` to `string_flag`/`_string_flag_impl` in helper.bzl; update config type and formatting from int to string - Update `_read_api_levels` in rule.bzl to use `is_android_revision` and store levels as strings; update default API level selection to parse and compare major.minor.micro components - Update all name/path/log formatting from `%d` to `%s` for api_level - Pass `default_api_level` as string in template.bzl - Add `test_platforms_with_minor_versions` test to verify "36.1" style API levels are correctly recognized and logged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Previously, API levels were handled as integers, which prevented support for minor version formats like "36.1". This change migrates the entire android_sdk_repository rule to treat API levels as strings throughout. This is intend to fix #472
Changes:
int_flag/_int_flag_impltostring_flag/_string_flag_implin helper.bzl; update config type and formatting from int to string_read_api_levelsin rule.bzl to useis_android_revisionand store levels as strings; update default API level selection to parse and compare major.minor.micro components%dto%sfor api_leveldefault_api_levelas string in template.bzltest_platforms_with_minor_versionstest to verify "36.1" style API levels are correctly recognized and logged