aboutsummaryrefslogtreecommitdiff
path: root/java/code_metadata_test.go
Commit message (Collapse)AuthorAgeFilesLines
* Write raw files to disk instead of the ninja fileColin Cross2023-12-191-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Writing raw files as rules in the ninja file unnecessarily bloats the ninja file. Write files immediately to disk instead to files based on the hash of the contents, and then emit ninja rules to copy the files into place during the build. Delete obsolete files in a singleton at the end of analysis. Bug: 306029038 Test: Run: m libc_musl_version.h touch build/soong/Android.bp m libc_musl_version.h libc_musl_version.h/genrule.sbox.textproto is not recopied. Test: Run: lunch aosp_cf_x86_64_phone-userdebug m libc_musl_version.h lunch aosp_x86_64-userdebug m libc_musl_version.h lunch aosp_cf_x86_64_phone-userdebug m libc_musl_version.h libc_musl_version.h/genrule.sbox.textproto is recopied but restat prevents rerunning the genrule. Test: Run: touch out/soong/raw-aosp_cf_x86_64_phone/00/foo touch build/soong/Android.bp m nothing out/soong/raw-aosp_cf_x86_64_phone/00/foo is removed. Change-Id: I172869c4d49565504794c051e2e8c1f7cf46486e
* Convert ModuleProvder to generic providers APIColin Cross2023-12-141-3/+1
| | | | | | | | | Convert all of the callers of ModuleProvider/ModuleHasProvider to use the type-safe android.SingletonModuleProvider API. Bug: 316410648 Test: builds Change-Id: I6f11638546b64749e451cebbf33140248dc1d193
* Convert NewProvider/NewMutatorProvider to generic providers APIColin Cross2023-12-141-1/+1
| | | | | | | | | Convert all of the callers to NewProvider and NewMutatorProvider to use a generic type parameter instead of an example object. Bug: 316410648 Test: builds Change-Id: Ic9cdafc87336e26730d3fd596df05de0e7267542
* Add Code Metadata rule to soong/testing.Aditya Choudhary2023-12-051-0/+125
This Cl adds a new rule to Soong to generate code ownership metadata. Also, this CL adds a provider in the Java SDK library to provide generated source files to the Code_metadata rule. Will add providers to other libraries in the future changes. Bug: 296873595 Change-Id: Ic2e43aa9b161231fea4416d1f0d36b778361d7c5