Add serialization deps
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package starter
|
||||
|
||||
enum class Category {
|
||||
Server, Injection, Database, Test, Other
|
||||
Server, Injection, Database, Serialization, Test, Other
|
||||
}
|
||||
|
||||
enum class Scope {
|
||||
|
||||
@@ -11,6 +11,7 @@ class PomTemplate(private val engine: PebbleEngine) : Template {
|
||||
override fun render(project: Project): String {
|
||||
val args: MutableMap<String, Any?> = mutableMapOf(
|
||||
"dependencies" to project.dependencies.sortedBy { it.scope },
|
||||
"kotlinxSerialization" to project.dependencies.any { it.name == "Kotlinx-serialization" },
|
||||
)
|
||||
|
||||
project.inputs.forEach {
|
||||
|
||||
@@ -20,5 +20,19 @@
|
||||
</executions>
|
||||
<configuration>
|
||||
<jvmTarget>${java.version}</jvmTarget>
|
||||
{% if kotlinxSerialization %}
|
||||
<compilerPlugins>
|
||||
<plugin>kotlinx-serialization</plugin>
|
||||
</compilerPlugins>
|
||||
{% endif %}
|
||||
</configuration>
|
||||
</plugin>
|
||||
{% if kotlinxSerialization %}
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jetbrains.kotlin</groupId>
|
||||
<artifactId>kotlin-maven-serialization</artifactId>
|
||||
<version>${kotlin.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
{% endif %}
|
||||
</plugin>
|
||||
|
||||
Reference in New Issue
Block a user