Loading aconfig/java_aconfig_library.go +3 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,9 @@ func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) DepsMutator(module *ja } else { ctx.AddDependency(ctx.Module(), declarationsTag, declarations) } // Add aconfig-annotations-lib as a dependency for the optimization / code stripping annotations module.AddSharedLibrary("aconfig-annotations-lib") } func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) GenerateSourceJarBuildActions(module *java.GeneratedJavaLibraryModule, ctx android.ModuleContext) android.Path { Loading java/generated_java_library.go +21 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,10 @@ type GeneratedJavaLibraryModule struct { Library callbacks GeneratedJavaLibraryCallbacks moduleName string // true if we've already called DepsMutator. Can't call AddLibrary or AddSharedLibrary // after DepsMutator. depsMutatorDone bool } type GeneratedJavaLibraryCallbacks interface { Loading Loading @@ -59,8 +63,25 @@ func GeneratedJavaLibraryModuleFactory(moduleName string, callbacks GeneratedJav return module } // Add a java shared library as a dependency, as if they had said `libs: [ "name" ]` func (module *GeneratedJavaLibraryModule) AddSharedLibrary(name string) { if module.depsMutatorDone { panic("GeneratedJavaLibraryModule.AddLibrary called after DepsMutator") } module.Library.properties.Libs = append(module.Library.properties.Libs, name) } // Add a java shared library as a dependency, as if they had said `libs: [ "name" ]` func (module *GeneratedJavaLibraryModule) AddStaticLibrary(name string) { if module.depsMutatorDone { panic("GeneratedJavaLibraryModule.AddStaticLibrary called after DepsMutator") } module.Library.properties.Static_libs = append(module.Library.properties.Static_libs, name) } func (module *GeneratedJavaLibraryModule) DepsMutator(ctx android.BottomUpMutatorContext) { module.callbacks.DepsMutator(module, ctx) module.depsMutatorDone = true module.Library.DepsMutator(ctx) } Loading java/testing.go +2 −0 Original line number Diff line number Diff line Loading @@ -385,6 +385,8 @@ func gatherRequiredDepsForTest() string { "kotlin-stdlib-jdk8", "kotlin-annotations", "stub-annotations", "aconfig-annotations-lib", } for _, extra := range extraModules { Loading Loading
aconfig/java_aconfig_library.go +3 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,9 @@ func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) DepsMutator(module *ja } else { ctx.AddDependency(ctx.Module(), declarationsTag, declarations) } // Add aconfig-annotations-lib as a dependency for the optimization / code stripping annotations module.AddSharedLibrary("aconfig-annotations-lib") } func (callbacks *JavaAconfigDeclarationsLibraryCallbacks) GenerateSourceJarBuildActions(module *java.GeneratedJavaLibraryModule, ctx android.ModuleContext) android.Path { Loading
java/generated_java_library.go +21 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,10 @@ type GeneratedJavaLibraryModule struct { Library callbacks GeneratedJavaLibraryCallbacks moduleName string // true if we've already called DepsMutator. Can't call AddLibrary or AddSharedLibrary // after DepsMutator. depsMutatorDone bool } type GeneratedJavaLibraryCallbacks interface { Loading Loading @@ -59,8 +63,25 @@ func GeneratedJavaLibraryModuleFactory(moduleName string, callbacks GeneratedJav return module } // Add a java shared library as a dependency, as if they had said `libs: [ "name" ]` func (module *GeneratedJavaLibraryModule) AddSharedLibrary(name string) { if module.depsMutatorDone { panic("GeneratedJavaLibraryModule.AddLibrary called after DepsMutator") } module.Library.properties.Libs = append(module.Library.properties.Libs, name) } // Add a java shared library as a dependency, as if they had said `libs: [ "name" ]` func (module *GeneratedJavaLibraryModule) AddStaticLibrary(name string) { if module.depsMutatorDone { panic("GeneratedJavaLibraryModule.AddStaticLibrary called after DepsMutator") } module.Library.properties.Static_libs = append(module.Library.properties.Static_libs, name) } func (module *GeneratedJavaLibraryModule) DepsMutator(ctx android.BottomUpMutatorContext) { module.callbacks.DepsMutator(module, ctx) module.depsMutatorDone = true module.Library.DepsMutator(ctx) } Loading
java/testing.go +2 −0 Original line number Diff line number Diff line Loading @@ -385,6 +385,8 @@ func gatherRequiredDepsForTest() string { "kotlin-stdlib-jdk8", "kotlin-annotations", "stub-annotations", "aconfig-annotations-lib", } for _, extra := range extraModules { Loading