cashapp / paparazzi

Render your Android screens without a physical device or emulator
https://cashapp.github.io/paparazzi/
Apache License 2.0
2.32k stars 216 forks source link

'other' has different root #1589

Closed oryshhij closed 2 months ago

oryshhij commented 2 months ago

Description On Windows OS when run task ./gradlew :country:az:app:preparePaparazziDebugResources we received error:

Configuration cache state could not be cached: field `__moduleResourceDirs__` of task `:country:az:app:preparePaparazziDebugResources` of type `app.cash.paparazzi.gradle.PrepareResourcesTask`: error writing value of type 'org.gradle.api.internal.provider.DefaultListProperty'
> 'other' has different root

On Mac all good. Note: 1) Our gradle.properties file:

org.gradle.jvmargs=-Xmx8192m -XX:+UseParallelGC
org.gradle.parallel=true
org.gradle.caching=true
org.gradle.configureondemand=true
android.useAndroidX=true
android.enableJetifier=true
# For paparazzi. Because we use jetifier. Remove this when we don't use jetifier anymore
android.jetifier.ignorelist=android-base-common,common
kotlin.code.style=official
android.enableR8.fullMode=false

2) Our paparazzi-convention.gradle:

plugins {
    id 'app.cash.paparazzi'
}

afterEvaluate {
    dependencies.constraints {
        add('testImplementation', 'com.google.guava:guava') {
            attributes {
                attribute(
                        TargetJvmEnvironment.TARGET_JVM_ENVIRONMENT_ATTRIBUTE,
                        objects.named(TargetJvmEnvironment, TargetJvmEnvironment.STANDARD_JVM)
                )
            }
            because('LayoutLib and sdk-common depend on Guava\'s -jre published variant. See https://github.com/cashapp/paparazzi/issues/906.')
        }
    }
}

Steps to Reproduce Just try rebuild project on Windows OS or execute preparePaparazziResources tasks. For example: task ./gradlew :country:en:app:preparePaparazziDebugResources

Expected behavior Should be success on Windows OS also

Additional information:

Screenshots image_480

Logs with --stacktrace Exception is papparazzi.txt