File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed
affectedmoduledetector/src/main/kotlin/com/dropbox/affectedmoduledetector Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -171,11 +171,12 @@ class AffectedModuleDetectorPlugin : Plugin<Project> {
171171
172172 project.pluginManager.withPlugin(pluginId) {
173173 getAffectedPath(testType, project)?.let { path ->
174- if (AffectedModuleDetector .isProjectProvided(project) && ! isExcludedModule(config, path)) {
174+ val pathOrNull = project.tasks.findByPath(path)
175+ if (AffectedModuleDetector .isProjectProvided(project) && ! isExcludedModule(config, path) && pathOrNull != null ) {
175176 task.dependsOn(path)
176177 }
177178
178- project.tasks.findByPath(path) ?.onlyIf { task ->
179+ pathOrNull ?.onlyIf { task ->
179180 when {
180181 ! AffectedModuleDetector .isProjectEnabled(task.project) -> true
181182 else -> AffectedModuleDetector .isProjectAffected(task.project)
Original file line number Diff line number Diff line change @@ -19,10 +19,6 @@ buildscript {
1919 }
2020}
2121
22- plugins {
23- id(" io.gitlab.arturbosch.detekt" ) version " 1.20.0"
24- }
25-
2622apply plugin : " org.jlleitschuh.gradle.ktlint"
2723apply plugin : " com.dropbox.affectedmoduledetector"
2824
@@ -47,8 +43,6 @@ affectedModuleDetector {
4743}
4844
4945allprojects {
50- apply plugin : Dependencies.Libs . DETEKT_PLUGIN
51-
5246 repositories {
5347 google()
5448 mavenCentral()
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import com.dropbox.sample.Dependencies
33plugins {
44 id ' com.android.library'
55 id ' kotlin-android'
6+ id(" io.gitlab.arturbosch.detekt" ) version " 1.20.0"
67}
78
89affectedTestConfiguration {
You can’t perform that action at this time.
0 commit comments