forked from pfn/kotlin-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
acf6564
commit bc6ed30
Showing
22 changed files
with
69 additions
and
57 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
{ | ||
val ver = System.getProperty("plugin.version") | ||
if (ver == null) | ||
throw new RuntimeException(""" | ||
|The system property 'plugin.version' is not defined. | ||
|Specify this property using scriptedLaunchOpts -Dplugin.version.""" | ||
.stripMargin) | ||
else addSbtPlugin("org.jetbrains.scala" % "sbt-kotlin-plugin" % ver) | ||
} | ||
sys.props.get("plugin.version") match { | ||
case Some(version) => addSbtPlugin("org.jetbrains.scala" % "sbt-kotlin-plugin" % version) | ||
case _ => sys.error( | ||
"""The system property 'plugin.version' is not defined. | ||
|Specify this property using the scriptedLaunchOpts -Dplugin.version.""".stripMargin) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,3 @@ package demo | |
fun main(args: Array<String>) { | ||
println("Hello, world!") | ||
} | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,4 +8,4 @@ class SimpleTest { | |
assertEquals(4, 2 + 2) | ||
} | ||
|
||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
> compile | ||
> test | ||
> "checkTestPass SimpleTest" | ||
> checkTestPass "SimpleTest" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import kotlin.Keys._ | ||
|
||
kotlinLib("stdlib") | ||
|
||
val listClasses = taskKey[Unit]("listClasses") | ||
|
||
listClasses := { | ||
val classes = (classDirectory in Compile).value.listFiles() | ||
val classes = (Compile / classDirectory).value.listFiles() | ||
streams.value.log.info("classes: " + classes) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
{ | ||
val ver = System.getProperty("plugin.version") | ||
if (ver == null) | ||
throw new RuntimeException(""" | ||
|The system property 'plugin.version' is not defined. | ||
|Specify this property using scriptedLaunchOpts -Dplugin.version.""" | ||
.stripMargin) | ||
else addSbtPlugin("org.jetbrains.scala" % "sbt-kotlin-plugin" % ver) | ||
} | ||
sys.props.get("plugin.version") match { | ||
case Some(version) => addSbtPlugin("org.jetbrains.scala" % "sbt-kotlin-plugin" % version) | ||
case _ => sys.error( | ||
"""The system property 'plugin.version' is not defined. | ||
|Specify this property using the scriptedLaunchOpts -Dplugin.version.""".stripMargin) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import kotlin.Keys._ | ||
|
||
kotlinLib("stdlib") | ||
|
||
kotlinVersion := "1.2.71" | ||
|
||
val listClasses = taskKey[Unit]("listClasses") | ||
|
||
listClasses := { | ||
val classes = (classDirectory in Compile).value.listFiles() | ||
val classes = (Compile / classDirectory).value.listFiles() | ||
streams.value.log.info("classes: " + classes) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
addSbtPlugin("org.jetbrains.scala" % "sbt-kotlin-plugin" % sys.props("plugin.version")) | ||
sys.props.get("plugin.version") match { | ||
case Some(version) => addSbtPlugin("org.jetbrains.scala" % "sbt-kotlin-plugin" % version) | ||
case _ => sys.error( | ||
"""The system property 'plugin.version' is not defined. | ||
|Specify this property using the scriptedLaunchOpts -Dplugin.version.""".stripMargin) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import kotlin.Keys._ | ||
|
||
kotlinLib("stdlib") | ||
|
||
kotlinVersion := "1.3.41" | ||
|
||
val listClasses = taskKey[Unit]("listClasses") | ||
|
||
listClasses := { | ||
val classes = (classDirectory in Compile).value.listFiles() | ||
val classes = (Compile / classDirectory).value.listFiles() | ||
streams.value.log.info("classes: " + classes) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
addSbtPlugin("org.jetbrains.scala" % "sbt-kotlin-plugin" % sys.props("plugin.version")) | ||
sys.props.get("plugin.version") match { | ||
case Some(version) => addSbtPlugin("org.jetbrains.scala" % "sbt-kotlin-plugin" % version) | ||
case _ => sys.error( | ||
"""The system property 'plugin.version' is not defined. | ||
|Specify this property using the scriptedLaunchOpts -Dplugin.version.""".stripMargin) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
import kotlin.Keys._ | ||
|
||
kotlinLib("stdlib") | ||
|
||
kotlinVersion := "1.3.21" | ||
|
||
val listClasses = taskKey[Unit]("listClasses") | ||
|
||
listClasses := { | ||
val classes = (classDirectory in Compile).value.listFiles() | ||
val classes = (Compile / classDirectory).value.listFiles() | ||
streams.value.log.info("classes: " + classes) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
addSbtPlugin("org.jetbrains.scala" % "sbt-kotlin-plugin" % sys.props("plugin.version")) | ||
sys.props.get("plugin.version") match { | ||
case Some(version) => addSbtPlugin("org.jetbrains.scala" % "sbt-kotlin-plugin" % version) | ||
case _ => sys.error( | ||
"""The system property 'plugin.version' is not defined. | ||
|Specify this property using the scriptedLaunchOpts -Dplugin.version.""".stripMargin) | ||
} |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
{ | ||
val ver = System.getProperty("plugin.version") | ||
if (ver == null) | ||
throw new RuntimeException(""" | ||
|The system property 'plugin.version' is not defined. | ||
|Specify this property using scriptedLaunchOpts -Dplugin.version.""" | ||
.stripMargin) | ||
else addSbtPlugin("org.jetbrains.scala" % "sbt-kotlin-plugin" % ver) | ||
} | ||
sys.props.get("plugin.version") match { | ||
case Some(version) => addSbtPlugin("org.jetbrains.scala" % "sbt-kotlin-plugin" % version) | ||
case _ => sys.error( | ||
"""The system property 'plugin.version' is not defined. | ||
|Specify this property using the scriptedLaunchOpts -Dplugin.version.""".stripMargin) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ class MixedTest { | |
assertEquals(4, calculator.sum(2, 2)) | ||
} | ||
|
||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
> compile | ||
> test | ||
> "checkTestPass MixedTest" | ||
> checkTestPass "MixedTest" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
import kotlin.Keys._ | ||
|
||
kotlinLib("stdlib") | ||
|
||
kotlincOptions += "-verbose" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,6 @@ | ||
{ | ||
val ver = System.getProperty("plugin.version") | ||
if (ver == null) | ||
throw new RuntimeException(""" | ||
|The system property 'plugin.version' is not defined. | ||
|Specify this property using scriptedLaunchOpts -Dplugin.version.""" | ||
.stripMargin) | ||
else addSbtPlugin("org.jetbrains.scala" % "sbt-kotlin-plugin" % ver) | ||
sys.props.get("plugin.version") match { | ||
case Some(version) => addSbtPlugin("org.jetbrains.scala" % "sbt-kotlin-plugin" % version) | ||
case _ => sys.error( | ||
"""The system property 'plugin.version' is not defined. | ||
|Specify this property using the scriptedLaunchOpts -Dplugin.version.""".stripMargin) | ||
} | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
|
||
println("Hello from Kotlin script") | ||
println("Hello from Kotlin script") |
This file contains 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