1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-27 00:38:11 -07:00

Better Java template.

This commit is contained in:
Cedric Beust 2016-02-27 19:08:37 -08:00
parent 68358201bf
commit 0f00887736
6 changed files with 96 additions and 8 deletions

View file

@ -1,5 +1,6 @@
import com.beust.kobalt.*
import com.beust.kobalt.plugin.packaging.assemble
import com.beust.kobalt.plugin.packaging.*
import com.beust.kobalt.plugin.application.*
{{imports}}
val repos = repos({{{repositories}}})
@ -35,7 +36,7 @@ val p = {{directive}} {
}
dependenciesTest {
// compile("org.testng:testng:6.9.5")
compile("org.testng:testng:6.9.9")
{{#testDependencies}}
compile("{{groupId}}:{{artifactId}}:{{version}}")
{{/testDependencies}}
@ -46,4 +47,10 @@ val p = {{directive}} {
jar {
}
}
application {
mainClass = "com.example.Example"
}
}

View file

@ -0,0 +1,9 @@
package {{packageName}};
import org.testng.annotations.Test;
public class ExampleTest {
@Test
public void f() {
System.out.println("Running test");
}
}

View file

@ -0,0 +1,7 @@
package {{packageName}};
class Example {
public static void main(String[] argv) {
System.out.println("Hello world");
}
}