From 6bdb2badca6b5f6a7e5419f4abc91e4690a43176 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Thu, 24 Sep 2020 12:27:25 +0200 Subject: [PATCH] add support for tests --- gradle.properties | 3 ++- owncloudComLibrary/build.gradle | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 946d709d..5c0bd337 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,4 @@ android.enableJetifier=true android.useAndroidX=true -org.gradle.jvmargs=-Xmx1536M \ No newline at end of file +org.gradle.jvmargs=-Xmx1536M +android.enableUnitTestBinaryResources=true diff --git a/owncloudComLibrary/build.gradle b/owncloudComLibrary/build.gradle index 6db1f790..2ac7adea 100644 --- a/owncloudComLibrary/build.gradle +++ b/owncloudComLibrary/build.gradle @@ -14,6 +14,14 @@ dependencies { exclude module: "kotlin-reflect" } kapt "com.squareup.moshi:moshi-kotlin-codegen:$moshiVersion" + + testImplementation 'junit:junit:4.13' + testImplementation 'org.robolectric:robolectric:4.3' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0' + androidTestImplementation 'androidx.test:runner:1.3.0' + androidTestImplementation 'androidx.test:core:1.3.0' + androidTestImplementation 'androidx.test.ext:junit:1.1.2' + androidTestImplementation 'androidx.test:rules:1.3.0' } android { @@ -40,4 +48,10 @@ android { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } + + testOptions { + unitTests { + includeAndroidResources = true + } + } }