From 5c2ebd709caf54c5531306c5a5992d6442e6a33e Mon Sep 17 00:00:00 2001 From: atsushi130 Date: Wed, 31 Jan 2018 16:08:48 +0900 Subject: [PATCH 1/4] update pom --- pom.xml | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) 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 + + + From a417ac718975240fc56e247ce88e26fa4eff28b8 Mon Sep 17 00:00:00 2001 From: atsushi130 Date: Wed, 31 Jan 2018 16:09:00 +0900 Subject: [PATCH 2/4] fix typo --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 782aef4..d8f690b 100644 --- a/readme.md +++ b/readme.md @@ -20,7 +20,7 @@ class Generator { ``` Builder class is automatically generated to `src/gen/kotlin/` by default. -## Outout Builder class +## Output Builder class **Sample model class** ```kotlin data class ModelClass(val arg1: Int, val arg2: List, val arg3: MyClass) From 0396fa279c2880dd96a5276e47f4d1f5a2d59ac7 Mon Sep 17 00:00:00 2001 From: atsushi130 Date: Wed, 31 Jan 2018 16:11:42 +0900 Subject: [PATCH 3/4] fix output file path --- src/main/kotlin/builderkit/BuilderGenerator.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 1670e789dab0fa73e68b3d1dda349bed81c663ca Mon Sep 17 00:00:00 2001 From: atsushi130 Date: Wed, 31 Jan 2018 16:11:57 +0900 Subject: [PATCH 4/4] update readme --- readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index d8f690b..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,7 +18,7 @@ class Generator { } } ``` -Builder class is automatically generated to `src/gen/kotlin/` by default. +Builder class is automatically generated to `generate/src/` by default. ## Output Builder class **Sample model class** @@ -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) } }