Install intermediate file in testcases
ctx.InstallFile adds the source file to checkBuildFiles. This causes
issues if the module is an unexported namespace, since the installation
files will not be created.
Additional context: https://android-review.git.corp.google.com/c/platform/build/soong/+/3474792/comment/40af1b92_5e65d152/
Test: m nothing --soong-only
Test: go test ./java
Change-Id: I83ac66c6a81c8163a24acd4e9ef8aab0982e5e4c
diff --git a/java/java.go b/java/java.go
index 67b9ba9..e93f670 100644
--- a/java/java.go
+++ b/java/java.go
@@ -1883,8 +1883,8 @@
dataPath := android.DataPath{SrcPath: data}
ctx.InstallTestData(pathInTestCases, []android.DataPath{dataPath})
}
- if j.installFile != nil {
- ctx.InstallFile(pathInTestCases, ctx.ModuleName()+".jar", j.installFile)
+ if j.outputFile != nil {
+ ctx.InstallFile(pathInTestCases, ctx.ModuleName()+".jar", j.outputFile)
}
}
}