com.life.gy.LifePlugin.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lifemonitor Show documentation
Show all versions of lifemonitor Show documentation
get log from activity execute oncreate
package com.life.gy
import com.android.build.gradle.AppExtension
import com.android.build.gradle.LibraryExtension
import org.gradle.api.Plugin
import org.gradle.api.Project
public class LifePlugin implements Plugin{
@Override
void apply(Project project) {
System.out.println("***** LifePlugin start *****")
def extension
if(project.getPlugins().hasPlugin("com.android.application")){
extension = project.extensions.getByType(AppExtension)
}else {
extension = project.extensions.getByType(LibraryExtension)
}
LifeTransform transform = new LifeTransform()
extension.registerTransform(transform)
}
}