conner
05/19/2017, 4:58 AMblakelee
05/19/2017, 5:11 AMbuildscript {
ext.kotlin_version = '1.1.3-eap-34'
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
Then you only have to update have to update the ext version in one place. Because if you have something like this
dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
somewhere down there line where there are other kotlin dependencies then you only have to update oneconner
05/19/2017, 5:13 AMconner
05/19/2017, 5:13 AMconner
05/19/2017, 5:13 AMblakelee
05/19/2017, 5:13 AMblakelee
05/19/2017, 5:13 AMfun main(args : Array<String>) {...}
conner
05/19/2017, 5:17 AMconner
05/19/2017, 5:17 AMjar {
manifest {
attributes 'Main-Class': 'com.converc.ktor.MainKt'
}
// This line of code recursively collects and copies all of a project's files
// and adds them to the JAR itself. One can extend this task, to skip certain
// files or particular types at will
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
}
conner
05/19/2017, 5:17 AMblakelee
05/19/2017, 5:18 AMblakelee
05/19/2017, 5:20 AMconner
05/19/2017, 5:21 AMconner
05/19/2017, 5:21 AMblakelee
05/19/2017, 5:21 AM