diff options
author | 2023-06-01 14:42:59 -0700 | |
---|---|---|
committer | 2023-06-09 06:16:06 -0700 | |
commit | 175073c472baadcf6ccd7bf94f013a28edf0713a (patch) | |
tree | 445ad40f4b620cdb0ab83ef38aff29b1d0b3f0eb /java/base.go | |
parent | f1d37b351147ba74be40f5f313e61e9956e44d7f (diff) |
Make aconfig flags generate a library instead of a srcjar.
Also add unit tests for the rest of device_config
Bug: 283475679
Test: m nothing (soong unit tests)
Change-Id: Iee18a1f2f2cbb23e8c8d84c54e903b32be29a693
Diffstat (limited to 'java/base.go')
-rw-r--r-- | java/base.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/java/base.go b/java/base.go index ed61e12ed..afb626a49 100644 --- a/java/base.go +++ b/java/base.go @@ -187,6 +187,9 @@ type CommonProperties struct { // A list of java_library instances that provide additional hiddenapi annotations for the library. Hiddenapi_additional_annotations []string + + // Additional srcJars tacked in by GeneratedJavaLibraryModule + Generated_srcjars []android.Path `android:"mutated"` } // Properties that are specific to device modules. Host module factories should not add these when @@ -1041,6 +1044,10 @@ func (j *Module) AddJSONData(d *map[string]interface{}) { } +func (module *Module) addGeneratedSrcJars(path android.Path) { + module.properties.Generated_srcjars = append(module.properties.Generated_srcjars, path) +} + func (j *Module) compile(ctx android.ModuleContext, aaptSrcJar android.Path) { j.exportAidlIncludeDirs = android.PathsForModuleSrc(ctx, j.deviceProperties.Aidl.Export_include_dirs) @@ -1082,6 +1089,10 @@ func (j *Module) compile(ctx android.ModuleContext, aaptSrcJar android.Path) { if aaptSrcJar != nil { srcJars = append(srcJars, aaptSrcJar) } + srcJars = append(srcJars, j.properties.Generated_srcjars...) + if len(j.properties.Generated_srcjars) > 0 { + fmt.Printf("Java module %s Generated_srcjars: %v\n", ctx.ModuleName(), j.properties.Generated_srcjars) + } srcFiles = srcFiles.FilterOutByExt(".srcjar") if j.properties.Jarjar_rules != nil { |