@@ -118,7 +118,7 @@ open class GreasePlugin : Plugin<Project> {
118
118
119
119
val componentConfig = variant.componentCreationConfigOrThrow()
120
120
121
- target.locateTask(componentConfig.computeTaskName (" process" , " Manifest" ))?.configure {
121
+ target.locateTask(componentConfig.resolveTaskName (" process" , " Manifest" ))?.configure {
122
122
val processManifestTask = this as ProcessLibraryManifest
123
123
124
124
val extraManifests = configurations.artifactsOf(AndroidArtifacts .ArtifactType .MANIFEST )
@@ -218,7 +218,7 @@ open class GreasePlugin : Plugin<Project> {
218
218
219
219
val creationConfig = variant.componentCreationConfigOrThrow()
220
220
221
- target.locateTask(creationConfig.computeTaskName (" copy" , " JniLibsProjectAndLocalJars" ))?.configure {
221
+ target.locateTask(creationConfig.resolveTaskName (" copy" , " JniLibsProjectAndLocalJars" ))?.configure {
222
222
val copyJniTask = this as LibraryJniLibsTask
223
223
val extraJniLibs = configurations.artifactsOf(AndroidArtifacts .ArtifactType .JNI )
224
224
dependsOn(extraJniLibs)
@@ -315,7 +315,7 @@ open class GreasePlugin : Plugin<Project> {
315
315
log.d { " Configuring variant ${variant.name} ..." }
316
316
val creationConfig = variant.componentCreationConfigOrThrow()
317
317
318
- target.locateTask(creationConfig.computeTaskName (" package" , " Resources" ))?.configure {
318
+ target.locateTask(creationConfig.resolveTaskName (" package" , " Resources" ))?.configure {
319
319
this as MergeResources
320
320
321
321
val resourcesMergingWorkdir = target.greaseBuildDir.get().dir(variant.name).dir(" resources" )
@@ -393,7 +393,7 @@ open class GreasePlugin : Plugin<Project> {
393
393
val bundleLibraryTask = creationConfig.taskContainer.bundleLibraryTask
394
394
395
395
val greaseExpandTask = target.tasks.locateOrRegisterTask(
396
- creationConfig.computeTaskName (" extract" , " Aar" ).greasify(),
396
+ creationConfig.resolveTaskName (" extract" , " Aar" ).greasify(),
397
397
) {
398
398
val bundleAar = bundleLibraryTask?.get() as BundleAar
399
399
@@ -409,7 +409,7 @@ open class GreasePlugin : Plugin<Project> {
409
409
}
410
410
411
411
val greaseProcessTask = target.tasks.locateOrRegisterTask(
412
- creationConfig.computeTaskName (" process" , " Jar" ).greasify(),
412
+ creationConfig.resolveTaskName (" process" , " Jar" ).greasify(),
413
413
) {
414
414
415
415
// There are many options here. PROCESSED_JAR, PROCESSED_AAR, CLASSES, CLASSES_JAR ...
@@ -440,7 +440,7 @@ open class GreasePlugin : Plugin<Project> {
440
440
}
441
441
442
442
val greaseShadowTask = target.tasks.locateOrRegisterTask(
443
- creationConfig.computeTaskName (" shadow" , " Aar" ).greasify(),
443
+ creationConfig.resolveTaskName (" shadow" , " Aar" ).greasify(),
444
444
ShadowJar ::class .java
445
445
) {
446
446
val compileTask = creationConfig.taskContainer.javacTask
@@ -645,7 +645,7 @@ open class GreasePlugin : Plugin<Project> {
645
645
val log = logger.child(" configureVariantProguardFiles" )
646
646
log.d { " Configuring variant ${variant.name} ..." }
647
647
val creationConfig = variant.componentCreationConfigOrThrow()
648
- target.locateTask(creationConfig.computeTaskName (" merge" , " ConsumerProguardFiles" ))?.configure {
648
+ target.locateTask(creationConfig.resolveTaskName (" merge" , " ConsumerProguardFiles" ))?.configure {
649
649
val mergeFileTask = this as MergeFileTask
650
650
// UNFILTERED_PROGUARD_RULES, FILTERED_PROGUARD_RULES, AAPT_PROGUARD_RULES, ...
651
651
// UNFILTERED_PROGUARD_RULES is output of the AarTransform. FILTERED_PROGUARD_RULES
@@ -661,7 +661,7 @@ open class GreasePlugin : Plugin<Project> {
661
661
}
662
662
}
663
663
664
- private fun ComponentCreationConfig.computeTaskName (prefix : String , suffix : String ): String =
664
+ private fun ComponentCreationConfig.resolveTaskName (prefix : String , suffix : String ): String =
665
665
prefix.appendCapitalized(name, suffix)
666
666
667
667
private fun Variant.componentCreationConfigOrThrow (): ComponentCreationConfig {
0 commit comments