AAPT2: Finish support for feature splits
- Prefix the config split name generated from a feature split with the
name of the feature split.
- Add the 'configForSplit' attribute to the <manifest> tag of a config
split and give it the same name as the feature split it was generated
from.
- Look for the featureSplit attribute in <manifest> and automatically
convert it to 'split' and inject 'android:isFeatureSplit="true"'.
Feature splits should be written like so:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.foo.example"
featureSplit="feature_b">
<uses-split android:name="feature_a" />
...
</manifest>
Bug: 34703094
Test: manual
Change-Id: I01b5c4a9aa03a2d25ef1e87bc7874b57c9deede9
diff --git a/tools/aapt2/AppInfo.h b/tools/aapt2/AppInfo.h
index 1e488f7..9db21aa 100644
--- a/tools/aapt2/AppInfo.h
+++ b/tools/aapt2/AppInfo.h
@@ -23,30 +23,22 @@
namespace aapt {
-/**
- * Holds basic information about the app being built. Most of this information
- * will come from the app's AndroidManifest.
- */
+// Information relevant to building an app, parsed from the app's AndroidManifest.xml.
struct AppInfo {
- /**
- * App's package name.
- */
+ // The app's package name.
std::string package;
- /**
- * The App's minimum SDK version.
- */
+ // The app's minimum SDK version, if it is defined.
Maybe<std::string> min_sdk_version;
- /**
- * The Version code of the app.
- */
+ // The app's version code, if it is defined.
Maybe<uint32_t> version_code;
- /**
- * The revision code of the app.
- */
+ // The app's revision code, if it is defined.
Maybe<uint32_t> revision_code;
+
+ // The app's split name, if it is a split.
+ Maybe<std::string> split_name;
};
} // namespace aapt