diff options
author | Jaewoong Jung <jungjw@google.com> | 2020-06-01 10:45:49 -0700 |
---|---|---|
committer | Jaewoong Jung <jungjw@google.com> | 2020-06-02 14:35:04 -0700 |
commit | fccad6b09888792a0b156f9ff1b2558810006244 (patch) | |
tree | 73a558d74a22ead1dffb44e27f22e6a2ced1c69f /xml | |
parent | c344620ed669e8e98979a8ed882d7e1adce59b17 (diff) | |
download | build_soong-fccad6b09888792a0b156f9ff1b2558810006244.tar.gz build_soong-fccad6b09888792a0b156f9ff1b2558810006244.tar.bz2 build_soong-fccad6b09888792a0b156f9ff1b2558810006244.zip |
Soong package structure refactoring
Give prebuilt_etc and sh_binary their own packages and split the
gigantic main Android.bp up to small, per-package ones.
(This is a cherry-pick change.)
Test: m nothing, TreeHugger
Bug: 156980228
Change-Id: I7b00cd344b9f16861f1ff39edf0029f016b853d0
Merged-In: I7b00cd344b9f16861f1ff39edf0029f016b853d0
Diffstat (limited to 'xml')
-rw-r--r-- | xml/Android.bp | 18 | ||||
-rw-r--r-- | xml/xml.go | 5 | ||||
-rw-r--r-- | xml/xml_test.go | 3 |
3 files changed, 23 insertions, 3 deletions
diff --git a/xml/Android.bp b/xml/Android.bp new file mode 100644 index 00000000..cd25cff7 --- /dev/null +++ b/xml/Android.bp @@ -0,0 +1,18 @@ +bootstrap_go_package { + name: "soong-xml", + pkgPath: "android/soong/xml", + deps: [ + "blueprint", + "blueprint-pathtools", + "soong", + "soong-android", + "soong-etc", + ], + srcs: [ + "xml.go", + ], + testSrcs: [ + "xml_test.go", + ], + pluginFor: ["soong_build"], +} @@ -16,6 +16,7 @@ package xml import ( "android/soong/android" + "android/soong/etc" "github.com/google/blueprint" "github.com/google/blueprint/proptools" @@ -62,7 +63,7 @@ type prebuiltEtcXmlProperties struct { } type prebuiltEtcXml struct { - android.PrebuiltEtc + etc.PrebuiltEtc properties prebuiltEtcXmlProperties } @@ -121,7 +122,7 @@ func (p *prebuiltEtcXml) GenerateAndroidBuildActions(ctx android.ModuleContext) func PrebuiltEtcXmlFactory() android.Module { module := &prebuiltEtcXml{} module.AddProperties(&module.properties) - android.InitPrebuiltEtcModule(&module.PrebuiltEtc, "etc") + etc.InitPrebuiltEtcModule(&module.PrebuiltEtc, "etc") // This module is device-only android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibFirst) return module diff --git a/xml/xml_test.go b/xml/xml_test.go index f8ec8235..abcb1085 100644 --- a/xml/xml_test.go +++ b/xml/xml_test.go @@ -20,6 +20,7 @@ import ( "testing" "android/soong/android" + "android/soong/etc" ) var buildDir string @@ -57,7 +58,7 @@ func testXml(t *testing.T, bp string) *android.TestContext { } config := android.TestArchConfig(buildDir, nil, bp, fs) ctx := android.NewTestArchContext() - ctx.RegisterModuleType("prebuilt_etc", android.PrebuiltEtcFactory) + ctx.RegisterModuleType("prebuilt_etc", etc.PrebuiltEtcFactory) ctx.RegisterModuleType("prebuilt_etc_xml", PrebuiltEtcXmlFactory) ctx.Register(config) _, errs := ctx.ParseFileList(".", []string{"Android.bp"}) |