From da976566167bb67735412e2e7bbd21283402ea90 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Wed, 8 Mar 2017 01:30:29 -0800 Subject: [PATCH] Added examples to main build file. --- .idea/kobalt.xml | 7 +- .idea/vcs.xml | 1 + example/example.iml | 480 ++++++++++- example/kobalt/src/Build.kt | 9 +- .../kobalt/wrapper/kobalt-wrapper.properties | 2 +- kobalt-versioneye.iml | 787 +++++++++--------- kobalt/Build.kt.iml | 13 +- kobalt/src/Build.kt | 75 +- kobalt/wrapper/kobalt-wrapper.properties | 2 +- 9 files changed, 966 insertions(+), 410 deletions(-) diff --git a/.idea/kobalt.xml b/.idea/kobalt.xml index e3ccf1e..52b4669 100644 --- a/.idea/kobalt.xml +++ b/.idea/kobalt.xml @@ -5,18 +5,13 @@ - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml index d175698..4c0d94b 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -4,5 +4,6 @@ + \ No newline at end of file diff --git a/example/example.iml b/example/example.iml index 19dbd15..70fa9cc 100644 --- a/example/example.iml +++ b/example/example.iml @@ -1,6 +1,484 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/example/kobalt/src/Build.kt b/example/kobalt/src/Build.kt index 49ba2e3..766bcc1 100644 --- a/example/kobalt/src/Build.kt +++ b/example/kobalt/src/Build.kt @@ -1,10 +1,11 @@ import com.beust.kobalt.* -import com.beust.kobalt.plugin.application.application -import com.beust.kobalt.plugin.packaging.assemble +import com.beust.kobalt.plugin.application.* +import com.beust.kobalt.plugin.packaging.* import net.thauvin.erik.kobalt.plugin.versioneye.* +// ./kobaltw versionEye + val bs = buildScript { - //plugins(file("../kobaltBuild/libs/kobalt-versioneye-0.4.4.jar")) plugins("net.thauvin.erik:kobalt-versioneye:") } @@ -32,8 +33,6 @@ val p = project { compile("com.beust:kobalt-plugin-api:0.878") } - - dependenciesTest { compile("org.testng:testng:") } diff --git a/example/kobalt/wrapper/kobalt-wrapper.properties b/example/kobalt/wrapper/kobalt-wrapper.properties index 91fe49a..1ec9521 100644 --- a/example/kobalt/wrapper/kobalt-wrapper.properties +++ b/example/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=1.0.3 \ No newline at end of file +kobalt.version=1.0.5 \ No newline at end of file diff --git a/kobalt-versioneye.iml b/kobalt-versioneye.iml index d61d020..0f2eb63 100644 --- a/kobalt-versioneye.iml +++ b/kobalt-versioneye.iml @@ -5,8 +5,9 @@ - - + + + @@ -20,397 +21,10 @@ - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -426,9 +40,396 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/kobalt/Build.kt.iml b/kobalt/Build.kt.iml index f886e23..602ccaf 100644 --- a/kobalt/Build.kt.iml +++ b/kobalt/Build.kt.iml @@ -10,9 +10,18 @@ - + - + + + + + + + + + + diff --git a/kobalt/src/Build.kt b/kobalt/src/Build.kt index 56b00df..463d1ad 100644 --- a/kobalt/src/Build.kt +++ b/kobalt/src/Build.kt @@ -1,17 +1,35 @@ +import com.beust.kobalt.buildScript +import com.beust.kobalt.file +import com.beust.kobalt.misc.kobaltLog +import com.beust.kobalt.plugin.application.application import com.beust.kobalt.plugin.packaging.assemble import com.beust.kobalt.plugin.publish.bintray import com.beust.kobalt.project +import net.thauvin.erik.kobalt.plugin.versioneye.versionEye import org.apache.maven.model.Developer import org.apache.maven.model.License import org.apache.maven.model.Model import org.apache.maven.model.Scm +val semver = "0.4.4" + +val bs = buildScript { + val f = java.io.File("kobaltBuild/libs/kobalt-versioneye-$semver.jar") + val p = if (f.exists()) { + kobaltLog(1, " >>> Using: ${f.path}") + file(f.path) + } else { + "net.thauvin.erik:kobalt-versioneye:" + } + plugins(p) +} + val p = project { name = "kobalt-versioneye" group = "net.thauvin.erik" artifactId = name - version = "0.4.4" + version = semver pom = Model().apply { description = "VersionEye plug-in for the Kobalt build system." @@ -57,3 +75,58 @@ val p = project { publish = true } } + +val example = project(p) { + + name = "example" + group = "com.example" + artifactId = name + version = "0.1" + directory = "example" + + sourceDirectories { + path("src/main/kotlin") + } + + sourceDirectoriesTest { + path("src/test/kotlin") + } + + dependencies { + compile("com.beust:jcommander:1.47") + //compile("org.slf4j:slf4j-api:") + compile("ch.qos.logback:logback-core:0.5") + compile("ch.qos.logback:logback-classic:1.1.7") + compile("commons-httpclient:commons-httpclient:jar:3.1") + compile("com.beust:kobalt-plugin-api:0.878") + } + + + + dependenciesTest { + compile("org.testng:testng:") + } + + assemble { + jar { + } + } + + application { + mainClass = "com.example.MainKt" + } + + versionEye { + // baseUrl = "https://www.versioneye.com/" + // colors = true + // name = "" + // org = "" + // quiet = false + // team = "" + // verbose = true + // visibility = "public" + + //failOn(Fail.licensesUnknownCheck, Fail.licensesCheck, Fail.securityCheck, Fail.dependenciesCheck) + } +} + diff --git a/kobalt/wrapper/kobalt-wrapper.properties b/kobalt/wrapper/kobalt-wrapper.properties index 91fe49a..1ec9521 100644 --- a/kobalt/wrapper/kobalt-wrapper.properties +++ b/kobalt/wrapper/kobalt-wrapper.properties @@ -1 +1 @@ -kobalt.version=1.0.3 \ No newline at end of file +kobalt.version=1.0.5 \ No newline at end of file