Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dd903a76 authored by Vincent Bourgmayer's avatar Vincent Bourgmayer
Browse files

Update app/build.gradle

- Update Robolectric to 4.8.1
- Define AccountName, account's pass & url in testOptions section
parent ccd8de20
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -27,9 +27,6 @@ android {
        versionCode versionMajor * 1000000 + versionMinor * 1000 + versionPatch
        versionName "${versionMajor}.${versionMinor}.${versionPatch}"
        setProperty("archivesBaseName", "eDrive-$versionName")
        buildConfigField "String", "testAccountName", "\""+getTestProp("testAccountName")+"\""
        buildConfigField "String", "testAccountPWd", "\""+getTestProp("testAccountPwd")+"\""
        buildConfigField "String", "testServerUrl", "\""+getTestProp("testServerUrl")+"\""
    }
    buildTypes {
        release {
@@ -47,6 +44,11 @@ android {
        unitTests {
            returnDefaultValues = true
            //includeAndroidResources = true
            unitTests.all {
                systemProperty 'robolectric.dependency.repo.url', "\""+getTestProp("testServerUrl")+"\""
                systemProperty 'robolectric.dependency.repo.username', "\""+getTestProp("testAccountName")+"\""
                systemProperty 'robolectric.dependency.repo.password', "\""+getTestProp("testAccountPwd")+"\""
            }
        }
    }
    buildFeatures {
@@ -83,6 +85,6 @@ dependencies {
    testImplementation 'androidx.test:runner:1.4.0'
    testImplementation 'androidx.test:rules:1.4.0'
    testImplementation 'junit:junit:4.12'
    testImplementation 'org.robolectric:robolectric:4.4'
    testImplementation 'org.robolectric:robolectric:4.8.1'
    testImplementation('org.mockito:mockito-inline:3.4.0')
}