Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(513)

Unified Diff: build/android/gyp/write_build_config.py

Issue 2633533002: Android: Instrumentation tests in gradle (Closed)
Patch Set: Fix per review. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/gradle/java.jinja ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/write_build_config.py
diff --git a/build/android/gyp/write_build_config.py b/build/android/gyp/write_build_config.py
index 98d1d7dbf0ea9373c1df120e15f109c2b8d0d75f..d636f31d7c195e530ccb669311c94ba361ebfcc4 100755
--- a/build/android/gyp/write_build_config.py
+++ b/build/android/gyp/write_build_config.py
@@ -380,12 +380,6 @@ def main(argv):
# overrides are done correctly.
all_resources_deps.reverse()
- if options.type == 'android_apk' and options.tested_apk_config:
- tested_apk_deps = Deps([options.tested_apk_config])
- tested_apk_resources_deps = tested_apk_deps.All('android_resources')
- all_resources_deps = [
- d for d in all_resources_deps if not d in tested_apk_resources_deps]
-
# Initialize some common config.
# Any value that needs to be queryable by dependents must go within deps_info.
config = {
@@ -401,6 +395,14 @@ def main(argv):
deps_info = config['deps_info']
gradle = config['gradle']
+ if options.type == 'android_apk' and options.tested_apk_config:
+ tested_apk_deps = Deps([options.tested_apk_config])
+ tested_apk_name = tested_apk_deps.Direct()[0]['name']
+ tested_apk_resources_deps = tested_apk_deps.All('android_resources')
+ gradle['apk_under_test'] = tested_apk_name
+ all_resources_deps = [
+ d for d in all_resources_deps if not d in tested_apk_resources_deps]
+
# Required for generating gradle files.
if options.type == 'java_library':
deps_info['is_prebuilt'] = is_java_prebuilt
« no previous file with comments | « build/android/gradle/java.jinja ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698