File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed
affectedmoduledetector/src/main/kotlin/com/dropbox/affectedmoduledetector Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -233,8 +233,8 @@ class AffectedModuleDetectorPlugin : Plugin<Project> {
233233 internal const val CUSTOM_TASK_GROUP_NAME = " Affected Module Detector custom tasks"
234234
235235 private const val PLUGIN_ANDROID_APPLICATION = " com.android.application"
236- private const val PLUGIN_ANDROID_LIBRARY = " java "
237- private const val PLUGIN_JAVA_LIBRARY = " com.android.library "
236+ private const val PLUGIN_ANDROID_LIBRARY = " com.android.library "
237+ private const val PLUGIN_JAVA_LIBRARY = " java "
238238 private const val PLUGIN_KOTLIN = " kotlin"
239239
240240 private const val ANDROID_TEST_PATTERN = " AndroidTest"
Original file line number Diff line number Diff line change @@ -8,12 +8,16 @@ package com.dropbox.affectedmoduledetector
88 */
99open class AffectedTestConfiguration {
1010
11- var assembleAndroidTestTask : String? = " assembleDebugAndroidTest "
12- var runAndroidTestTask : String? = " connectedDebugAndroidTest "
11+ var assembleAndroidTestTask : String? = DEFAULT_ASSEMBLE_ANDROID_TEST_TASK
12+ var runAndroidTestTask : String? = DEFAULT_ANDROID_TEST_TASK
1313 var jvmTestTask : String? = DEFAULT_JVM_TEST_TASK
1414
1515 companion object {
1616 const val name = " affectedTestConfiguration"
17+
1718 internal const val DEFAULT_JVM_TEST_TASK = " testDebugUnitTest"
19+ internal const val DEFAULT_NON_ANDROID_JVM_TEST_TASK = " test"
20+ internal const val DEFAULT_ASSEMBLE_ANDROID_TEST_TASK = " assembleDebugAndroidTest"
21+ internal const val DEFAULT_ANDROID_TEST_TASK = " connectedDebugAndroidTest"
1822 }
1923}
Original file line number Diff line number Diff line change @@ -8,25 +8,25 @@ internal enum class InternalTaskType(
88
99 ANDROID_TEST (
1010 commandByImpact = " runAffectedAndroidTests" ,
11- originalGradleCommand = " connectedDebugAndroidTest " ,
11+ originalGradleCommand = AffectedTestConfiguration . DEFAULT_ANDROID_TEST_TASK ,
1212 taskDescription = " Runs all affected Android Tests. Requires a connected device."
1313 ),
1414
1515 ASSEMBLE_ANDROID_TEST (
1616 commandByImpact = " assembleAffectedAndroidTests" ,
17- originalGradleCommand = " assembleDebugAndroidTest " ,
17+ originalGradleCommand = AffectedTestConfiguration . DEFAULT_ASSEMBLE_ANDROID_TEST_TASK ,
1818 taskDescription = " Assembles all affected Android Tests. Useful when working with device labs."
1919 ),
2020
2121 ANDROID_JVM_TEST (
2222 commandByImpact = " runAffectedUnitTests" ,
23- originalGradleCommand = " testDebugUnitTest " ,
23+ originalGradleCommand = AffectedTestConfiguration . DEFAULT_JVM_TEST_TASK ,
2424 taskDescription = " Runs all affected unit tests."
2525 ),
2626
2727 JVM_TEST (
2828 commandByImpact = " " , // inner type. This type doesn't registered in gradle
29- originalGradleCommand = " test " ,
29+ originalGradleCommand = AffectedTestConfiguration . DEFAULT_NON_ANDROID_JVM_TEST_TASK ,
3030 taskDescription = " Runs all affected unit tests for non Android modules."
3131 )
3232}
You can’t perform that action at this time.
0 commit comments