Rename java module and property names for consistency
prebuilt_java_library -> java_prebuilt_library prebuilt_sdk -> android_prebuilt_sdk java_resource_dirs -> resource_dirs exclude_java_resource_dirs -> exclude_resource_dirs java_libs -> libs java_static_libs -> static_libs Test: java_test.go Change-Id: Icb0eefa6663844e20ad0a8729fb2c90ec916c3eb
This commit is contained in:
@@ -102,11 +102,11 @@ func init() {
|
||||
"LOCAL_RENDERSCRIPT_INCLUDES": "renderscript.include_dirs",
|
||||
"LOCAL_RENDERSCRIPT_FLAGS": "renderscript.flags",
|
||||
|
||||
"LOCAL_JAVA_RESOURCE_DIRS": "java_resource_dirs",
|
||||
"LOCAL_JAVA_RESOURCE_DIRS": "resource_dirs",
|
||||
"LOCAL_JAVACFLAGS": "javacflags",
|
||||
"LOCAL_DX_FLAGS": "dxflags",
|
||||
"LOCAL_JAVA_LIBRARIES": "java_libs",
|
||||
"LOCAL_STATIC_JAVA_LIBRARIES": "java_static_libs",
|
||||
"LOCAL_JAVA_LIBRARIES": "libs",
|
||||
"LOCAL_STATIC_JAVA_LIBRARIES": "static_libs",
|
||||
"LOCAL_AIDL_INCLUDES": "aidl.include_dirs",
|
||||
"LOCAL_AAPT_FLAGS": "aaptflags",
|
||||
"LOCAL_PACKAGE_SPLITS": "package_splits",
|
||||
|
20
java/java.go
20
java/java.go
@@ -35,8 +35,8 @@ func init() {
|
||||
android.RegisterModuleType("java_library_host", JavaLibraryHostFactory)
|
||||
android.RegisterModuleType("java_binary", JavaBinaryFactory)
|
||||
android.RegisterModuleType("java_binary_host", JavaBinaryHostFactory)
|
||||
android.RegisterModuleType("prebuilt_java_library", JavaPrebuiltFactory)
|
||||
android.RegisterModuleType("prebuilt_sdk", SdkPrebuiltFactory)
|
||||
android.RegisterModuleType("java_prebuilt_library", JavaPrebuiltFactory)
|
||||
android.RegisterModuleType("android_prebuilt_sdk", SdkPrebuiltFactory)
|
||||
android.RegisterModuleType("android_app", AndroidAppFactory)
|
||||
|
||||
android.RegisterSingletonType("logtags", LogtagsSingleton)
|
||||
@@ -65,10 +65,10 @@ type compilerProperties struct {
|
||||
Exclude_srcs []string `android:"arch_variant"`
|
||||
|
||||
// list of directories containing Java resources
|
||||
Java_resource_dirs []string `android:"arch_variant"`
|
||||
Resource_dirs []string `android:"arch_variant"`
|
||||
|
||||
// list of directories that should be excluded from java_resource_dirs
|
||||
Exclude_java_resource_dirs []string `android:"arch_variant"`
|
||||
// list of directories that should be excluded from resource_dirs
|
||||
Exclude_resource_dirs []string `android:"arch_variant"`
|
||||
|
||||
// don't build against the default libraries (legacy-test, core-junit,
|
||||
// ext, and framework for device targets)
|
||||
@@ -78,10 +78,10 @@ type compilerProperties struct {
|
||||
Javacflags []string `android:"arch_variant"`
|
||||
|
||||
// list of of java libraries that will be in the classpath
|
||||
Java_libs []string `android:"arch_variant"`
|
||||
Libs []string `android:"arch_variant"`
|
||||
|
||||
// list of java libraries that will be compiled into the resulting jar
|
||||
Java_static_libs []string `android:"arch_variant"`
|
||||
Static_libs []string `android:"arch_variant"`
|
||||
|
||||
// manifest file to be included in resulting jar
|
||||
Manifest *string
|
||||
@@ -185,8 +185,8 @@ func (j *Module) deps(ctx android.BottomUpMutatorContext) {
|
||||
ctx.AddDependency(ctx.Module(), javaLibTag, config.DefaultLibraries...)
|
||||
}
|
||||
}
|
||||
ctx.AddDependency(ctx.Module(), javaLibTag, j.properties.Java_libs...)
|
||||
ctx.AddDependency(ctx.Module(), javaStaticLibTag, j.properties.Java_static_libs...)
|
||||
ctx.AddDependency(ctx.Module(), javaLibTag, j.properties.Libs...)
|
||||
ctx.AddDependency(ctx.Module(), javaStaticLibTag, j.properties.Static_libs...)
|
||||
}
|
||||
|
||||
func (j *Module) aidlFlags(ctx android.ModuleContext, aidlPreprocess android.OptionalPath,
|
||||
@@ -320,7 +320,7 @@ func (j *Module) compile(ctx android.ModuleContext) {
|
||||
classJarSpecs = append([]jarSpec{classes}, classJarSpecs...)
|
||||
}
|
||||
|
||||
resourceJarSpecs = append(ResourceDirsToJarSpecs(ctx, j.properties.Java_resource_dirs, j.properties.Exclude_java_resource_dirs),
|
||||
resourceJarSpecs = append(ResourceDirsToJarSpecs(ctx, j.properties.Resource_dirs, j.properties.Exclude_resource_dirs),
|
||||
resourceJarSpecs...)
|
||||
|
||||
manifest := android.OptionalPathForModuleSrc(ctx, j.properties.Manifest)
|
||||
|
@@ -55,7 +55,7 @@ func testJava(t *testing.T, bp string) *android.TestContext {
|
||||
ctx := android.NewTestContext()
|
||||
ctx.RegisterModuleType("android_app", android.ModuleFactoryAdaptor(AndroidAppFactory))
|
||||
ctx.RegisterModuleType("java_library", android.ModuleFactoryAdaptor(JavaLibraryFactory))
|
||||
ctx.RegisterModuleType("prebuilt_java_library", android.ModuleFactoryAdaptor(JavaPrebuiltFactory))
|
||||
ctx.RegisterModuleType("java_prebuilt_library", android.ModuleFactoryAdaptor(JavaPrebuiltFactory))
|
||||
ctx.Register()
|
||||
|
||||
extraModules := []string{"core-libart", "frameworks", "sdk_v14"}
|
||||
@@ -91,8 +91,8 @@ func TestSimple(t *testing.T) {
|
||||
java_library {
|
||||
name: "foo",
|
||||
srcs: ["a.java"],
|
||||
java_libs: ["bar"],
|
||||
java_static_libs: ["baz"],
|
||||
libs: ["bar"],
|
||||
static_libs: ["baz"],
|
||||
}
|
||||
|
||||
java_library {
|
||||
@@ -201,16 +201,16 @@ func TestPrebuilts(t *testing.T) {
|
||||
java_library {
|
||||
name: "foo",
|
||||
srcs: ["a.java"],
|
||||
java_libs: ["bar"],
|
||||
java_static_libs: ["baz"],
|
||||
libs: ["bar"],
|
||||
static_libs: ["baz"],
|
||||
}
|
||||
|
||||
prebuilt_java_library {
|
||||
java_prebuilt_library {
|
||||
name: "bar",
|
||||
srcs: ["a.jar"],
|
||||
}
|
||||
|
||||
prebuilt_java_library {
|
||||
java_prebuilt_library {
|
||||
name: "baz",
|
||||
srcs: ["b.jar"],
|
||||
}
|
||||
|
Reference in New Issue
Block a user