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
This commit is contained in:
11
java/base.go
11
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 {
|
||||
|
Reference in New Issue
Block a user