Changed plugin name from kobalt-exec to Exec.
This commit is contained in:
parent
9b72faa565
commit
a6dfa2ba07
7 changed files with 35 additions and 69 deletions
5
.idea/kobalt.xml
generated
5
.idea/kobalt.xml
generated
|
@ -17,11 +17,6 @@
|
|||
<option name="autoDownloadKobalt" value="true" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$/example" />
|
||||
<option name="kobaltHome" value="$USER_HOME$/.kobalt/wrapper/dist/kobalt-0.843" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$/example" />
|
||||
</set>
|
||||
</option>
|
||||
<option name="useAutoImport" value="true" />
|
||||
</KobaltProjectSettings>
|
||||
</option>
|
||||
|
|
1
.idea/modules.xml
generated
1
.idea/modules.xml
generated
|
@ -3,7 +3,6 @@
|
|||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<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$/kobalt-exec.iml" filepath="$PROJECT_DIR$/kobalt-exec.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
|
|
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,28 +0,0 @@
|
|||
<?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">
|
||||
<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/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/kotlin" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/kotlin" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/kobaltBuild" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: file://.\..\libs\kobalt-exec-0.1.jar">
|
||||
<CLASSES>
|
||||
<root url="jar://$MODULE_DIR$/../libs/kobalt-exec-0.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
|
@ -2,7 +2,7 @@ import com.beust.kobalt.*
|
|||
import com.beust.kobalt.plugin.packaging.*
|
||||
import com.beust.kobalt.plugin.application.*
|
||||
import com.beust.kobalt.plugin.java.*
|
||||
//import net.thauvin.erik.kobalt.plugin.exec.*
|
||||
import net.thauvin.erik.kobalt.plugin.exec.*
|
||||
|
||||
val p = project {
|
||||
|
||||
|
@ -20,7 +20,7 @@ val p = project {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
compile(file("../libs/kobalt-exec-0.1.jar"))
|
||||
compile(file("../kobaltBuild/libs/kobalt-exec-0.1.jar"))
|
||||
}
|
||||
|
||||
dependenciesTest {
|
||||
|
|
|
@ -16,36 +16,18 @@
|
|||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module-library">
|
||||
<library name="Kobalt: com.beust:kobalt:jar:0.725">
|
||||
<library name="Kobalt: com.beust:kobalt-plugin-api:jar:0.842">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/repository/com/beust/kobalt/0.725/kobalt-0.725.jar!/" />
|
||||
<root url="jar://$USER_HOME$/.kobalt/repository/com/beust/kobalt-plugin-api/0.842/kobalt-plugin-api-0.842.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Kobalt: org.testng:testng:jar:(0,]">
|
||||
<library name="Kobalt: org.apache.ant:ant:jar:1.7.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/repository/org/testng/testng/6.9.12/testng-6.9.12.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Kobalt: org.apache.ant:ant-launcher:jar:1.7.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/repository/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Kobalt: org.beanshell:bsh:jar:2.0b4">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/repository/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar!/" />
|
||||
<root url="jar://$USER_HOME$/.kobalt/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
@ -61,9 +43,27 @@
|
|||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Kobalt: org.apache.ant:ant:jar:1.7.0">
|
||||
<library name="Kobalt: org.beanshell:bsh:jar:2.0b4">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/repository/org/apache/ant/ant/1.7.0/ant-1.7.0.jar!/" />
|
||||
<root url="jar://$USER_HOME$/.kobalt/repository/org/beanshell/bsh/2.0b4/bsh-2.0b4.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Kobalt: org.apache.ant:ant-launcher:jar:1.7.0">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/repository/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="Kobalt: org.testng:testng:jar:(0,]">
|
||||
<CLASSES>
|
||||
<root url="jar://$USER_HOME$/.kobalt/repository/org/testng/testng/6.9.12/testng-6.9.12.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
|
|
|
@ -39,12 +39,6 @@ import com.beust.kobalt.misc.log
|
|||
|
||||
class ExecPlugin : BasePlugin(), ITaskContributor {
|
||||
|
||||
/*
|
||||
fun main(argv: Array<String>) {
|
||||
com.beust.kobalt.main(argv)
|
||||
}
|
||||
*/
|
||||
|
||||
// ITaskContributor
|
||||
override fun tasksFor(project: Project, context: KobaltContext): List<DynamicTask> {
|
||||
return emptyList()
|
||||
|
@ -52,18 +46,18 @@ class ExecPlugin : BasePlugin(), ITaskContributor {
|
|||
|
||||
|
||||
companion object {
|
||||
const val NAME: String = "kobalt-exec"
|
||||
const val NAME: String = "Exec"
|
||||
}
|
||||
|
||||
override val name = NAME
|
||||
|
||||
@Task(name = "exec", description = "Executes a command line process.")
|
||||
@Task(name = "exec", description = "Execute a command line process.")
|
||||
fun taskExec(project: Project): TaskResult {
|
||||
return executeCommands(project)
|
||||
}
|
||||
|
||||
private fun executeCommands(project: Project): TaskResult {
|
||||
var success = false
|
||||
var success = true
|
||||
val config = configs[project.name]
|
||||
|
||||
if (config != null) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue