Last active
November 24, 2016 12:48
-
-
Save hmhmsh/2c3e598951b25157a3bf5f08054907af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
buildscript { | |
ext.kotlin_version = '1.0.5' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" | |
} | |
} | |
apply plugin: 'kotlin' | |
apply plugin: 'application' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" | |
} | |
sourceSets { | |
main.java.srcDirs += './' | |
} | |
defaultTasks 'run' | |
run { | |
if (project.hasProperty('main')) { | |
main(project.main.replace(".kt", "Kt").capitalize()) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 例 | |
fun hello(): String = "HELLO" | |
fun main(args: Array<String>) { | |
println(hello()) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"file_regex": "^(...*?):([0-9]*):?([0-9]*)", | |
"selector": ["source.kt"], | |
"shell_cmd": "gradle -Pmain=\"${file_name}\"" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment