diff --git a/pom.xml b/pom.xml index 0c3abee..f773939 100644 --- a/pom.xml +++ b/pom.xml @@ -78,6 +78,11 @@ ${junit.version} test + + org.jetbrains.kotlin + kotlin-stdlib-jre8 + ${kotlin.version} + @@ -100,8 +105,34 @@ - ${project.basedir}/src/main/kotlin - ${project.basedir}/src/test/kotlin + src/main/kotlin + src/test/kotlin + + + org.jetbrains.kotlin + kotlin-maven-plugin + ${kotlin.version} + + + compile + compile + + compile + + + + test-compile + test-compile + + test-compile + + + + + 1.8 + + + diff --git a/readme.md b/readme.md index 782aef4..921bc13 100644 --- a/readme.md +++ b/readme.md @@ -8,7 +8,7 @@ [![Version](https://img.shields.io/maven-central/v/com.github.atsushi130/builderkit.svg)](https://search.maven.org/#search|gav|1|g%3A"com.github.atsushi130"%20AND%20a%3A"builderkit") ## Usage -Implement Generator class to `/src/gen/kotlin`. +Implement Generator class to `/generate/src/`. ```kotlin class Generator { companion object { @@ -18,9 +18,9 @@ class Generator { } } ``` -Builder class is automatically generated to `src/gen/kotlin/` by default. +Builder class is automatically generated to `generate/src/` by default. -## Outout Builder class +## Output Builder class **Sample model class** ```kotlin data class ModelClass(val arg1: Int, val arg2: List, val arg3: MyClass) @@ -60,7 +60,7 @@ import java.io.File class Generator { companion object { @JvmStatic fun main(vararg args: String) { - val builder = BuilderGenerator(indent = "\t", path = File("src/gen/kotlin/")) + val builder = BuilderGenerator(indent = "\t", path = File("generate/src/")) builder.generates(ModelClass::class) } } diff --git a/src/main/kotlin/builderkit/BuilderGenerator.kt b/src/main/kotlin/builderkit/BuilderGenerator.kt index 2e02ed7..292b631 100644 --- a/src/main/kotlin/builderkit/BuilderGenerator.kt +++ b/src/main/kotlin/builderkit/BuilderGenerator.kt @@ -39,7 +39,7 @@ class BuilderGenerator(private val indent: String, private val path: File) { /** * Default output file path */ - private val path = File("src/gen/kotlin/") + private val path = File("generate/src") /** * Default indent