Commit edf06a33 authored by Peter Kotwicz's avatar Peter Kotwicz Committed by Commit Bot

Move androidx dependencies to dedicated folder part 1/3

This CL:
- Adds --android-deps-dir parameter to fetch_all.py This avoids having
  to place the androidx build.gradle in
  //third_party/androidx/third_party/android_deps/build.gradle
- Adds 'internalTargetVisibility' parameter to build.gradle. This will
  be used to enable //third_party/android_deps to depend on
  //third_party/androidx targets
- Removes 'depsPath' parameter in build.gradle and changes fetch_all.py
  to ignore --android-deps-dir parameter in computation of where in build
  directory DEPS is copied ot.
- Adds //third_party/android_deps to the 'ANDROID_DEPS' environment
  variable when running jetification. This fixes jetification for
  internal chrome

BUG=1064277

Change-Id: I2165846c032071315581278036bcee4ccea97262
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2422518
Commit-Queue: Peter Kotwicz <pkotwicz@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#809196}
parent 843771e1
...@@ -234,7 +234,7 @@ dependencies { ...@@ -234,7 +234,7 @@ dependencies {
task setUpRepository(type: BuildConfigGenerator) { task setUpRepository(type: BuildConfigGenerator) {
// Paths are relative to the chromium source root. // Paths are relative to the chromium source root.
repositoryPath 'third_party/android_deps' repositoryPath 'third_party/android_deps'
depsPath 'DEPS'
chromiumSourceRoot '../..' chromiumSourceRoot '../..'
cipdBucket 'chromium' cipdBucket 'chromium'
internalTargetVisibility = [ ':*' ]
} }
...@@ -56,11 +56,6 @@ class BuildConfigGenerator extends DefaultTask { ...@@ -56,11 +56,6 @@ class BuildConfigGenerator extends DefaultTask {
*/ */
String repositoryPath String repositoryPath
/**
* Relative path to the DEPS file where the cipd packages are specified.
*/
String depsPath
/** /**
* Relative path to the Chromium source root from the build.gradle file. * Relative path to the Chromium source root from the build.gradle file.
*/ */
...@@ -88,6 +83,11 @@ class BuildConfigGenerator extends DefaultTask { ...@@ -88,6 +83,11 @@ class BuildConfigGenerator extends DefaultTask {
*/ */
boolean onlyPlayServices boolean onlyPlayServices
/**
* Array with visibility for targets which are not listed in build.gradle
*/
String[] internalTargetVisibility
@TaskAction @TaskAction
void main() { void main() {
skipLicenses = skipLicenses || project.hasProperty("skipLicenses") skipLicenses = skipLicenses || project.hasProperty("skipLicenses")
...@@ -149,17 +149,19 @@ class BuildConfigGenerator extends DefaultTask { ...@@ -149,17 +149,19 @@ class BuildConfigGenerator extends DefaultTask {
downloadExecutor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS); downloadExecutor.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);
// 3. Generate the root level build files // 3. Generate the root level build files
updateBuildTargetDeclaration(graph, "${normalisedRepoPath}/BUILD.gn", onlyPlayServices) updateBuildTargetDeclaration(graph, repositoryPath, normalisedRepoPath, onlyPlayServices,
internalTargetVisibility)
updateDepsDeclaration(graph, cipdBucket, stripFromCipdPath, repositoryPath, updateDepsDeclaration(graph, cipdBucket, stripFromCipdPath, repositoryPath,
"${rootDirPath}/${depsPath}", onlyPlayServices) "${rootDirPath}/DEPS", onlyPlayServices)
dependencyDirectories.sort { path1, path2 -> return path1.compareTo(path2) } dependencyDirectories.sort { path1, path2 -> return path1.compareTo(path2) }
updateReadmeReferenceFile(dependencyDirectories, updateReadmeReferenceFile(dependencyDirectories,
"${normalisedRepoPath}/additional_readme_paths.json") "${normalisedRepoPath}/additional_readme_paths.json")
} }
private static void updateBuildTargetDeclaration(ChromiumDepGraph depGraph, String path, private static void updateBuildTargetDeclaration(ChromiumDepGraph depGraph,
boolean onlyPlayServices) { String repositoryPath, String normalisedRepoPath, boolean onlyPlayServices,
File buildFile = new File(path) String[] internalTargetVisibility) {
File buildFile = new File("${normalisedRepoPath}/BUILD.gn");
def sb = new StringBuilder() def sb = new StringBuilder()
// Comparator to sort the dependency in alphabetical order, with the visible ones coming // Comparator to sort the dependency in alphabetical order, with the visible ones coming
...@@ -229,8 +231,8 @@ class BuildConfigGenerator extends DefaultTask { ...@@ -229,8 +231,8 @@ class BuildConfigGenerator extends DefaultTask {
if (!dependency.visible) { if (!dependency.visible) {
sb.append(" # To remove visibility constraint, add this dependency to\n") sb.append(" # To remove visibility constraint, add this dependency to\n")
sb.append(" # //third_party/android_deps/build.gradle.\n") sb.append(" # //${repositoryPath}/build.gradle.\n")
sb.append(" visibility = [ \":*\" ]\n") sb.append(" visibility = " + makeGnArray(internalTargetVisibility) + "\n")
} }
if (dependency.testOnly) sb.append(" testonly = true\n") if (dependency.testOnly) sb.append(" testonly = true\n")
if (!depsStr.empty) sb.append(" deps = [${depsStr}]\n") if (!depsStr.empty) sb.append(" deps = [${depsStr}]\n")
...@@ -569,6 +571,18 @@ class BuildConfigGenerator extends DefaultTask { ...@@ -569,6 +571,18 @@ class BuildConfigGenerator extends DefaultTask {
return project.file("${chromiumSourceRoot}/${pathRelativeToChromiumRoot}").absolutePath return project.file("${chromiumSourceRoot}/${pathRelativeToChromiumRoot}").absolutePath
} }
private static String makeGnArray(String[] values) {
def sb = new StringBuilder();
sb.append("[");
for (String value : values) {
sb.append("\"");
sb.append(value);
sb.append("\",");
}
sb.replace(sb.length() - 1, sb.length(), "]");
return sb.toString();
}
static String makeOwners() { static String makeOwners() {
// Make it easier to upgrade existing dependencies without full third_party review. // Make it easier to upgrade existing dependencies without full third_party review.
return "file://third_party/android_deps/OWNERS" return "file://third_party/android_deps/OWNERS"
......
...@@ -33,31 +33,33 @@ import zipfile ...@@ -33,31 +33,33 @@ import zipfile
# Assume this script is stored under third_party/android_deps/ # Assume this script is stored under third_party/android_deps/
_CHROMIUM_SRC = os.path.normpath(os.path.join(__file__, '..', '..', '..')) _CHROMIUM_SRC = os.path.normpath(os.path.join(__file__, '..', '..', '..'))
# Location of the android_deps directory from a root checkout. # Directory for files which are used regardless of the android_deps directory.
_ANDROID_DEPS_SUBDIR = os.path.join('third_party', 'android_deps') _GLOBAL_FILES_SUBDIR = os.path.join('third_party', 'android_deps')
# Path to BUILD.gn file under android_deps/ # Path to custom licenses under android_deps/
_ANDROID_DEPS_BUILD_GN = os.path.join(_ANDROID_DEPS_SUBDIR, 'BUILD.gn') _GLOBAL_LICENSE_SUBDIR = os.path.join(_GLOBAL_FILES_SUBDIR, 'licenses')
# Path to build.gradle file under android_deps/ # Location of the buildSrc directory used implement our gradle task.
_ANDROID_DEPS_BUILD_GRADLE = os.path.join(_ANDROID_DEPS_SUBDIR, 'build.gradle') _GLOBAL_GRADLE_BUILDSRC_PATH = os.path.join(_GLOBAL_FILES_SUBDIR, 'buildSrc')
# Path to custom licenses under android_deps/ # Location of the suppressions file for the dependency checker plugin
_ANDROID_DEPS_LICENSE_SUBDIR = os.path.join(_ANDROID_DEPS_SUBDIR, 'licenses') _GLOBAL_GRADLE_SUPRESSIONS_PATH = os.path.join(
_GLOBAL_FILES_SUBDIR, 'vulnerability_supressions.xml')
# Path to additional_readme_paths.json # Default android_deps directory.
_ANDROID_DEPS_ADDITIONAL_README_PATHS = os.path.join( _DEFAULT_ANDROID_DEPS_DIR = os.path.join('third_party', 'android_deps')
_ANDROID_DEPS_SUBDIR, 'additional_readme_paths.json')
# Location of the android_deps libs directory from a root checkout. # Path to additional_readme_paths.json relative to custom 'android_deps' directory.
_ANDROID_DEPS_LIBS_SUBDIR = os.path.join(_ANDROID_DEPS_SUBDIR, 'libs') _ADDITIONAL_README_PATHS = 'additional_readme_paths.json'
# Location of the buildSrc directory used implement our gradle task. # Path to BUILD.gn file from custom 'android_deps' directory.
_GRADLE_BUILDSRC_PATH = os.path.join(_ANDROID_DEPS_SUBDIR, 'buildSrc') _BUILD_GN = 'BUILD.gn'
# Location of the suppressions file for the dependency checker plugin # Path to build.gradle file relative to custom 'android_deps' directory.
_GRADLE_SUPRESSIONS_PATH = os.path.join(_ANDROID_DEPS_SUBDIR, _BUILD_GRADLE = 'build.gradle'
'vulnerability_supressions.xml')
# Location of the android_deps libs directory relative to custom 'android_deps' directory.
_LIBS_DIR = 'libs'
_JAVA_HOME = os.path.join(_CHROMIUM_SRC, 'third_party', 'jdk', 'current') _JAVA_HOME = os.path.join(_CHROMIUM_SRC, 'third_party', 'jdk', 'current')
_JETIFY_PATH = os.path.join(_CHROMIUM_SRC, 'third_party', _JETIFY_PATH = os.path.join(_CHROMIUM_SRC, 'third_party',
...@@ -67,11 +69,11 @@ _JETIFY_CONFIG = os.path.join(_CHROMIUM_SRC, 'third_party', ...@@ -67,11 +69,11 @@ _JETIFY_CONFIG = os.path.join(_CHROMIUM_SRC, 'third_party',
'jetifier_standalone', 'config', 'jetifier_standalone', 'config',
'ignore_R.config') 'ignore_R.config')
# The lis_ of git-controlled files that are checked or updated by this tool. # The list of git-controlled files that are checked or updated by this tool.
_UPDATED_GIT_FILES = [ _UPDATED_ANDROID_DEPS_FILES = [
'DEPS', _BUILD_GN,
_ANDROID_DEPS_BUILD_GN, _BUILD_GRADLE,
_ANDROID_DEPS_ADDITIONAL_README_PATHS, _ADDITIONAL_README_PATHS,
] ]
# If this file exists in an aar file then it is appended to LICENSE # If this file exists in an aar file then it is appended to LICENSE
...@@ -293,7 +295,7 @@ def PrintPackageList(packages, list_name): ...@@ -293,7 +295,7 @@ def PrintPackageList(packages, list_name):
print('\n'.join(' - ' + p for p in packages)) print('\n'.join(' - ' + p for p in packages))
def _GenerateCipdUploadCommands(cipd_pkg_infos): def _GenerateCipdUploadCommands(android_deps_dir, cipd_pkg_infos):
"""Generates a shell command to upload missing packages.""" """Generates a shell command to upload missing packages."""
def cipd_describe(info): def cipd_describe(info):
...@@ -315,7 +317,8 @@ def _GenerateCipdUploadCommands(cipd_pkg_infos): ...@@ -315,7 +317,8 @@ def _GenerateCipdUploadCommands(cipd_pkg_infos):
pkg_path, pkg_name, pkg_tag = info pkg_path, pkg_name, pkg_tag = info
# pkg_path is implicitly relative to _CHROMIUM_SRC, make it # pkg_path is implicitly relative to _CHROMIUM_SRC, make it
# explicit. # explicit.
pkg_path = os.path.join(_CHROMIUM_SRC, pkg_path) pkg_path = os.path.join(_CHROMIUM_SRC, android_deps_dir,
pkg_path)
# Now make pkg_path relative to os.curdir. # Now make pkg_path relative to os.curdir.
pkg_path = os.path.relpath(pkg_path) pkg_path = os.path.relpath(pkg_path)
cmds.append(TEMPLATE.format(pkg_path, pkg_name, pkg_tag)) cmds.append(TEMPLATE.format(pkg_path, pkg_name, pkg_tag))
...@@ -340,10 +343,10 @@ def _CreateAarInfos(aar_files): ...@@ -340,10 +343,10 @@ def _CreateAarInfos(aar_files):
raise Exception('Command Failed: {}\n'.format(' '.join(cmd))) raise Exception('Command Failed: {}\n'.format(' '.join(cmd)))
def _JetifyAll(files, libs_dir): def _JetifyAll(files, android_deps):
env = os.environ.copy() env = os.environ.copy()
env['JAVA_HOME'] = _JAVA_HOME env['JAVA_HOME'] = _JAVA_HOME
env['ANDROID_DEPS'] = libs_dir env['ANDROID_DEPS'] = android_deps
# Don't jetify support lib or androidx. # Don't jetify support lib or androidx.
EXCLUDE = ('android_arch_', 'androidx_', 'com_android_support_', EXCLUDE = ('android_arch_', 'androidx_', 'com_android_support_',
...@@ -380,12 +383,13 @@ def main(): ...@@ -380,12 +383,13 @@ def main():
parser = argparse.ArgumentParser( parser = argparse.ArgumentParser(
description=__doc__, description=__doc__,
formatter_class=argparse.RawDescriptionHelpFormatter) formatter_class=argparse.RawDescriptionHelpFormatter)
parser.add_argument(
'--android-deps-dir',
help='Path to directory containing build.gradle from chromium-dir.',
default=_DEFAULT_ANDROID_DEPS_DIR)
parser.add_argument( parser.add_argument(
'--build-dir', '--build-dir',
help='Path to build directory (default is temporary directory).') help='Path to build directory (default is temporary directory).')
parser.add_argument('--git-dir',
help='Path to git subdir from chromium-dir.',
default='.')
parser.add_argument('--ignore-licenses', parser.add_argument('--ignore-licenses',
help='Ignores licenses for these deps.', help='Ignores licenses for these deps.',
action='store_true') action='store_true')
...@@ -405,49 +409,51 @@ def main(): ...@@ -405,49 +409,51 @@ def main():
format='%(levelname).1s %(relativeCreated)6d %(message)s') format='%(levelname).1s %(relativeCreated)6d %(message)s')
debug = args.verbose_count >= 2 debug = args.verbose_count >= 2
abs_git_dir = os.path.normpath(os.path.join(_CHROMIUM_SRC, args.git_dir)) abs_android_deps_dir = os.path.normpath(
os.path.join(_CHROMIUM_SRC, args.android_deps_dir))
if not os.path.isdir(abs_git_dir): if not os.path.isdir(abs_android_deps_dir):
raise Exception('Not a directory: ' + abs_git_dir) raise Exception('Not a directory: ' + abs_android_deps_dir)
build_gradle_path = os.path.join(args.git_dir, _ANDROID_DEPS_BUILD_GRADLE)
# The list of files and dirs that are copied to the build directory by this # The list of files and dirs that are copied to the build directory by this
# script. Should not include _UPDATED_GIT_FILES. # script. Should not include _UPDATED_ANDROID_DEPS_FILES.
copied_paths = { copied_paths = {
build_gradle_path: os.path.join(args.android_deps_dir, "..", "..", "DEPS"):
build_gradle_path, "DEPS",
_GRADLE_BUILDSRC_PATH: _GLOBAL_GRADLE_BUILDSRC_PATH:
os.path.join(args.git_dir, _ANDROID_DEPS_SUBDIR, "buildSrc"), os.path.join(args.android_deps_dir, "buildSrc"),
_GRADLE_SUPRESSIONS_PATH: _GLOBAL_GRADLE_SUPRESSIONS_PATH:
os.path.join(args.git_dir, _ANDROID_DEPS_SUBDIR, os.path.join(args.android_deps_dir, "vulnerability_supressions.xml"),
"vulnerability_supressions.xml"),
} }
if not args.ignore_licenses: if not args.ignore_licenses:
copied_paths[ copied_paths[_GLOBAL_LICENSE_SUBDIR] = _GLOBAL_LICENSE_SUBDIR
_ANDROID_DEPS_LICENSE_SUBDIR] = _ANDROID_DEPS_LICENSE_SUBDIR
missing_files = [] missing_files = []
for src_path in copied_paths.keys(): for src_path in copied_paths.keys():
if not os.path.exists(os.path.join(_CHROMIUM_SRC, src_path)): if not os.path.exists(os.path.join(_CHROMIUM_SRC, src_path)):
missing_files.append(src_path) missing_files.append(src_path)
for git_file in _UPDATED_GIT_FILES: for android_deps_file in _UPDATED_ANDROID_DEPS_FILES:
if not os.path.exists(os.path.join(abs_git_dir, git_file)): if not os.path.exists(
missing_files.append(git_file) os.path.join(abs_android_deps_dir, android_deps_file)):
missing_files.append(android_deps_file)
if missing_files: if missing_files:
raise Exception('Missing files from {}: {}'.format( raise Exception('Missing files from {}: {}'.format(
_CHROMIUM_SRC, missing_files)) _CHROMIUM_SRC, missing_files))
abs_build_gradle_path = os.path.join(abs_android_deps_dir, _BUILD_GRADLE)
# Path to the gradlew script used to run build.gradle. # Path to the gradlew script used to run build.gradle.
gradle_wrapper_path = os.path.join(_CHROMIUM_SRC, 'third_party', abs_gradle_wrapper_path = os.path.join(_CHROMIUM_SRC, 'third_party',
'gradle_wrapper', 'gradlew') 'gradle_wrapper', 'gradlew')
with BuildDir(args.build_dir) as build_dir: with BuildDir(args.build_dir) as build_dir:
build_android_deps_dir = os.path.join(build_dir, args.android_deps_dir)
logging.info('Using build directory: %s', build_dir) logging.info('Using build directory: %s', build_dir)
for git_file in _UPDATED_GIT_FILES: for android_deps_file in _UPDATED_ANDROID_DEPS_FILES:
CopyFileOrDirectory( CopyFileOrDirectory(
os.path.join(abs_git_dir, git_file), os.path.join(abs_android_deps_dir, android_deps_file),
os.path.join(build_dir, args.git_dir, git_file)) os.path.join(build_android_deps_dir, android_deps_file))
for path, dest in copied_paths.items(): for path, dest in copied_paths.items():
CopyFileOrDirectory(os.path.join(_CHROMIUM_SRC, path), CopyFileOrDirectory(os.path.join(_CHROMIUM_SRC, path),
...@@ -460,17 +466,16 @@ def main(): ...@@ -460,17 +466,16 @@ def main():
# such that we can provide specific diagnostics in case # such that we can provide specific diagnostics in case
# of failure of this build stage. # of failure of this build stage.
gradle_cmd = [ gradle_cmd = [
gradle_wrapper_path, abs_gradle_wrapper_path,
'-b', '-b',
os.path.join(build_dir, build_gradle_path), os.path.join(build_dir, abs_build_gradle_path),
'dependencyCheckAnalyze', 'dependencyCheckAnalyze',
] ]
if debug: if debug:
gradle_cmd.append('--debug') gradle_cmd.append('--debug')
report_src = os.path.join(build_dir, _ANDROID_DEPS_SUBDIR, 'build', report_src = os.path.join(build_android_deps_dir, 'build', 'reports')
'reports') report_dst = os.path.join(abs_android_deps_dir,
report_dst = os.path.join(_CHROMIUM_SRC, _ANDROID_DEPS_SUBDIR,
'vulnerability_reports') 'vulnerability_reports')
if os.path.exists(report_dst): if os.path.exists(report_dst):
shutil.rmtree(report_dst) shutil.rmtree(report_dst)
...@@ -502,9 +507,9 @@ def main(): ...@@ -502,9 +507,9 @@ def main():
# also handle special cases. # also handle special cases.
# Edit BuildConfigGenerator.groovy#addSpecialTreatment for such cases. # Edit BuildConfigGenerator.groovy#addSpecialTreatment for such cases.
gradle_cmd = [ gradle_cmd = [
gradle_wrapper_path, abs_gradle_wrapper_path,
'-b', '-b',
os.path.join(build_dir, build_gradle_path), os.path.join(build_dir, abs_build_gradle_path),
'setupRepository', 'setupRepository',
'--stacktrace', '--stacktrace',
] ]
...@@ -515,20 +520,24 @@ def main(): ...@@ -515,20 +520,24 @@ def main():
subprocess.run(gradle_cmd, check=True) subprocess.run(gradle_cmd, check=True)
libs_dir = os.path.join(build_dir, args.git_dir, build_libs_dir = os.path.join(build_android_deps_dir, _LIBS_DIR)
_ANDROID_DEPS_LIBS_SUBDIR)
logging.info('# Reformat %s.', _ANDROID_DEPS_BUILD_GN) logging.info('# Reformat %s.',
os.path.join(args.android_deps_dir, _BUILD_GN))
gn_args = [ gn_args = [
'gn', 'format', 'gn', 'format',
os.path.join(build_dir, args.git_dir, _ANDROID_DEPS_BUILD_GN) os.path.join(build_android_deps_dir, _BUILD_GN)
] ]
RunCommand(gn_args, print_stdout=debug) RunCommand(gn_args, print_stdout=debug)
logging.info('# Jetify all libraries.') logging.info('# Jetify all libraries.')
aar_files = FindInDirectory(libs_dir, '*.aar') aar_files = FindInDirectory(build_libs_dir, '*.aar')
jar_files = FindInDirectory(libs_dir, '*.jar') jar_files = FindInDirectory(build_libs_dir, '*.jar')
_JetifyAll(aar_files + jar_files, libs_dir) jetify_android_deps = build_libs_dir
if args.android_deps_dir != _DEFAULT_ANDROID_DEPS_DIR:
jetify_android_deps += ':' + os.path.join(
_CHROMIUM_SRC, _DEFAULT_ANDROID_DEPS_DIR, _LIBS_DIR)
_JetifyAll(aar_files + jar_files, jetify_android_deps)
logging.info('# Generate Android .aar info files.') logging.info('# Generate Android .aar info files.')
_CreateAarInfos(aar_files) _CreateAarInfos(aar_files)
...@@ -547,9 +556,8 @@ def main(): ...@@ -547,9 +556,8 @@ def main():
f.write(z.read(_THIRD_PARTY_LICENSE_FILENAME)) f.write(z.read(_THIRD_PARTY_LICENSE_FILENAME))
logging.info('# Compare CIPD packages.') logging.info('# Compare CIPD packages.')
existing_packages = ParseDeps(abs_git_dir, _ANDROID_DEPS_LIBS_SUBDIR) existing_packages = ParseDeps(abs_android_deps_dir, _LIBS_DIR)
build_packages = ParseDeps( build_packages = ParseDeps(build_android_deps_dir, _LIBS_DIR)
build_dir, os.path.join(args.git_dir, _ANDROID_DEPS_LIBS_SUBDIR))
deleted_packages = [] deleted_packages = []
updated_packages = [] updated_packages = []
...@@ -566,26 +574,27 @@ def main(): ...@@ -566,26 +574,27 @@ def main():
# Generate CIPD package upload commands. # Generate CIPD package upload commands.
logging.info('Querying %d CIPD packages', len(build_packages)) logging.info('Querying %d CIPD packages', len(build_packages))
cipd_commands = _GenerateCipdUploadCommands(build_packages[pkg] cipd_commands = _GenerateCipdUploadCommands(
for pkg in build_packages) args.android_deps_dir,
(build_packages[pkg] for pkg in build_packages))
# Copy updated DEPS and BUILD.gn to build directory. # Copy updated DEPS and BUILD.gn to build directory.
update_cmds = [] update_cmds = []
for updated_file in _UPDATED_GIT_FILES: for updated_file in _UPDATED_ANDROID_DEPS_FILES:
CopyFileOrDirectory( CopyFileOrDirectory(
os.path.join(build_dir, args.git_dir, updated_file), os.path.join(build_android_deps_dir, updated_file),
os.path.join(abs_git_dir, updated_file)) os.path.join(abs_android_deps_dir, updated_file))
# Delete obsolete or updated package directories. # Delete obsolete or updated package directories.
for pkg in existing_packages.values(): for pkg in existing_packages.values():
pkg_path = os.path.join(abs_git_dir, pkg.path) pkg_path = os.path.join(abs_android_deps_dir, pkg.path)
DeleteDirectory(pkg_path) DeleteDirectory(pkg_path)
# Copy new and updated packages from build directory. # Copy new and updated packages from build directory.
for pkg in build_packages.values(): for pkg in build_packages.values():
pkg_path = pkg.path pkg_path = pkg.path
dst_pkg_path = os.path.join(_CHROMIUM_SRC, pkg_path) dst_pkg_path = os.path.join(abs_android_deps_dir, pkg_path)
src_pkg_path = os.path.join(build_dir, pkg_path) src_pkg_path = os.path.join(build_android_deps_dir, pkg_path)
CopyFileOrDirectory(src_pkg_path, dst_pkg_path) CopyFileOrDirectory(src_pkg_path, dst_pkg_path)
# Useful for printing timestamp. # Useful for printing timestamp.
......
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