-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't execute when path is not set (#296)
- Loading branch information
1 parent
1bc7149
commit 19e3b25
Showing
6 changed files
with
40 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
.../src/functionalTest/kotlin/schwarz/it/lightsaber/gradle/LightsaberPluginOtherTasksTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package schwarz.it.lightsaber.gradle | ||
|
||
import org.gradle.testkit.runner.GradleRunner | ||
import org.junit.jupiter.params.ParameterizedTest | ||
import org.junit.jupiter.params.provider.ValueSource | ||
import java.io.File | ||
|
||
class LightsaberPluginOtherTasksTest { | ||
|
||
@ParameterizedTest | ||
@ValueSource(strings = ["annotationProcessor", "kapt", "ksp", "androidAnnotationProcessor", "androidKapt", "androidKsp"]) | ||
fun `Execute test task correctly`(resourcePath: String) { | ||
val dir: File | ||
GradleRunner.create() | ||
.withProjectDirFromResources(resourcePath) | ||
.also { dir = it.projectDir } | ||
.withPluginClasspath() | ||
.withArguments("test") | ||
.build() | ||
|
||
check(dir.walkBottomUp().none { it.extension == "lightsaber" }) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters