forked from testng-team/testng
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.kt
43 lines (36 loc) · 1.42 KB
/
Build.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
import com.beust.kobalt.*
import com.beust.kobalt.internal.test
import com.beust.kobalt.plugin.java.javaProject
import com.beust.kobalt.plugin.kotlin.kotlinProject
import com.beust.kobalt.plugin.packaging.assemble
import com.beust.kobalt.plugin.kotlin.kotlinCompiler
import com.beust.kobalt.plugin.publish.jcenter
val testng = javaProject {
name = "testng"
group = "org.testng"
artifactId = name
version = "6.9.6-SNAPSHOT"
directory = homeDir("java/testng")
buildDirectory = "kobaltBuild"
dependencies {
compile("org.apache.ant:ant:1.7.0",
"junit:junit:4.10",
"org.beanshell:bsh:2.0b4",
"com.google.inject:guice:4.0:no_aop",
"com.beust:jcommander:1.48",
"org.yaml:snakeyaml:1.15")
}
}
val a = assemble(testng) {
mavenJars {
}
}
@Task(name = "generateVersionFile", description = "Generate the Version.java file", runBefore = arrayOf("compile"))
fun createVersionFile(project: Project) : com.beust.kobalt.internal.TaskResult {
val dirFrom = testng.directory + "/src/main/resources/org/testng/internal/"
val dirTo = testng.directory + "/src/generated/java/org/testng/internal/"
println("COPYING VERSION FILE")
Files.copy(Paths.get(dirFrom + "VersionTemplateJava"), Paths.get(dirTo + "Version.java"),
StandardCopyOption.REPLACE_EXISTING)
return com.beust.kobalt.internal.TaskResult()
}