AndroidHiltTransformAsm

mill.androidlib.hilt.AndroidHiltTransformAsm

A standalone executable utility to transform compiled classes with Hilt dependency injection context.

Example usage: java -classpath <classpath> mill.kotlinlib.android.hilt.AndroidHiltTransformAsm <input-directory> <output-directory> where the input directory is the directory containing the compiled classes and the output-directory an already existing directory to place the transformed classes.

The classes are only transformed if they contain the @AndroidEntryPoint or @HiltAndroidApp annotations, otherwise they are copied as is. This code is an adaptation of the gradle hilt plugin transformASM task that can be found in https://github.com/google/dagger/blob/b3d3443e3581b8530cd85929614a1765cd37b12c/java/dagger/hilt/android/plugin/main/src/main/kotlin/dagger/hilt/android/plugin/transform/AndroidEntryPointClassVisitor.kt#L122

Attributes

Source
AndroidHiltTransformAsm.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

class AnnotationScannerClassVisitor(apiVersion: Int) extends ClassVisitor

Attributes

Source
AndroidHiltTransformAsm.scala
Supertypes
class ClassVisitor
class Object
trait Matchable
class Any

Value members

Concrete methods

def main(args: Array[String]): Unit

Attributes

Source
AndroidHiltTransformAsm.scala
def transformAsm(baseDir: Path, classes: Seq[Path], destinationDir: Path): Seq[Path]

Attributes

Source
AndroidHiltTransformAsm.scala