Create a defaults module for stripping out annotations
This reduces code duplication in preparation for checking in a java_system_modules created using stubs from .txt files Test: No diff in the 4 java_system_modules Change-Id: I0a13a0e7bf402cbe8f0dd3942b1f737cc6ac0de7
This commit is contained in:
@@ -79,16 +79,25 @@ java_library {
|
|||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Defaults module to strip out android annotations
|
||||||
|
java_defaults {
|
||||||
|
name: "system-modules-no-annotations",
|
||||||
|
sdk_version: "none",
|
||||||
|
system_modules: "none",
|
||||||
|
jarjar_rules: "jarjar-strip-annotations-rules.txt",
|
||||||
|
}
|
||||||
|
|
||||||
// Same as core-current-stubs-for-system-modules, but android annotations are
|
// Same as core-current-stubs-for-system-modules, but android annotations are
|
||||||
// stripped.
|
// stripped.
|
||||||
java_library {
|
java_library {
|
||||||
name: "core-current-stubs-for-system-modules-no-annotations",
|
name: "core-current-stubs-for-system-modules-no-annotations",
|
||||||
visibility: ["//development/sdk"],
|
visibility: ["//development/sdk"],
|
||||||
|
defaults: [
|
||||||
|
"system-modules-no-annotations",
|
||||||
|
],
|
||||||
static_libs: [
|
static_libs: [
|
||||||
"core-current-stubs-for-system-modules",
|
"core-current-stubs-for-system-modules",
|
||||||
],
|
],
|
||||||
sdk_version: "none",
|
|
||||||
system_modules: "none",
|
|
||||||
dists: [
|
dists: [
|
||||||
{
|
{
|
||||||
// Legacy dist location for the public file.
|
// Legacy dist location for the public file.
|
||||||
@@ -100,7 +109,6 @@ java_library {
|
|||||||
targets: dist_targets,
|
targets: dist_targets,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
jarjar_rules: "jarjar-strip-annotations-rules.txt",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used when compiling higher-level code against core.current.stubs.
|
// Used when compiling higher-level code against core.current.stubs.
|
||||||
@@ -158,16 +166,16 @@ java_library {
|
|||||||
java_library {
|
java_library {
|
||||||
name: "core-module-lib-stubs-for-system-modules-no-annotations",
|
name: "core-module-lib-stubs-for-system-modules-no-annotations",
|
||||||
visibility: ["//visibility:private"],
|
visibility: ["//visibility:private"],
|
||||||
|
defaults: [
|
||||||
|
"system-modules-no-annotations",
|
||||||
|
],
|
||||||
static_libs: [
|
static_libs: [
|
||||||
"core-module-lib-stubs-for-system-modules",
|
"core-module-lib-stubs-for-system-modules",
|
||||||
],
|
],
|
||||||
sdk_version: "none",
|
|
||||||
system_modules: "none",
|
|
||||||
dist: {
|
dist: {
|
||||||
dest: "system-modules/module-lib/core-for-system-modules-no-annotations.jar",
|
dest: "system-modules/module-lib/core-for-system-modules-no-annotations.jar",
|
||||||
targets: dist_targets,
|
targets: dist_targets,
|
||||||
},
|
},
|
||||||
jarjar_rules: "jarjar-strip-annotations-rules.txt",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used when compiling higher-level code with sdk_version "module_current"
|
// Used when compiling higher-level code with sdk_version "module_current"
|
||||||
@@ -212,16 +220,16 @@ java_library {
|
|||||||
java_library {
|
java_library {
|
||||||
name: "legacy.core.platform.api.no.annotations.stubs",
|
name: "legacy.core.platform.api.no.annotations.stubs",
|
||||||
visibility: core_platform_visibility,
|
visibility: core_platform_visibility,
|
||||||
|
defaults: [
|
||||||
|
"system-modules-no-annotations",
|
||||||
|
],
|
||||||
hostdex: true,
|
hostdex: true,
|
||||||
compile_dex: true,
|
compile_dex: true,
|
||||||
|
|
||||||
sdk_version: "none",
|
|
||||||
system_modules: "none",
|
|
||||||
static_libs: [
|
static_libs: [
|
||||||
"legacy.core.platform.api.stubs",
|
"legacy.core.platform.api.stubs",
|
||||||
],
|
],
|
||||||
patch_module: "java.base",
|
patch_module: "java.base",
|
||||||
jarjar_rules: "jarjar-strip-annotations-rules.txt",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
java_library {
|
java_library {
|
||||||
@@ -247,16 +255,16 @@ java_library {
|
|||||||
java_library {
|
java_library {
|
||||||
name: "stable.core.platform.api.no.annotations.stubs",
|
name: "stable.core.platform.api.no.annotations.stubs",
|
||||||
visibility: core_platform_visibility,
|
visibility: core_platform_visibility,
|
||||||
|
defaults: [
|
||||||
|
"system-modules-no-annotations",
|
||||||
|
],
|
||||||
hostdex: true,
|
hostdex: true,
|
||||||
compile_dex: true,
|
compile_dex: true,
|
||||||
|
|
||||||
sdk_version: "none",
|
|
||||||
system_modules: "none",
|
|
||||||
static_libs: [
|
static_libs: [
|
||||||
"stable.core.platform.api.stubs",
|
"stable.core.platform.api.stubs",
|
||||||
],
|
],
|
||||||
patch_module: "java.base",
|
patch_module: "java.base",
|
||||||
jarjar_rules: "jarjar-strip-annotations-rules.txt",
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used when compiling higher-level code against *.core.platform.api.stubs.
|
// Used when compiling higher-level code against *.core.platform.api.stubs.
|
||||||
|
Reference in New Issue
Block a user