Can I capture build start event in Android Studio?
Answered
I'm working on an Android Studio plugin, and one goal is to have the plugin generate some configuration file right before each compile, so these files can be used to guide the compilation. I have searched this forum and learned about the AndroidProjectBuildNotifications API, but it seems to be only able to capture build complete events. Can anyone share some pointers to how to achieve my goal?
Please sign in to leave a comment.
You can use com.intellij.openapi.compiler.CompilerManager#addBeforeTask. See com.android.tools.idea.gradle.project.AndroidGradleProjectComponent CTOR to copy handling of "is Android Gradle project"