AAPT2: Update SDK development codename to Q
Test: aapt2_tests Change-Id: I815e0bfc786660d6ad70897287fb5fb21023068c Merged-In: I815e0bfc786660d6ad70897287fb5fb21023068c
This commit is contained in:
committed by
Dan Willemsen
parent
a1759a9bd8
commit
ad5b4ba2a2
@@ -25,8 +25,8 @@ using android::StringPiece;
|
|||||||
|
|
||||||
namespace aapt {
|
namespace aapt {
|
||||||
|
|
||||||
static const char* sDevelopmentSdkCodeName = "P";
|
static const char* sDevelopmentSdkCodeName = "Q";
|
||||||
static ApiVersion sDevelopmentSdkLevel = 28;
|
static ApiVersion sDevelopmentSdkLevel = 10000;
|
||||||
|
|
||||||
static const std::vector<std::pair<uint16_t, ApiVersion>> sAttrIdMap = {
|
static const std::vector<std::pair<uint16_t, ApiVersion>> sAttrIdMap = {
|
||||||
{0x021c, 1},
|
{0x021c, 1},
|
||||||
@@ -54,6 +54,7 @@ static const std::vector<std::pair<uint16_t, ApiVersion>> sAttrIdMap = {
|
|||||||
{0x0530, SDK_NOUGAT_MR1},
|
{0x0530, SDK_NOUGAT_MR1},
|
||||||
{0x0568, SDK_O},
|
{0x0568, SDK_O},
|
||||||
{0x056d, SDK_O_MR1},
|
{0x056d, SDK_O_MR1},
|
||||||
|
{0x0586, SDK_P},
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool less_entry_id(const std::pair<uint16_t, ApiVersion>& p, uint16_t entryId) {
|
static bool less_entry_id(const std::pair<uint16_t, ApiVersion>& p, uint16_t entryId) {
|
||||||
|
|||||||
@@ -705,35 +705,24 @@ TEST_F(ConfigurationParserTest, AndroidSdkGroupAction_InvalidVersion) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ConfigurationParserTest, AndroidSdkGroupAction_NonNumeric) {
|
TEST_F(ConfigurationParserTest, AndroidSdkGroupAction_NonNumeric) {
|
||||||
static constexpr const char* xml = R"xml(
|
auto doc = test::BuildXmlDom(R"xml(
|
||||||
<android-sdk
|
<android-sdk
|
||||||
label="P"
|
label="Q"
|
||||||
minSdkVersion="25"
|
minSdkVersion="25"
|
||||||
targetSdkVersion="%s"
|
targetSdkVersion="Q"
|
||||||
maxSdkVersion="%s">
|
maxSdkVersion="Q">
|
||||||
</android-sdk>)xml";
|
</android-sdk>)xml");
|
||||||
|
|
||||||
const auto& dev_sdk = GetDevelopmentSdkCodeNameAndVersion();
|
|
||||||
const char* codename = dev_sdk.first.data();
|
|
||||||
const ApiVersion& version = dev_sdk.second;
|
|
||||||
|
|
||||||
auto doc = test::BuildXmlDom(StringPrintf(xml, codename, codename));
|
|
||||||
|
|
||||||
PostProcessingConfiguration config;
|
PostProcessingConfiguration config;
|
||||||
bool ok = AndroidSdkTagHandler(&config, NodeCast<Element>(doc.get()->root.get()), &diag_);
|
ASSERT_TRUE(AndroidSdkTagHandler(&config, NodeCast<Element>(doc.get()->root.get()), &diag_));
|
||||||
ASSERT_TRUE(ok);
|
|
||||||
|
|
||||||
ASSERT_EQ(1ul, config.android_sdks.size());
|
ASSERT_EQ(1ul, config.android_sdks.size());
|
||||||
ASSERT_EQ(1u, config.android_sdks.count("P"));
|
ASSERT_EQ(1u, config.android_sdks.count("Q"));
|
||||||
|
|
||||||
auto& out = config.android_sdks["P"];
|
|
||||||
|
|
||||||
AndroidSdk sdk;
|
AndroidSdk sdk;
|
||||||
sdk.min_sdk_version = 25;
|
sdk.min_sdk_version = 25;
|
||||||
sdk.target_sdk_version = version;
|
sdk.target_sdk_version = 10000;
|
||||||
sdk.max_sdk_version = version;
|
sdk.max_sdk_version = 10000;
|
||||||
|
ASSERT_EQ(sdk, config.android_sdks["Q"]);
|
||||||
ASSERT_EQ(sdk, out);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ConfigurationParserTest, GlTextureGroupAction) {
|
TEST_F(ConfigurationParserTest, GlTextureGroupAction) {
|
||||||
|
|||||||
Reference in New Issue
Block a user