/
AndroidLintReporterPluginFunctionalTest.kt
43 lines (37 loc) · 1.32 KB
/
AndroidLintReporterPluginFunctionalTest.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* This Kotlin source file was generated by the Gradle 'init' task.
*/
package android_lint_reporter
import org.gradle.internal.impldep.org.junit.Assert.assertTrue
import java.io.File
import org.gradle.testkit.runner.GradleRunner
import kotlin.test.Test
import kotlin.test.assertSame
class AndroidLintReporterPluginFunctionalTest {
@Test
fun `can run task`() {
// Setup the test build
val projectDir = File("build/functionalTest")
projectDir.mkdirs()
projectDir.resolve("settings.gradle").writeText("")
projectDir.resolve("build.gradle").writeText("""
plugins {
id('com.worker8.android_lint_reporter')
}
android_lint_reporter {
lintFilePath = "./src/main/resources/lint-results.xml"
githubUsername = "worker8"
githubRepositoryName = "SimpleCurrency"
}
""")
// Run the build
val runner = GradleRunner.create()
runner.forwardOutput()
runner.withPluginClasspath()
runner.withArguments(listOf("parseAndSendLintResult", "-PgithubToken=", "-PgithubPullRequestId="))
runner.withProjectDir(projectDir)
val result = runner.build();
System.out.println("ddw, output: ${result.output}")
assertTrue(true)
}
}