build.gradle 1.9 KB
Newer Older
D
Dan Field 已提交
1
apply plugin: 'com.android.application'
2 3
apply plugin: 'com.facebook.testing.screenshot'

4 5
def leakcanary_version = '2.6'

6 7 8 9
screenshots {
    failureDir = "${rootProject.buildDir}/reports/diff_failures"
    recordDir = "${rootProject.projectDir}/reports/screenshots"
}
D
Dan Field 已提交
10 11

android {
12
    compileSdkVersion 30
D
Dan Field 已提交
13 14 15 16 17
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    defaultConfig {
18
        applicationId 'dev.flutter.scenarios'
19
        minSdkVersion 18
20
        targetSdkVersion 30
D
Dan Field 已提交
21
        versionCode 1
22 23 24 25
        versionName '1.0'
        testInstrumentationRunner 'dev.flutter.TestRunner'
        testInstrumentationRunnerArgument 'listener', 'leakcanary.FailTestOnLeakRunListener'
        testInstrumentationRunnerArguments clearPackageData: 'true'
D
Dan Field 已提交
26 27 28 29 30 31 32
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
33 34
    sourceSets {
        main.assets.srcDirs += "${project.buildDir}/assets"
35
    }
D
Dan Field 已提交
36 37 38
}

dependencies {
39
    compile 'com.facebook.testing.screenshot:layout-hierarchy-common:0.12.0'
40
    implementation fileTree(dir: 'libs', include: ['*.jar'])
41 42 43 44
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.lifecycle:lifecycle-common-java8:2.2.0-alpha01'
45
    implementation "com.squareup.leakcanary:leakcanary-android:$leakcanary_version"
D
Dan Field 已提交
46
    testImplementation 'junit:junit:4.12'
47 48 49
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test:rules:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
50
    androidTestImplementation "com.squareup.leakcanary:leakcanary-android-instrumentation:$leakcanary_version"
D
Dan Field 已提交
51
}