Commit 04725764 authored by Natalie Chouinard's avatar Natalie Chouinard Committed by Commit Bot

[Android] Replace java_files with sources in rules

All BUILD.gn files have been migrated from using java_files to sources,
so replace use of java_files with sources in Android build rules.

Bug: 1035082
Change-Id: I73fa5ecc53ca0b0acd3146562c2eb10ded533ade
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1988516Reviewed-by: default avatarEric Stevenson <estevenson@chromium.org>
Commit-Queue: Natalie Chouinard <chouinard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#728780}
parent 272c0702
......@@ -3045,12 +3045,7 @@ if (enable_java_templates) {
}
_java_files = []
if (defined(invoker.java_files)) {
_java_files = invoker.java_files
} else if (defined(invoker.sources)) {
# TODO(crbug.com/917196): Migrate all usages of "java_files" to "sources".
# To support transition, use "sources" variable as valid substitute for
# "java_files" for now.
if (defined(invoker.sources)) {
_java_files = invoker.sources
}
_srcjar_deps = []
......
......@@ -1272,7 +1272,7 @@ if (enable_java_templates) {
#
# Example
# java_binary("foo") {
# java_files = [ "org/chromium/foo/FooMain.java" ]
# sources = [ "org/chromium/foo/FooMain.java" ]
# deps = [ ":bar_java" ]
# main_class = "org.chromium.foo.FooMain"
# }
......@@ -1296,14 +1296,14 @@ if (enable_java_templates) {
# Declare a Java Annotation Processor.
#
# Supports all variables of java_library(), plus:
# jar_path: Path to a prebuilt jar. Mutually exclusive with java_files &
# jar_path: Path to a prebuilt jar. Mutually exclusive with sources &
# srcjar_deps.
# main_class: The fully-quallified class name of the processor's entry
# point.
#
# Example
# java_annotation_processor("foo_processor") {
# java_files = [ "org/chromium/foo/FooProcessor.java" ]
# sources = [ "org/chromium/foo/FooProcessor.java" ]
# deps = [ ":bar_java" ]
# main_class = "org.chromium.foo.FooProcessor"
# }
......@@ -1333,7 +1333,7 @@ if (enable_java_templates) {
#
# Example
# junit_binary("foo") {
# java_files = [ "org/chromium/foo/FooTest.java" ]
# sources = [ "org/chromium/foo/FooTest.java" ]
# deps = [ ":bar_java" ]
# }
template("junit_binary") {
......@@ -1446,11 +1446,11 @@ if (enable_java_templates) {
# annotation_processor_deps: List of java_annotation_processor targets to
# use when compiling.
#
# jar_path: Path to a prebuilt jar. Mutually exclusive with java_files &
# jar_path: Path to a prebuilt jar. Mutually exclusive with sources &
# srcjar_deps.
# java_files: List of .java files included in this library.
# sources: List of .java files included in this library.
# srcjar_deps: List of srcjar dependencies. The .java files in the srcjars
# will be added to java_files and be included in this library.
# will be added to sources and be included in this library.
#
# input_jars_paths: A list of paths to the jars that should be included
# in the compile-time classpath. These are in addition to library .jars
......@@ -1488,7 +1488,7 @@ if (enable_java_templates) {
#
# Example
# java_library("foo_java") {
# java_files = [
# sources = [
# "org/chromium/foo/Foo.java",
# "org/chromium/foo/FooInterface.java",
# "org/chromium/foo/FooService.java",
......@@ -1851,7 +1851,7 @@ if (enable_java_templates) {
#
# Example
# android_library("foo_java") {
# java_files = [
# sources = [
# "android/org/chromium/foo/Foo.java",
# "android/org/chromium/foo/FooInterface.java",
# "android/org/chromium/foo/FooService.java",
......@@ -2140,9 +2140,9 @@ if (enable_java_templates) {
# step.
# disable_r8_outlining: Turn off outlining during the proguard step.
# annotation_processor_deps: List of java_annotation_processor targets to
# use when compiling the java_files given to this target (optional).
# use when compiling the sources given to this target (optional).
# processor_args_javac: List of args to pass to annotation processors when
# compiling java_files given to this target (optional).
# compiling sources given to this target (optional).
template("android_apk_or_module") {
forward_variables_from(invoker, [ "testonly" ])
assert(defined(invoker.android_manifest))
......@@ -2810,7 +2810,6 @@ if (enable_java_templates) {
"base_module_target",
"chromium_code",
"jacoco_never_instrument",
"java_files",
"javac_args",
"manifest_package",
"native_lib_placeholders",
......@@ -3448,7 +3447,7 @@ if (enable_java_templates) {
# Example
# android_apk("foo_apk") {
# android_manifest = "AndroidManifest.xml"
# java_files = [
# sources = [
# "android/org/chromium/foo/FooApplication.java",
# "android/org/chromium/foo/FooActivity.java",
# ]
......@@ -3494,7 +3493,6 @@ if (enable_java_templates) {
"input_jars_paths",
"use_modern_linker",
"jacoco_never_instrument",
"java_files",
"javac_args",
"jni_registration_header",
"jni_sources_blacklist",
......@@ -3626,7 +3624,6 @@ if (enable_java_templates) {
"input_jars_paths",
"is_base_module",
"jacoco_never_instrument",
"java_files",
"javac_args",
"jni_registration_header",
"jni_sources_blacklist",
......@@ -3764,7 +3761,7 @@ if (enable_java_templates) {
# android_manifest = "AndroidManifest.xml"
# apk_name = "FooTest"
# apk_under_test = "Foo"
# java_files = [
# sources = [
# "android/org/chromium/foo/FooTestCase.java",
# "android/org/chromium/foo/FooExampleTest.java",
# ]
......@@ -4121,7 +4118,7 @@ if (enable_java_templates) {
android_library(target_name) {
chromium_code = false
java_files = []
sources = []
srcjar_deps = [ ":${_template_name}__protoc_java" ]
deps = [
_proto_runtime,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment