Building the Android Gradle Plugin

来源:互联网 发布:sqlserver 2005 dev 编辑:程序博客网 时间:2024/05/16 10:44
The code of the plugin and its dependencies is located in tools/base. You can open this project with IntelliJ as there is already a tools/base/.idea setup.

tools/base/build-system/integration-test/sample contain a number of sample projects and tests for the plugin.  To run the integration tests. run:
$ ./gradlew :base:integration-test:test

To run just a single test, you can use the --tests argument with the test class you want to run.  e.g.:
$ ./gradlew :base:integration-test:test --tests com.android.build.gradle.integration.application.BasicTest

Or simply:
$ ./gradlew :b:i:test --tests *.BasicTest

To compile the samples manually, publish the plugin and its libraries first with
$ ./gradlew publishLocal
(Tip: you can use camelcase prefixes for target names, so for the above you can just rungradlew pL).
Then set the CUSTOM_REPO environment variable to the repository in the "out" folder inside the directory where you checked out the tools.   For example, if you ran the repo init command above in /my/aosp/work, then the repository will be in /my/aosp/work/out/repo.
(Also, running check, :base:integration-test:test, and connectedIntegrationTest does publishLocal first).



http://tools.android.com/build/gradleplugin
0 0
原创粉丝点击