diff options
Diffstat (limited to 'aconfig/java_aconfig_library.go')
-rw-r--r-- | aconfig/java_aconfig_library.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/aconfig/java_aconfig_library.go b/aconfig/java_aconfig_library.go index 0eeb14ffc..f98498ed4 100644 --- a/aconfig/java_aconfig_library.go +++ b/aconfig/java_aconfig_library.go @@ -51,7 +51,7 @@ func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) DepsMutator(module *ja } } -func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) GenerateSourceJarBuildActions(ctx android.ModuleContext) android.Path { +func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) GenerateSourceJarBuildActions(module *java.GeneratedJavaLibraryModule, ctx android.ModuleContext) android.Path { // Get the values that came from the global RELEASE_ACONFIG_VALUE_SETS flag declarationsModules := ctx.GetDirectDepsWithTag(declarationsTag) if len(declarationsModules) != 1 { @@ -59,6 +59,7 @@ func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) GenerateSourceJarBuild } declarations := ctx.OtherModuleProvider(declarationsModules[0], declarationsProviderKey).(declarationsProviderData) + // Generate the action to build the srcjar srcJarPath := android.PathForModuleGen(ctx, ctx.ModuleName()+".srcjar") ctx.Build(pctx, android.BuildParams{ Rule: srcJarRule, @@ -67,5 +68,9 @@ func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) GenerateSourceJarBuild Description: "aconfig.srcjar", }) + // Tell the java module about the .aconfig files, so they can be propagated up the dependency chain. + // TODO: It would be nice to have that propagation code here instead of on java.Module and java.JavaInfo. + module.AddAconfigIntermediate(declarations.IntermediatePath) + return srcJarPath } |