Skip to content

Commit

Permalink
Stop resolving dependencies at configuration time (cashapp#1291)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrodbx authored Feb 13, 2024
1 parent 468f599 commit 4594b7a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ public class PaparazziPlugin : Plugin<Project> {
task.nonTransitiveRClassEnabled.set(nonTransitiveRClassEnabled)
task.targetSdkVersion.set(android.targetSdkVersion())
task.compileSdkVersion.set(android.compileSdkVersion())
task.projectResourceDirs.set(localResourceDirs.relativize(projectDirectory))
task.moduleResourceDirs.set(moduleResourceDirs.relativize(projectDirectory))
task.projectResourceDirs.set(project.provider { localResourceDirs.relativize(projectDirectory) })
task.moduleResourceDirs.set(project.provider { moduleResourceDirs.relativize(projectDirectory) })
task.aarExplodedDirs.from(aarExplodedDirs)
task.projectAssetDirs.set(localAssetDirs.plus(moduleAssetDirs).relativize(projectDirectory))
task.projectAssetDirs.set(project.provider { localAssetDirs.plus(moduleAssetDirs).relativize(projectDirectory) })
task.aarAssetDirs.from(aarAssetDirs)
task.paparazziResources.set(buildDirectory.file("intermediates/paparazzi/${variant.name}/resources.json"))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1729,7 +1729,12 @@ class PaparazziPluginTest {

if (!gradleProperties.exists()) {
gradleProperties.createNewFile()
gradleProperties.writeText("android.useAndroidX=true")
gradleProperties.writeText(
"""
|android.useAndroidX=true
|android.dependencyResolutionAtConfigurationTime.disallow=true
""".trimMargin()
)
generatedGradleProperties = true
}

Expand Down

0 comments on commit 4594b7a

Please sign in to comment.