kotlin-starter
                                
                                 kotlin-starter copied to clipboard
                                
                                    kotlin-starter copied to clipboard
                            
                            
                            
                        🐠 A starter template for kotlin projects using Gradle Kotlin DSL!
Download
- 
Binary After download, make sure to set the execute permission ( chmod +x kotlin-starter).
Build
- 
Source $ git clone https://github.com/sureshg/kotlin-starter $ cd kotlin-starter $ ./gradlew makeExecutable -qThe binary would be located at build/libs/kotlin-starterInorder to build a new version, change appVersionin the gradle.properties or pass it to./gradlew -q -PappVersion=2.0.0
- 
API Doc The API docs would be generated under the docs, which can be published as GitHub Pages $ cd kotlin-starter $ ./gradlew dokka
- 
Github Release In order to publish the kotlin-starterbinary to Github, generate Github Access token$ export GITHUB_TOKEN=<token> $ cd kotlin-starter $ ./gradlew prepareRelease $ ./gradlew githubRelease -q
Usage
- 
Help $ kotlin-starter --help
Examples
- 
Generating AOT type-safe accessors in kotlin, $ ./gradlew kotlinDslAccessorsSnapshot
- 
Other Tasks # Run the main class. $ ./gradlew clean :run # Display project dependency $ ./gradlew dependencyInsight --dependency kotlin-stdlib --configuration compile $ ./gradlew dependencies # See task tree for build task $ ./gradlew :build :taskTree
Kotlin Build Script Compilation
Script compilation happens in 4 steps:
- Extract buildscriptblock, compile it against parent project classpath (up tobuildSrc), evaluate it against current project.
- Extract pluginsblock, compile it against the same classpath as the previous step, evaluate it against current project.
- MAGIC (generate Kotlin code based on information contributed by previous steps).
- Compile whole script against classpath contributed by previous steps.
**Require Java 8 or later
 Kotlin Starter
 Kotlin Starter