Package com.ss.android.ugc.bytex.common
Class CommonPlugin<E extends BaseExtension,X extends BaseContext>
- java.lang.Object
-
- com.ss.android.ugc.bytex.common.AbsPlugin<E>
-
- com.ss.android.ugc.bytex.common.flow.main.AbsMainProcessPlugin<E>
-
- com.ss.android.ugc.bytex.common.CommonPlugin<E,X>
-
- All Implemented Interfaces:
MainProcessHandler,IPlugin,org.gradle.api.Plugin<org.gradle.api.Project>
public abstract class CommonPlugin<E extends BaseExtension,X extends BaseContext> extends AbsMainProcessPlugin<E>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.ss.android.ugc.bytex.common.IPlugin
IPlugin.HookType
-
-
Constructor Summary
Constructors Constructor Description CommonPlugin()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidafterExecute()插件执行执行结束后的回调,不管成功和失败都会执行.做一些数据回收处理工作voidbeforeTransform(TransformEngine engine)用于transform前的准备工作 Prepare for real transform.protected abstract XgetContext(org.gradle.api.Project project, com.android.build.gradle.AppExtension android, E extension)protected com.android.build.api.transform.TransformgetTransform()voidinit()protected voidonApply(org.gradle.api.Project project)voidstartExecute(TransformContext transformContext)准备执行的回调-
Methods inherited from class com.ss.android.ugc.bytex.common.flow.main.AbsMainProcessPlugin
afterTransform, getTransformFlow, needPreVerify, needVerify, process, provideTransformFlow, registerTransformFlow, transform, transform, traverse, traverse, traverseAndroidJar, traverseAndroidJar
-
Methods inherited from class com.ss.android.ugc.bytex.common.AbsPlugin
alone, apply, createExtension, enable, getExtension, getExtensionClass, isRunningAlone, name
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ss.android.ugc.bytex.common.IPlugin
hookTask, hookTask, hookTransformName, shouldSaveCache, transformConfiguration
-
Methods inherited from interface com.ss.android.ugc.bytex.common.flow.main.MainProcessHandler
beforeTraverse, flagForClassReader, flagForClassWriter, init, isOnePassEnough, startRunning, traverseIncremental, traverseIncremental
-
-
-
-
Field Detail
-
context
protected X extends BaseContext context
-
-
Method Detail
-
getContext
protected abstract X getContext(org.gradle.api.Project project, com.android.build.gradle.AppExtension android, E extension)
-
startExecute
public void startExecute(TransformContext transformContext)
Description copied from interface:IPlugin准备执行的回调- Specified by:
startExecutein interfaceIPlugin- Overrides:
startExecutein classAbsPlugin<E extends BaseExtension>
-
init
public void init()
Description copied from interface:MainProcessHandler- Specified by:
initin interfaceMainProcessHandler- Overrides:
initin classAbsMainProcessPlugin<E extends BaseExtension>
-
getTransform
protected com.android.build.api.transform.Transform getTransform()
- Overrides:
getTransformin classAbsPlugin<E extends BaseExtension>
-
beforeTransform
public void beforeTransform(@NotNull @Nonnull TransformEngine engine)Description copied from interface:MainProcessHandler用于transform前的准备工作 Prepare for real transform.- Specified by:
beforeTransformin interfaceMainProcessHandler- Overrides:
beforeTransformin classAbsMainProcessPlugin<E extends BaseExtension>- Parameters:
engine- from TransformEngine
-
onApply
protected void onApply(@NotNull @Nonnull org.gradle.api.Project project)- Overrides:
onApplyin classAbsPlugin<E extends BaseExtension>
-
afterExecute
public void afterExecute() throws java.lang.ThrowableDescription copied from interface:IPlugin插件执行执行结束后的回调,不管成功和失败都会执行.做一些数据回收处理工作- Specified by:
afterExecutein interfaceIPlugin- Overrides:
afterExecutein classAbsMainProcessPlugin<E extends BaseExtension>- Throws:
java.lang.Throwable
-
-