InferAndroidTestKeepRules

@CacheableTask
abstract class InferAndroidTestKeepRules @Inject constructor(execOps: ExecOperations) : DefaultTask

Generates proguard keep rules from the generated androidTestSourceJar and appTargetJar tasks, where the generates rules are based on what classes from appTargetJar are used by androidTestSourceJar.

This uses R8's TraceReferences CLI to perform the analysis.

This task's output is finally used as an input into the app variant's proguard transform task.

Constructors

Link copied to clipboard
@Inject
constructor(execOps: ExecOperations)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
@get:Classpath
abstract val androidJar: RegularFileProperty
Link copied to clipboard
@get:Classpath
@get:Optional
abstract val androidTestJar: RegularFileProperty
Link copied to clipboard
@get:Classpath
abstract val androidTestSourceJar: RegularFileProperty
Link copied to clipboard
@get:Classpath
abstract val appTargetJar: RegularFileProperty
Link copied to clipboard
@get:Input
abstract val enableAssertionsProperty: Property<Boolean>

Enable more descriptive precondition checks in the CLI. If disabled, errors will be emitted to the generated proguard rules file instead.

Link copied to clipboard
@get:Input
abstract val jvmArgsProperty: ListProperty<String>

Optional custom jvm arguments to pass into the exec. Useful if you want to enable debugging in R8.

Link copied to clipboard
@get:OutputFile
abstract val outputProguardRules: RegularFileProperty
Link copied to clipboard
@get:Classpath
@get:InputFiles
abstract val r8Program: ConfigurableFileCollection
Link copied to clipboard
@get:Input
abstract val traceReferencesArgs: ListProperty<String>