Skip to content

Commit

Permalink
Add variant to task inputs to ensure that the task caching works for …
Browse files Browse the repository at this point in the history
…the appropriate variant
  • Loading branch information
geoff-powell committed Feb 21, 2023
1 parent bbcb764 commit d8c4e8f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ class PaparazziPlugin : Plugin<Project> {
val nonTransitiveRClassEnabled =
(project.findProperty("android.nonTransitiveRClass") as? String).toBoolean()

task.variantName.set(variant.name)
task.packageName.set(android.packageName())
task.artifactFiles.from(packageAwareArtifacts.artifactFiles)
task.nonTransitiveRClassEnabled.set(nonTransitiveRClassEnabled)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ import org.gradle.api.tasks.TaskAction

@CacheableTask
abstract class PrepareResourcesTask : DefaultTask() {
@get:Input
abstract val variantName: Property<String>

@get:Input
abstract val packageName: Property<String>

Expand Down

0 comments on commit d8c4e8f

Please sign in to comment.