Added examples to main build file.
This commit is contained in:
parent
c4a59b86c3
commit
f823f3be8c
14 changed files with 135 additions and 42 deletions
6
.idea/encodings.xml
generated
6
.idea/encodings.xml
generated
|
@ -1,6 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="PROJECT" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
10
.idea/inspectionProfiles/Project_Default.xml
generated
10
.idea/inspectionProfiles/Project_Default.xml
generated
|
@ -1,8 +1,9 @@
|
|||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<option name="myLocal" value="true" />
|
||||
<inspection_tool class="AndroidLintNewerVersionAvailable" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="FieldMayBeFinal" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="GroovyVariableCanBeFinal" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="JavaDoc" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="TOP_LEVEL_CLASS_OPTIONS">
|
||||
<value>
|
||||
|
@ -36,17 +37,18 @@
|
|||
</inspection_tool>
|
||||
<inspection_tool class="LocalCanBeFinal" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="REPORT_VARIABLES" value="true" />
|
||||
<option name="REPORT_PARAMETERS" value="false" />
|
||||
<option name="REPORT_PARAMETERS" value="true" />
|
||||
<option name="REPORT_CATCH_PARAMETERS" value="false" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger" />
|
||||
<option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger" />
|
||||
</inspection_tool>
|
||||
<inspection_tool class="NonFinalUtilityClass" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||
<inspection_tool class="UnnecessarySemicolon" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="WeakerAccess" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<inspection_tool class="WeakerAccess" enabled="false" level="WARNING" enabled_by_default="false">
|
||||
<option name="SUGGEST_PACKAGE_LOCAL_FOR_MEMBERS" value="true" />
|
||||
<option name="SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES" value="false" />
|
||||
<option name="SUGGEST_PACKAGE_LOCAL_FOR_TOP_CLASSES" value="true" />
|
||||
<option name="SUGGEST_PRIVATE_FOR_INNERS" value="false" />
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
|
|
12
.idea/kobalt.xml
generated
12
.idea/kobalt.xml
generated
|
@ -5,23 +5,13 @@
|
|||
<KobaltProjectSettings>
|
||||
<option name="autoDownloadKobalt" value="true" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="kobaltHome" value="$USER_HOME$/.kobalt/wrapper/dist/kobalt-1.0.3" />
|
||||
<option name="kobaltHome" value="$USER_HOME$/.kobalt/wrapper/dist/kobalt-1.0.5" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
</set>
|
||||
</option>
|
||||
</KobaltProjectSettings>
|
||||
<KobaltProjectSettings>
|
||||
<option name="autoDownloadKobalt" value="true" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/example" />
|
||||
<option name="kobaltHome" value="$USER_HOME$/.kobalt/wrapper/dist/kobalt-1.0.3" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$/example" />
|
||||
</set>
|
||||
</option>
|
||||
</KobaltProjectSettings>
|
||||
</option>
|
||||
</component>
|
||||
</project>
|
4
.idea/misc.xml
generated
4
.idea/misc.xml
generated
|
@ -1,6 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" project-jdk-name="1.8.x" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/kobaltBuild/classes" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_6" project-jdk-name="1.8.x" project-jdk-type="JavaSDK" />
|
||||
</project>
|
2
.idea/modules.xml
generated
2
.idea/modules.xml
generated
|
@ -2,7 +2,7 @@
|
|||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/example/kobalt/Build.kt.iml" filepath="$PROJECT_DIR$/example/kobalt/Build.kt.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/kobalt/Build.kt.iml" filepath="$PROJECT_DIR$/kobalt/Build.kt.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/example/example.iml" filepath="$PROJECT_DIR$/example/example.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/example/example2.iml" filepath="$PROJECT_DIR$/example/example2.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/kobalt-exec.iml" filepath="$PROJECT_DIR$/kobalt-exec.iml" />
|
||||
|
|
2
.idea/vcs.xml
generated
2
.idea/vcs.xml
generated
|
@ -4,7 +4,5 @@
|
|||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.id="example" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="KOBALT" type="JAVA_MODULE" version="4">
|
||||
<module external.linked.project.id="example" external.linked.project.path="$MODULE_DIR$/.." external.root.project.path="$MODULE_DIR$/.." external.system.id="KOBALT" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/kobaltBuild/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/kobaltBuild/test-classes" />
|
||||
<output url="file://$MODULE_DIR$/../kobaltBuild/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/../kobaltBuild/test-classes" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
|
@ -11,5 +11,6 @@
|
|||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="kobalt-exec" />
|
||||
</component>
|
||||
</module>
|
|
@ -1,8 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.id="example2" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$" external.system.id="KOBALT" type="JAVA_MODULE" version="4">
|
||||
<module external.linked.project.id="example2" external.linked.project.path="$MODULE_DIR$/.." external.root.project.path="$MODULE_DIR$/.." external.system.id="KOBALT" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/kobaltBuild/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/kobaltBuild/test-classes" />
|
||||
<output url="file://$MODULE_DIR$/../kobaltBuild/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/../kobaltBuild/test-classes" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
|
@ -11,5 +11,6 @@
|
|||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="kobalt-exec" />
|
||||
</component>
|
||||
</module>
|
|
@ -1,10 +1,13 @@
|
|||
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.exec.*
|
||||
|
||||
// ./kobaltw exec
|
||||
// ./kobaltw example:exec
|
||||
// ./kobaltw example2:exec
|
||||
|
||||
val bs = buildScript {
|
||||
//plugins(file("../kobaltBuild/libs/kobalt-exec-0.6.3.jar"))
|
||||
plugins("net.thauvin.erik:kobalt-exec:")
|
||||
}
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
kobalt.version=1.0.3
|
||||
kobalt.version=1.0.5
|
|
@ -5,8 +5,9 @@
|
|||
<output-test url="file://$MODULE_DIR$/kobaltBuild/test-classes" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/kotlin" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/kotlin" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/kobaltBuild" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
|
|
40
kobalt/Build.kt.iml
Normal file
40
kobalt/Build.kt.iml
Normal file
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module external.linked.project.id="Build.kt" external.linked.project.path="$MODULE_DIR$/.." external.root.project.path="$MODULE_DIR$/.." external.system.id="KOBALT" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="false">
|
||||
<output url="file://$MODULE_DIR$/../kobaltBuild/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/../kobaltBuild/test-classes" />
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: kobalt-versioneye-0.4.3-beta.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/cache/net/thauvin/erik/kobalt-versioneye/0.4.3-beta/kobalt-versioneye-0.4.3-beta.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: kobalt-exec-0.6.3.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../kobaltBuild/libs/kobalt-exec-0.6.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: com.beust.kobalt:kobalt:jar:1.0.5">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/wrapper/dist/kobalt-1.0.5/kobalt/wrapper/kobalt-1.0.5.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
|
@ -1,15 +1,29 @@
|
|||
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.exec.Os
|
||||
import net.thauvin.erik.kobalt.plugin.exec.exec
|
||||
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.6.3"
|
||||
|
||||
val bs = buildScript {
|
||||
plugins("net.thauvin.erik:kobalt-versioneye:")
|
||||
val f = java.io.File("kobaltBuild/libs/kobalt-exec-$semver.jar")
|
||||
val p = if (f.exists()) {
|
||||
kobaltLog(1, " >>> Using: ${f.path}")
|
||||
file(f.path)
|
||||
} else {
|
||||
"net.thauvin.erik:kobalt-exec:"
|
||||
}
|
||||
plugins("net.thauvin.erik:kobalt-versioneye:", p)
|
||||
}
|
||||
|
||||
val dev = false
|
||||
|
@ -20,7 +34,7 @@ val p = project {
|
|||
name = "kobalt-exec"
|
||||
group = "net.thauvin.erik"
|
||||
artifactId = name
|
||||
version = "0.6.3"
|
||||
version = semver
|
||||
|
||||
pom = Model().apply {
|
||||
description = "Command Line Execution plug-in for the Kobalt build system."
|
||||
|
@ -71,3 +85,54 @@ val p = project {
|
|||
team = "Owners"
|
||||
}
|
||||
}
|
||||
|
||||
val example = project(p) {
|
||||
|
||||
name = "example"
|
||||
group = "com.example"
|
||||
artifactId = name
|
||||
version = "0.1"
|
||||
directory = ("example")
|
||||
|
||||
sourceDirectories {
|
||||
path("src/main/java")
|
||||
}
|
||||
|
||||
sourceDirectoriesTest {
|
||||
path("src/test/java")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
}
|
||||
|
||||
dependenciesTest {
|
||||
}
|
||||
|
||||
assemble {
|
||||
jar {
|
||||
}
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass = "com.example.Main"
|
||||
}
|
||||
|
||||
exec {
|
||||
commandLine(listOf("echo", "Test Example 1"), os = setOf(Os.LINUX))
|
||||
commandLine(listOf("cmd", "/c", "echo", "Test Example 1"), os = setOf(Os.WINDOWS))
|
||||
commandLine(args = listOf("ls", "-l"), dir = "../libs", os = setOf(Os.LINUX))
|
||||
commandLine(args = listOf("cmd", "/c", "dir /Q"), dir = "../libs", os = setOf(Os.WINDOWS))
|
||||
}
|
||||
}
|
||||
|
||||
val example2 = project(p) {
|
||||
name = "example2"
|
||||
directory = "example"
|
||||
|
||||
exec {
|
||||
commandLine(listOf("cmd", "/c", "echo", "Test Example 2"), os = setOf(Os.WINDOWS))
|
||||
commandLine(listOf("echo", "Test example 2"), os = setOf(Os.LINUX))
|
||||
//commandLine(listOf("cmd", "/c", "tasklist | find \"cmd.exe\""), os = setOf(Os.WINDOWS), fail = setOf(Fail.NONE))
|
||||
commandLine(listOf("/bin/sh", "-c", "ps aux | grep bash"), os = setOf(Os.LINUX))
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
kobalt.version=1.0.3
|
||||
kobalt.version=1.0.5
|
Loading…
Add table
Add a link
Reference in a new issue