Add tests dependencies
This commit is contained in:
@@ -18,7 +18,8 @@ class Config {
|
||||
values["artifactId"],
|
||||
values["version"],
|
||||
values.getOrElse("default", false),
|
||||
values.getEnumOrElse("category", Category.Other)
|
||||
values.getEnumOrElse("category", Category.Other),
|
||||
values.getEnumOrElse("scope", Scope.Compile),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
package starter
|
||||
|
||||
enum class Category {
|
||||
Server, Database, Other
|
||||
Server, Database, Test, Other
|
||||
}
|
||||
|
||||
enum class Scope {
|
||||
Compile, Test
|
||||
}
|
||||
|
||||
data class Dependency(
|
||||
@@ -11,5 +15,7 @@ data class Dependency(
|
||||
val version: String,
|
||||
val default: Boolean,
|
||||
val category: Category,
|
||||
val scope: Scope
|
||||
)
|
||||
|
||||
data class Input(val name: String, val display: String, val value: String? = null)
|
||||
@@ -24,7 +24,7 @@ class Views(private val engine: PebbleEngine) {
|
||||
fun pom(dependencies: List<Dependency>, inputs: List<Input>): String {
|
||||
|
||||
val args: MutableMap<String, Any?> = mutableMapOf(
|
||||
"dependencies" to dependencies,
|
||||
"dependencies" to dependencies.sortedBy { it.scope },
|
||||
)
|
||||
|
||||
inputs.forEach {
|
||||
|
||||
Reference in New Issue
Block a user