aboutsummaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2016-02-09 17:43:51 -0800
committerDan Willemsen <dwillemsen@google.com>2016-02-09 19:56:22 -0800
commit97750520a4ab0c4a7653a254f56ac5ac4148d37a (patch)
tree7170182d62f8a20fe0a16d84bdc24ee4d18e7d21 /java
parent07cd051a176589fda0ad6a5a2fa6793960c50fbb (diff)
downloadbuild_soong-97750520a4ab0c4a7653a254f56ac5ac4148d37a.tar.gz
build_soong-97750520a4ab0c4a7653a254f56ac5ac4148d37a.tar.bz2
build_soong-97750520a4ab0c4a7653a254f56ac5ac4148d37a.zip
Refactor Android.mk generation
Now, instead of combining multiple binaries into a single BUILD_PREBUILT definition, use separate instances for every module variant. This fixes HOST vs HOST_CROSS prebuilts, and should be saner overall. From make, these should look the same, we're only just using one instance of prebuilt_internal per BUILD_PREBUILT call instead of multiple. With that simplification, we don't have to store as much state, and can directly write into the buffer. Also switch from io.WriteString to fmt.Fprintln, which will require fewer explicit string concatentations, and we don't need to worry about newlines. Allow the module-provided functions to return errors. Change-Id: If30453b21fa21387f635626618d8fabfc78e6859
Diffstat (limited to 'java')
-rw-r--r--java/androidmk.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/java/androidmk.go b/java/androidmk.go
index bc81054f..6d4dddf9 100644
--- a/java/androidmk.go
+++ b/java/androidmk.go
@@ -15,17 +15,21 @@
package java
import (
+ "fmt"
+
"android/soong/common"
)
-func (*JavaLibrary) AndroidMk() (ret common.AndroidMkData) {
+func (*JavaLibrary) AndroidMk() (ret common.AndroidMkData, err error) {
ret.Class = "JAVA_LIBRARIES"
// TODO
+ err = fmt.Errorf("Not yet implemented")
return
}
-func (*JavaPrebuilt) AndroidMk() (ret common.AndroidMkData) {
+func (*JavaPrebuilt) AndroidMk() (ret common.AndroidMkData, err error) {
ret.Class = "JAVA_LIBRARIES"
// TODO
+ err = fmt.Errorf("Not yet implemented")
return
}