Loading cc/library_stub.go +2 −1 Original line number Diff line number Diff line Loading @@ -148,8 +148,9 @@ func (d *apiLibraryDecorator) link(ctx ModuleContext, flags Flags, deps PathDeps var in android.Path // src might not exist during the beginning of soong analysis in Multi-tree if src := String(d.properties.Src); src != "" { in = android.PathForModuleSrc(ctx, src) in = android.MaybeExistentPathForSource(ctx, ctx.ModuleDir(), src) } // LLNDK variant Loading java/java.go +13 −0 Original line number Diff line number Diff line Loading @@ -1567,8 +1567,14 @@ type JavaApiLibraryProperties struct { Api_surface *string // list of Java API contribution modules that consists this API surface // This is a list of Soong modules Api_contributions []string // list of api.txt files relative to this directory that contribute to the // API surface. // This is a list of relative paths Api_files []string // List of flags to be passed to the javac compiler to generate jar file Javacflags []string } Loading Loading @@ -1665,6 +1671,13 @@ func (al *ApiLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) { srcFiles = append(srcFiles, android.PathForSource(ctx, provider.ApiFile.String())) }) // Add the api_files inputs for _, api := range al.properties.Api_files { // Use MaybeExistentPathForSource since the api file might not exist during analysis. // This will be provided by the orchestrator in the combined execution. srcFiles = append(srcFiles, android.MaybeExistentPathForSource(ctx, ctx.ModuleDir(), api)) } cmd := metalavaStubCmd(ctx, rule, srcFiles, homeDir) al.stubsFlags(ctx, cmd, stubsDir) Loading java/java_test.go +2 −1 Original line number Diff line number Diff line Loading @@ -1863,6 +1863,7 @@ func TestJavaApiLibraryAndProviderLink(t *testing.T) { name: "bar2", api_surface: "system", api_contributions: ["foo1", "foo2"], api_files: ["api1/current.txt", "api2/current.txt"] } `, map[string][]byte{ Loading @@ -1880,7 +1881,7 @@ func TestJavaApiLibraryAndProviderLink(t *testing.T) { }, { moduleName: "bar2", sourceTextFileDirs: []string{"a/foo1.txt", "b/foo2.txt"}, sourceTextFileDirs: []string{"a/foo1.txt", "b/foo2.txt", "api1/current.txt", "api2/current.txt"}, }, } for _, c := range testcases { Loading Loading
cc/library_stub.go +2 −1 Original line number Diff line number Diff line Loading @@ -148,8 +148,9 @@ func (d *apiLibraryDecorator) link(ctx ModuleContext, flags Flags, deps PathDeps var in android.Path // src might not exist during the beginning of soong analysis in Multi-tree if src := String(d.properties.Src); src != "" { in = android.PathForModuleSrc(ctx, src) in = android.MaybeExistentPathForSource(ctx, ctx.ModuleDir(), src) } // LLNDK variant Loading
java/java.go +13 −0 Original line number Diff line number Diff line Loading @@ -1567,8 +1567,14 @@ type JavaApiLibraryProperties struct { Api_surface *string // list of Java API contribution modules that consists this API surface // This is a list of Soong modules Api_contributions []string // list of api.txt files relative to this directory that contribute to the // API surface. // This is a list of relative paths Api_files []string // List of flags to be passed to the javac compiler to generate jar file Javacflags []string } Loading Loading @@ -1665,6 +1671,13 @@ func (al *ApiLibrary) GenerateAndroidBuildActions(ctx android.ModuleContext) { srcFiles = append(srcFiles, android.PathForSource(ctx, provider.ApiFile.String())) }) // Add the api_files inputs for _, api := range al.properties.Api_files { // Use MaybeExistentPathForSource since the api file might not exist during analysis. // This will be provided by the orchestrator in the combined execution. srcFiles = append(srcFiles, android.MaybeExistentPathForSource(ctx, ctx.ModuleDir(), api)) } cmd := metalavaStubCmd(ctx, rule, srcFiles, homeDir) al.stubsFlags(ctx, cmd, stubsDir) Loading
java/java_test.go +2 −1 Original line number Diff line number Diff line Loading @@ -1863,6 +1863,7 @@ func TestJavaApiLibraryAndProviderLink(t *testing.T) { name: "bar2", api_surface: "system", api_contributions: ["foo1", "foo2"], api_files: ["api1/current.txt", "api2/current.txt"] } `, map[string][]byte{ Loading @@ -1880,7 +1881,7 @@ func TestJavaApiLibraryAndProviderLink(t *testing.T) { }, { moduleName: "bar2", sourceTextFileDirs: []string{"a/foo1.txt", "b/foo2.txt"}, sourceTextFileDirs: []string{"a/foo1.txt", "b/foo2.txt", "api1/current.txt", "api2/current.txt"}, }, } for _, c := range testcases { Loading