From b645ec8e34e2e94d7f5b93aae63edac42271bf2c Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Wed, 27 Nov 2019 17:43:54 +0000 Subject: Add model to represent generated snapshot .bp file Having each module type generate the contents of the snapshot's .bp file results in lots of duplicated code. This adds an intermediate model for use by the module types and then generates the .bp file contents from that. This not only removes the duplicated formatting code but it also allows consistent handling of shared properties such as name further reducing duplication. It also makes it possible to duplicate the versioned and unversioned prebuilt modules from the same model. Extracts generatedContents from generatedFile to allow the contents to be populated without creating an output file, for testing. Cleans up unused code. Bug: 143678475 Test: m nothing Change-Id: If21b84db0ef3fdfb5dc11ea0973ce6cb73603ea3 --- sdk/sdk_test.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'sdk/sdk_test.go') diff --git a/sdk/sdk_test.go b/sdk/sdk_test.go index 1bbd28618..8def1d850 100644 --- a/sdk/sdk_test.go +++ b/sdk/sdk_test.go @@ -544,15 +544,9 @@ cc_prebuilt_library_shared { sdk_snapshot { name: "mysdk@current", - java_libs: [ - "mysdk_myjavalib@current", - ], - stubs_sources: [ - "mysdk_myjavaapistubs@current", - ], - native_shared_libs: [ - "mysdk_mynativelib@current", - ], + java_libs: ["mysdk_myjavalib@current"], + stubs_sources: ["mysdk_myjavaapistubs@current"], + native_shared_libs: ["mysdk_mynativelib@current"], } `) -- cgit v1.2.3-59-g8ed1b