From d7f0ca8ccf23015345ece109e60e846597e15de8 Mon Sep 17 00:00:00 2001 From: Gergely Hegedus Date: Tue, 12 Apr 2022 11:27:40 +0300 Subject: [PATCH] Issue#67 Move Project specific Test Tasks out of testoptions.gradle --- build.gradle | 3 ++- gradlescripts/test.tasks.gradle | 16 ++++++++++++++++ gradlescripts/testoptions.gradle | 17 ----------------- 3 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 gradlescripts/test.tasks.gradle diff --git a/build.gradle b/build.gradle index 84e7132..a04b51e 100644 --- a/build.gradle +++ b/build.gradle @@ -33,4 +33,5 @@ apply from: 'gradlescripts/versions.gradle' apply from: 'gradlescripts/detekt.config.gradle' apply from: 'gradlescripts/ktlint.gradle' apply from: 'gradlescripts/lint.gradle' -apply from: 'gradlescripts/testoptions.gradle' \ No newline at end of file +apply from: 'gradlescripts/testoptions.gradle' +apply from: 'gradlescripts/test.tasks.gradle' \ No newline at end of file diff --git a/gradlescripts/test.tasks.gradle b/gradlescripts/test.tasks.gradle new file mode 100644 index 0000000..c8f1744 --- /dev/null +++ b/gradlescripts/test.tasks.gradle @@ -0,0 +1,16 @@ +task jvmTests(dependsOn: ["app:testDebugUnitTest", "core:test", "network:test"]) { + group = 'Tests' + description = 'Run all JVM tests' +} + +task robolectricTests(type: Exec) { + group = 'Tests' + description = 'Run all Robolectric tests based on the Instrumented naming convention' + // todo is there a better way? + commandLine 'sh', './gradlew', 'testDebugUnitTest', '--tests', 'org.fnives.test.*InstrumentedTest' +} + +task androidTests(dependsOn: ["app:connectedDebugAndroidTest"]) { + group = 'Tests' + description = 'Run Android tests' +} \ No newline at end of file diff --git a/gradlescripts/testoptions.gradle b/gradlescripts/testoptions.gradle index ce6575a..7193f48 100644 --- a/gradlescripts/testoptions.gradle +++ b/gradlescripts/testoptions.gradle @@ -62,21 +62,4 @@ subprojects { module -> } } } -} - -task jvmTests(dependsOn: ["app:testDebugUnitTest", "core:test", "network:test"]) { - group = 'Tests' - description = 'Run all JVM tests' -} - -task robolectricTests(type: Exec) { - group = 'Tests' - description = 'Run all Robolectric tests based on the Instrumented naming convention' - // todo is there a better way? - commandLine 'sh', './gradlew', 'testDebugUnitTest', '--tests', 'org.fnives.test.*InstrumentedTest' -} - -task androidTests(dependsOn: ["app:connectedDebugAndroidTest"]) { - group = 'Tests' - description = 'Run Android tests' } \ No newline at end of file