๐Ÿ“ฆ airbnb / Showkase

๐Ÿ“„ build.gradle ยท 62 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62plugins {
    id 'com.android.library'
    id 'kotlin-android'
    id 'shot'
    id 'org.jetbrains.kotlin.plugin.compose'
}
apply from: "$rootDir/publishing.gradle"

android {
    namespace "com.airbnb.android.showkase.screenshot.testing.shot"
    // Added to avoid this error -
    // Execution failed for task ':showkase-processor-testing:mergeDebugAndroidTestJavaResource'.
    // > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
    // > More than one file was found with OS independent path 'META-INF/gradle/incremental.annotation.processors'
    packagingOptions {
        exclude 'META-INF/gradle/incremental.annotation.processors'
        exclude("META-INF/*.kotlin_module")
    }
    defaultConfig {
        testApplicationId "com.airbnb.android.showkase.screenshot.testing.shot"
        minSdkVersion 21
        compileSdk 36
        targetSdkVersion 33
        testInstrumentationRunner "com.karumi.shot.ShotTestRunner"
        // The following argument makes the Android Test Orchestrator run its
        // "pm clear" command after each test invocation. This command ensures
        // that the app's state is completely cleared between tests.
        testInstrumentationRunnerArguments clearPackageData: 'true'
    }
    shot {
        applicationId = "com.airbnb.android.showkase.screenshot.testing.shot"
    }
    buildFeatures {
        compose true
    }
    // Added to avoid this error -
    // Execution failed for task ':app:mergeDebugAndroidTestJavaResource'.
    // > A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
    // > 2 files found with path 'META-INF/AL2.0' from inputs:
    packagingOptions {
        exclude 'META-INF/AL2.0'
        exclude 'META-INF/LGPL2.1'
    }
}

kotlin {
    jvmToolchain(17)
}

dependencies {
    // Showkase
    api project(':showkase')
    api deps.compose.uiTest
    api project(':showkase-screenshot-testing')
    api deps.test.shotAndroid

    // Testing
    api deps.test.androidXTestCore
    api deps.test.androidXTestRules
    api deps.test.androidxTestRunner
}