Android studio gradle plugin writing guide

1. Build a plug-in writing project

---Upload the initialization project to gihub---

2. Debug plugin

Two projects are required, one is the android application project and the other is the newly written plugin project

a. Configure the plug-in project

Plug-in project select Edit Configuration

Then select the + sign

Then select Remote

Then modify the custom name in the pop-up box and select OK

Then in the toolbar you should see something like

b. Execute the compilation through the command line in the android application project

./gradlew assembleDebug -Dorg.gradle.daemon=false -Dorg.gradle.debug=true

Then the prompt on the command line will stop at Starting Daemon

c. Start (debug) the plug-in project, pay attention to adding breakpoints in appropriate places

If it is found that the android application project continues to be executed from the Starting Daemon, it means that debugging can be carried out.

 

3. Interact with the android compilation process

https://blog.csdn.net/maosidiaoxian/article/details/42417779

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325352443&siteId=291194637