Skip to content

Instantly share code, notes, and snippets.

@jangalinski
Last active July 23, 2018 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jangalinski/0358d57e56f06090945cc4b2ceddf7c9 to your computer and use it in GitHub Desktop.
Save jangalinski/0358d57e56f06090945cc4b2ceddf7c9 to your computer and use it in GitHub Desktop.
kotlin-gradle multimodule setup
#!/usr/bin/env bash
app_name=$1
kotlin_version=$2
mdir $app_name
cd $app_name
gradle init --dsl kotlin
mkdir -p buildSrc/src/main/kotlin
cat >buildSrc/build.gradle.kts <<'EOL'
plugins {
`kotlin-dsl`
}
...
EOL
cat >buildSrc/src/main/kotlin/Dependencies.kt <<'EOL'
object Versions {
val kotlin="$2"
}
...
EOL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment