File tree Expand file tree Collapse file tree 5 files changed +21
-17
lines changed
affectedmoduledetector/src/main/kotlin/com/dropbox/affectedmoduledetector Expand file tree Collapse file tree 5 files changed +21
-17
lines changed Original file line number Diff line number Diff line change 2020 uses : actions/checkout@v2
2121
2222 - name : Set up our JDK environment
23- uses : actions/setup-java@v1.4.3
23+ uses : actions/setup-java@v3
2424 with :
25- java-version : 1.8
25+ distribution : ' zulu'
26+ java-version : ' 11'
2627
2728 - name : Upload Artifacts
2829 run : ./gradlew publishAllPublicationsToMavenCentralRepository --no-daemon --no-parallel
@@ -49,21 +50,27 @@ jobs:
4950 fail-fast : false
5051 matrix :
5152 api-level :
52- - 29
53+ - 31
5354
5455 steps :
5556 - name : Checkout
5657 uses : actions/checkout@v2
5758
5859 - name : Set up our JDK environment
59- uses : actions/setup-java@v1.4.3
60+ uses : actions/setup-java@v3
6061 with :
61- java-version : 1.8
62+ distribution : ' zulu'
63+ java-version : ' 11'
6264 - name : Run tests
6365 uses : reactivecircus/android-emulator-runner@v2
6466 with :
65- api-level : 29
66- script : ./gradlew assemble testCoverage
67+ api-level : 31
68+ profile : Nexus 6
69+ arch : x86_64
70+ force-avd-creation : false
71+ emulator-options : -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
72+ disable-animations : true
73+ script : ./gradlew assemble testCoverage
6774 env :
6875 API_LEVEL : ${{ matrix.api-level }}
6976 - name : Upload code coverage
Original file line number Diff line number Diff line change 1717 - name : Checkout
1818 uses : actions/checkout@v2
1919 - name : Set up our JDK environment
20- uses : actions/setup-java@v1.4.3
20+ uses : actions/setup-java@v3
2121 with :
22- java-version : 1.8
22+ distribution : ' zulu'
23+ java-version : ' 11'
2324 - name : Build sample
2425 run : |
2526 ./gradlew :affectedmoduledetector:publishToMavenLocal
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