android maven 项目,android maven构建项目

Goal

Description

Creates the apk file. By default signs it with debug keystore.

Change that by setting configuration parameter false.

Creates the apklib file.

apklib files do not generate deployable artifacts.

No description.

Deploys the built apk file, or another specified apk, to a connected device.

Automatically performed when running mvn integration-test (or mvn install) on a project with instrumentation tests.

Deploys all directly declared dependencies of apk in this project's pom.

Usually used in a project with instrumentation tests, to deploy the apk to test onto the device before running the deploying and running the instrumentation tests apk.

Automatically performed when running mvn integration-test (or mvn install) on a project with instrumentation tests.

DevicesMojo lists all attached devices and emulators found with the android debug bridge. It uses the same naming convention for the emulator as used in other places in the Android Maven Plugin and adds the status of the device in the list. TODO The goal is very simple and could be enhanced for better display, a verbose option to display and to take the android.device paramter into account.

Converts compiled Java classes to the Android dex format.

After compiled Java classes use emma tool

EmulatorStartMojo can start the Android Emulator with a specified Android Virtual Device (avd).

EmulatorStartMojo can stop the Android Emulator with a specified Android Virtual Device (avd).

EmulatorStopeAllMojo will stop all attached devices.

Generates R.java based on resources specified by the resources configuration parameter. Generates java files based on aidl files.

Display help information on android-maven-plugin.

Call mvn android:help -Ddetail=true -Dgoal= to display parameter details.

Runs the instrumentation apk on device.

Internal. Do not use.

Called automatically when the lifecycle reaches phase integration-test. Figures out whether to call goals in this phase; and if so, calls android:instrument.

Internal. Do not use.

Called automatically when the lifecycle reaches phase pre-integration-test. Figures out whether to call goals in this phase; and if so, calls android:deploy-dependencies andandroid:deploy.

LintMojo can run the lint command against the project. Implements parsing parameters from pom or command line arguments and sets useful defaults as well. Warning, if you use android.lint.enableClasspath and/or android.lint.enableLibraries the behavior of this goal will vary depending on the phase where this goal is executed. See android.lint.classpath/lintClassPath and android.lint.libraries/lintLibraries for more details.

Updates various version attributes present in the AndroidManifest.xml file.

Can execute tests using UI/Application Exerciser Monkey.

Implements parsing parameters from pom or command line arguments and sets useful defaults as well. This goal will invoke Android Monkey exerciser. If the application crashes during the exercise, this goal can fail the build.

A typical usage of this goal can be found at Quality tools for Android project.

Processes both application and dependency classes using the ProGuard byte code obfuscator, minimzer, and optimizer. For more information, see https://proguard.sourceforge.net.

Copy file or directory from all the attached (or specified) devices/emulators.

Copy file to all the attached (or specified) devices/emulators.

Redeploys the built apk file, or another specified apk, to a connected device. This simply tries to undeploy the APK and re-deploy it.

Runs the first Activity shown in the top-level launcher as determined by its Intent filters.

Android provides a component-based architecture, which means that there is no "main" function which serves as an entry point to the APK. There's an homogeneous collection of Activity(es), Service(s), Receiver(s), etc.

The Android top-level launcher (whose purpose is to allow users to launch other applications) uses the Intent resolution mechanism to determine which Activity(es) to show to the end user. Such activities are identified by at least:

Action type: android.intent.action.MAIN

Category: android.intent.category.LAUNCHER

And are declared in AndroidManifest.xml as such:

This Mojo will try to to launch the first activity of this kind found in AndroidManifest.xml. In case multiple activities satisfy the requirements listed above only the first declared one is run. In case there are no "Launcher activities" declared in the manifest or no activities declared at all, this goal aborts throwing an error.

The device parameter is taken into consideration so potentially the Activity found is started on all attached devices. The application will NOT be deployed and running will silently fail if the application is not deployed.

Can execute tests using ui uiautomator.

Implements parsing parameters from pom or command line arguments and sets useful defaults as well. This goal is meant to execute a special java project dedicated to UI testing via UIAutomator. It will build the jar of the project, dex it and send it to dalvik cache of a rooted device or to an emulator. If you use a rooted device, refer to this thread on stack over flow.

The tests are executed via ui automator. A surefire compatible test report can be generated and its location will be logged during build.

To use this goal, you will need to place the uiautomator.jar file (part of the Android SDK >= 16) on a nexus repository.

A typical usage of this goal can be found at Quality tools for Android project.

Undeploys the built apk file, or another specified apk, from a connected device.

Unpack libraries code and dependencies into target. This can be useful for using the proguard maven plugin to provide the input jars. Although it is encouraged to use the proguard mojo of the android maven plugin.

ZipalignMojo can run the zipalign command against the apk. Implements parsing parameters from pom or command line arguments and sets useful defaults as well.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值