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:
parent
68358201bf
commit
0f00887736
6 changed files with 96 additions and 8 deletions
|
@ -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"
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
9
src/main/resources/templates/java/java-test.mustache
Normal file
9
src/main/resources/templates/java/java-test.mustache
Normal file
|
@ -0,0 +1,9 @@
|
|||
package {{packageName}};
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
public class ExampleTest {
|
||||
@Test
|
||||
public void f() {
|
||||
System.out.println("Running test");
|
||||
}
|
||||
}
|
7
src/main/resources/templates/java/java.mustache
Normal file
7
src/main/resources/templates/java/java.mustache
Normal file
|
@ -0,0 +1,7 @@
|
|||
package {{packageName}};
|
||||
|
||||
class Example {
|
||||
public static void main(String[] argv) {
|
||||
System.out.println("Hello world");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue