Remove EarlyMutators and DynamicDependencies
EarlyMutators are identical to BottomUpMutators, except they run before DynamicDependencies. DynamicDependencies can be replaced with a BottomUpMutator. Replace both EarlyMutators and DynamicDependencies with BottomUpMutators, which allows setting the order between all mutators through registration order. Change-Id: Id1305d798d3d2da592061c89d7c10a71780b71a3
This commit is contained in:
12
java/java.go
12
java/java.go
@@ -145,9 +145,11 @@ type javaBase struct {
|
||||
installFile string
|
||||
}
|
||||
|
||||
type AndroidJavaModuleContext common.AndroidBaseContext
|
||||
|
||||
type JavaModuleType interface {
|
||||
GenerateJavaBuildActions(ctx common.AndroidModuleContext)
|
||||
JavaDynamicDependencies(ctx common.AndroidDynamicDependerModuleContext) []string
|
||||
JavaDependencies(ctx AndroidJavaModuleContext) []string
|
||||
}
|
||||
|
||||
type JavaDependency interface {
|
||||
@@ -191,11 +193,13 @@ func (j *javaBase) BootClasspath(ctx common.AndroidBaseContext) string {
|
||||
|
||||
var defaultJavaLibraries = []string{"core-libart", "core-junit", "ext", "framework"}
|
||||
|
||||
func (j *javaBase) AndroidDynamicDependencies(ctx common.AndroidDynamicDependerModuleContext) []string {
|
||||
return j.module.JavaDynamicDependencies(ctx)
|
||||
func javaDepsMutator(ctx common.AndroidBottomUpMutatorContext) {
|
||||
if j, ok := ctx.Module().(JavaModuleType); ok {
|
||||
ctx.AddDependency(ctx.Module(), j.JavaDependencies(ctx)...)
|
||||
}
|
||||
}
|
||||
|
||||
func (j *javaBase) JavaDynamicDependencies(ctx common.AndroidDynamicDependerModuleContext) []string {
|
||||
func (j *javaBase) JavaDependencies(ctx AndroidJavaModuleContext) []string {
|
||||
var deps []string
|
||||
|
||||
if !j.properties.No_standard_libraries {
|
||||
|
Reference in New Issue
Block a user