From 599b8c3394cd9ac5cda84a8564d1ac9bbd4649ae Mon Sep 17 00:00:00 2001 From: Cedric Beust Date: Fri, 6 Nov 2015 17:52:09 -0800 Subject: [PATCH] Move dead code to the bottom. --- kobalt/src/Build.kt | 47 +++++++++++++++++++++++++-------------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index 76631dca..5139b526 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -3,6 +3,7 @@ import com.beust.kobalt.api.License import com.beust.kobalt.api.Scm import com.beust.kobalt.homeDir import com.beust.kobalt.internal.test +import com.beust.kobalt.plugin.application.application import com.beust.kobalt.plugin.java.javaCompiler import com.beust.kobalt.plugin.java.javaProject import com.beust.kobalt.plugin.kotlin.kotlinCompiler @@ -11,26 +12,6 @@ import com.beust.kobalt.plugin.packaging.assemble import com.beust.kobalt.plugin.publish.jcenter import java.io.File -//import com.beust.kobalt.plugin.linecount.lineCount -//val plugins = plugins( -// "com.beust.kobalt:kobalt-line-count:0.15" -//// file(homeDir("kotlin/kobalt-line-count/kobaltBuild/libs/kobalt-line-count-0.14.jar")) -//) -// -//val lc = lineCount { -// suffix = "**.md" -//} - -fun readVersion() : String { - val p = java.util.Properties() - var localFile = java.io.File("src/main/resources/kobalt.properties") - if (! localFile.exists()) { - localFile = File(homeDir("kotlin", "kobalt", "src/main/resources/kobalt.properties")) - } - p.load(java.io.FileReader(localFile)) - return p.getProperty("kobalt.version") -} - val wrapper = javaProject { name = "kobalt-wrapper" version = readVersion() @@ -48,6 +29,11 @@ val wrapper = javaProject { } } } + + application { + mainClass = "com.beust.kobalt.wrapper.Main" + jvmArgs("-Dtest=foo") + } } val kobalt = kotlinProject(wrapper) { @@ -57,7 +43,7 @@ val kobalt = kotlinProject(wrapper) { version = readVersion() description = "A build system in Kotlin" url = "http://beust.com/kobalt" - licenses = listOf(License("Apache 2.0", "http://www.apache.org/licenses/LICENSE-2.0")) + licenses = arrayListOf(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") @@ -115,4 +101,23 @@ val kobalt = kotlinProject(wrapper) { } } +fun readVersion() : String { + val p = java.util.Properties() + var localFile = java.io.File("src/main/resources/kobalt.properties") + if (! localFile.exists()) { + localFile = File(homeDir("kotlin", "kobalt", "src/main/resources/kobalt.properties")) + } + p.load(java.io.FileReader(localFile)) + return p.getProperty("kobalt.version") +} + +//import com.beust.kobalt.plugin.linecount.lineCount +//val plugins = plugins( +// "com.beust.kobalt:kobalt-line-count:0.15" +//// file(homeDir("kotlin/kobalt-line-count/kobaltBuild/libs/kobalt-line-count-0.14.jar")) +//) +// +//val lc = lineCount { +// suffix = "**.md" +//}