aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/package_commands.py
diff options
context:
space:
mode:
authorImanol Fernandez <mortimergoro@gmail.com>2017-09-29 23:19:33 +0200
committerImanol Fernandez <mortimergoro@gmail.com>2017-09-30 14:31:22 +0200
commite93130026a62b5c20187e99fda8db97f2b5a36e1 (patch)
tree77393ffa62848c44ac844afeff1771d3b0bd67e1 /python/servo/package_commands.py
parentffa03380caee4cf1ffd0c43a219936cb9a2e0b85 (diff)
downloadservo-e93130026a62b5c20187e99fda8db97f2b5a36e1.tar.gz
servo-e93130026a62b5c20187e99fda8db97f2b5a36e1.zip
Implement Gradle flavors
Diffstat (limited to 'python/servo/package_commands.py')
-rw-r--r--python/servo/package_commands.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py
index 41aee9d5303..6912962c095 100644
--- a/python/servo/package_commands.py
+++ b/python/servo/package_commands.py
@@ -180,7 +180,10 @@ class PackageCommands(CommandBase):
@CommandArgument('--target', '-t',
default=None,
help='Package for given target platform')
- def package(self, release=False, dev=False, android=None, debug=False, debugger=None, target=None):
+ @CommandArgument('--flavor', '-f',
+ default=None,
+ help='Package using the given Gradle flavor')
+ def package(self, release=False, dev=False, android=None, debug=False, debugger=None, target=None, flavor=None):
env = self.build_env()
if android is None:
android = self.config["build"]["android"]
@@ -206,7 +209,11 @@ class PackageCommands(CommandBase):
else:
build_mode = "Release"
- task_name = "assemble" + build_type + build_mode
+ flavor_name = "Main"
+ if flavor is not None:
+ flavor_name = flavor.title()
+
+ task_name = "assemble" + flavor_name + build_type + build_mode
try:
with cd(path.join("support", "android", "apk")):
subprocess.check_call(["./gradlew", "--no-daemon", task_name], env=env)