booster / com.didiglobal.booster.transform.util / TransformHelper

TransformHelper

open class TransformHelper

Utility class for JAR or class file transforming

Parameters

input - The files to transform

platform - The specific android platform location, such as ${ANDROID_HOME}/platforms/android-28

artifacts - The artifact manager

applicationId - An identifier for transform output

variant - The variant name

Author
johnsonlee

Constructors

<init>

Utility class for JAR or class file transforming

TransformHelper(input: File, platform: File = AndroidSdk.getAndroidJar().parentFile, artifacts: ArtifactManager = object : ArtifactManager {}, applicationId: String = UUID.randomUUID().toString(), variant: String = "debug")

Properties

applicationId

An identifier for transform output

val applicationId: String

artifacts

The artifact manager

val artifacts: ArtifactManager

input

The files to transform

val input: File

platform

The specific android platform location, such as ${ANDROID_HOME}/platforms/android-28

val platform: File

variant

The variant name

val variant: String

Functions

transform

fun transform(output: File = TMPDIR, transformer: (TransformContext, ByteArray) -> ByteArray = { _, it -> it }): Unit
fun transform(transformer: (TransformContext, ByteArray) -> ByteArray = { _, it -> it }, output: File = TMPDIR): Unit
fun transform(output: File = TMPDIR, vararg transformers: Transformer): Unit
fun transform(vararg transformers: Transformer, output: File = TMPDIR): Unit

Inheritors

VariantTransformHelper

Represents transform helper associates with variant

class VariantTransformHelper : TransformHelper