Merge changes I7b6c6ce0,If0eaf5d5

* changes:
  Allow java modules to use filegroups
  Rename no_standard_libraries to no_standard_libs
diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go
index 19ed4ec..ee722e0 100644
--- a/androidmk/cmd/androidmk/android.go
+++ b/androidmk/cmd/androidmk/android.go
@@ -123,7 +123,7 @@
 			"LOCAL_NO_CRT":                  "nocrt",
 			"LOCAL_ALLOW_UNDEFINED_SYMBOLS": "allow_undefined_symbols",
 			"LOCAL_RTTI_FLAG":               "rtti",
-			"LOCAL_NO_STANDARD_LIBRARIES":   "no_standard_libraries",
+			"LOCAL_NO_STANDARD_LIBRARIES":   "no_standard_libs",
 			"LOCAL_PACK_MODULE_RELOCATIONS": "pack_relocations",
 			"LOCAL_TIDY":                    "tidy",
 			"LOCAL_PROPRIETARY_MODULE":      "proprietary",
diff --git a/java/app.go b/java/app.go
index a0c4912..e6b91a7 100644
--- a/java/app.go
+++ b/java/app.go
@@ -21,6 +21,7 @@
 	"strings"
 
 	"github.com/google/blueprint"
+	"github.com/google/blueprint/proptools"
 
 	"android/soong/android"
 )
@@ -68,7 +69,7 @@
 func (a *AndroidApp) DepsMutator(ctx android.BottomUpMutatorContext) {
 	a.Module.deps(ctx)
 
-	if !a.properties.No_standard_libraries {
+	if !proptools.Bool(a.properties.No_standard_libs) {
 		switch a.deviceProperties.Sdk_version { // TODO: Res_sdk_version?
 		case "current", "system_current", "":
 			ctx.AddDependency(ctx.Module(), frameworkResTag, "framework-res")
diff --git a/java/java.go b/java/java.go
index d18656c..a8093e7 100644
--- a/java/java.go
+++ b/java/java.go
@@ -24,6 +24,7 @@
 	"strings"
 
 	"github.com/google/blueprint"
+	"github.com/google/blueprint/proptools"
 
 	"android/soong/android"
 	"android/soong/genrule"
@@ -76,7 +77,7 @@
 
 	// don't build against the default libraries (legacy-test, core-junit,
 	// ext, and framework for device targets)
-	No_standard_libraries bool
+	No_standard_libs *bool
 
 	// list of module-specific flags that will be used for javac compiles
 	Javacflags []string `android:"arch_variant"`
@@ -174,7 +175,7 @@
 )
 
 func (j *Module) deps(ctx android.BottomUpMutatorContext) {
-	if !j.properties.No_standard_libraries {
+	if !proptools.Bool(j.properties.No_standard_libs) {
 		if ctx.Device() {
 			switch j.deviceProperties.Sdk_version {
 			case "":
@@ -199,6 +200,8 @@
 	}
 	ctx.AddDependency(ctx.Module(), libTag, j.properties.Libs...)
 	ctx.AddDependency(ctx.Module(), staticLibTag, j.properties.Static_libs...)
+
+	android.ExtractSourcesDeps(ctx, j.properties.Srcs)
 }
 
 func (j *Module) aidlFlags(ctx android.ModuleContext, aidlPreprocess android.OptionalPath,
diff --git a/java/java_test.go b/java/java_test.go
index d73ae0b..6d9445b 100644
--- a/java/java_test.go
+++ b/java/java_test.go
@@ -69,7 +69,7 @@
 		bp += fmt.Sprintf(`
 			java_library {
 				name: "%s",
-				no_standard_libraries: true,
+				no_standard_libs: true,
 			}
 		`, extra)
 	}