mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-27 00:38:11 -07:00
New build syntax.
This commit is contained in:
parent
70c4a3960f
commit
fded2800b6
6 changed files with 62 additions and 57 deletions
|
@ -1,4 +1,6 @@
|
|||
import com.beust.kobalt.*
|
||||
import com.beust.kobalt.api.License
|
||||
import com.beust.kobalt.api.Scm
|
||||
import com.beust.kobalt.internal.test
|
||||
import com.beust.kobalt.plugin.java.javaProject
|
||||
import com.beust.kobalt.plugin.kotlin.kotlinProject
|
||||
|
@ -25,16 +27,17 @@ val wrapper = javaProject {
|
|||
name = "kobalt-wrapper"
|
||||
version = readVersion()
|
||||
directory = homeDir("kotlin/kobalt/modules/wrapper")
|
||||
}
|
||||
|
||||
val assembleWrapper = assemble(wrapper) {
|
||||
jar {
|
||||
name = wrapper.name + ".jar"
|
||||
manifest {
|
||||
attributes("Main-Class", "com.beust.kobalt.wrapper.Main")
|
||||
assemble {
|
||||
jar {
|
||||
name = projectName + ".jar"
|
||||
manifest {
|
||||
attributes("Main-Class", "com.beust.kobalt.wrapper.Main")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
val kobalt = kotlinProject(wrapper) {
|
||||
name = "kobalt"
|
||||
group = "com.beust"
|
||||
|
@ -42,9 +45,8 @@ val kobalt = kotlinProject(wrapper) {
|
|||
version = readVersion()
|
||||
description = "A build system in Kotlin"
|
||||
url = "http://beust.com/kobalt"
|
||||
licenses = listOf(com.beust.kobalt.api.License("Apache 2.0", "http://www.apache.org/licenses/LICENSE-2.0"))
|
||||
scm = com.beust.kobalt.api.Scm(
|
||||
url = "http://github.com/cbeust/kobalt",
|
||||
licenses = listOf(License("Apache 2.0", "http://www.apache.org/licenses/LICENSE-2.0"))
|
||||
scm = Scm(url = "http://github.com/cbeust/kobalt",
|
||||
connection = "https://github.com/cbeust/kobalt.git",
|
||||
developerConnection = "git@github.com:cbeust/kobalt.git")
|
||||
|
||||
|
@ -70,34 +72,35 @@ val kobalt = kotlinProject(wrapper) {
|
|||
"com.google.code.gson:gson:2.4"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
val testKobalt = test(kobalt) {
|
||||
args("-log", "2", "src/test/resources/testng.xml")
|
||||
}
|
||||
|
||||
val assembleKobalt = assemble(kobalt) {
|
||||
mavenJars {
|
||||
fatJar = true
|
||||
manifest {
|
||||
attributes("Main-Class", "com.beust.kobalt.MainKt")
|
||||
assemble {
|
||||
mavenJars {
|
||||
fatJar = true
|
||||
manifest {
|
||||
attributes("Main-Class", "com.beust.kobalt.MainKt")
|
||||
}
|
||||
}
|
||||
zip {
|
||||
include("kobaltw")
|
||||
include(from("$buildDirectory/libs"), to("kobalt/wrapper"),
|
||||
"$projectName-$version.jar")
|
||||
include(from("modules/wrapper/$buildDirectory/libs"), to("kobalt/wrapper"),
|
||||
"$projectName-wrapper.jar")
|
||||
}
|
||||
}
|
||||
zip {
|
||||
include("kobaltw")
|
||||
include(from("${kobalt.buildDirectory}/libs"), to("kobalt/wrapper"),
|
||||
"${kobalt.name}-${kobalt.version}.jar")
|
||||
include(from("modules/wrapper/${kobalt.buildDirectory}/libs"), to("kobalt/wrapper"),
|
||||
"${kobalt.name}-wrapper.jar")
|
||||
|
||||
test {
|
||||
args("-log", "2", "src/test/resources/testng.xml")
|
||||
}
|
||||
|
||||
kotlinCompiler {
|
||||
args("-nowarn")
|
||||
}
|
||||
|
||||
jcenter {
|
||||
publish = true
|
||||
file("$buildDirectory/libs/$name-$version.zip", "$name/$version/$name-$version.zip")
|
||||
}
|
||||
}
|
||||
|
||||
val cs = kotlinCompiler {
|
||||
args("-nowarn")
|
||||
}
|
||||
|
||||
val jc = jcenter(kobalt) {
|
||||
publish = true
|
||||
file("${kobalt.buildDirectory}/libs/${kobalt.name}-${kobalt.version}.zip",
|
||||
"${kobalt.name}/${kobalt.version}/${kobalt.name}-${kobalt.version}.zip")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue