// Copyright 2015 The Bazel Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.devtools.build.lib.bazel.rules.android; import com.google.devtools.build.lib.analysis.RuleDefinition; import com.google.devtools.build.lib.analysis.RuleDefinitionEnvironment; import com.google.devtools.build.lib.analysis.whitelisting.Whitelist; import com.google.devtools.build.lib.bazel.rules.cpp.BazelCppRuleClasses; import com.google.devtools.build.lib.bazel.rules.java.BazelJavaRuleClasses; import com.google.devtools.build.lib.packages.RuleClass; import com.google.devtools.build.lib.rules.android.AndroidFeatureFlagSetProvider; import com.google.devtools.build.lib.rules.android.AndroidRuleClasses; import com.google.devtools.build.lib.rules.config.ConfigFeatureFlagTransitionFactory; import com.google.devtools.build.lib.rules.cpp.CppRuleClasses; /** * Rule class definition for {@code android_binary}. */ public class BazelAndroidBinaryRule implements RuleDefinition { @Override public RuleClass build(RuleClass.Builder builder, RuleDefinitionEnvironment environment) { return builder /*
name.apk
: An Android application
package file signed with debug keys and
zipaligned, it could be used to develop and debug your application.
You cannot release your application when signed with the debug keys.name_unsigned.apk
: An unsigned version of the
above file that could be signed with the release keys before release to
the public.
name_deploy.jar
: A Java archive containing the
transitive closure of this target.
The deploy jar contains all the classes that would be found by a classloader that searched the runtime classpath of this target from beginning to end.
name_proguard.jar
: A Java archive containing
the result of running ProGuard on the
name_deploy.jar
.
This output is only produced if
proguard_specs attribute is
specified.
name_proguard.map
: A mapping file result of
running ProGuard on the name_deploy.jar
.
This output is only produced if
proguard_specs attribute is
specified and
proguard_generate_mapping
or shrink_resources is set.
Produces Android application package files (.apk).
${IMPLICIT_OUTPUTS}Examples of Android rules can be found in the examples/android
directory of the
Bazel source tree.
*/