Skip to content

Commit 1801409

Browse files
authored
Merge pull request #51 from ciuncan/master
Bump scalameta version from 1.7.0 to 4.3.21
2 parents 54344b9 + 04b88be commit 1801409

File tree

8 files changed

+34
-3
lines changed

8 files changed

+34
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ local.sbt
33
secret/
44
.metals/
55
.bloop/
6+
.vscode/
67
metals.sbt

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ scala:
1313
jdk:
1414
- openjdk8
1515

16+
script:
17+
sbt ++$TRAVIS_SCALA_VERSION test scripted
18+
1619
before_cache:
1720
- find $HOME/.sbt -name '*.lock' -delete
1821
- find $HOME/.ivy2 -name 'ivydata-*.properties' -delete

build.sbt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
sbtPlugin := true
22

3+
enablePlugins(SbtPlugin)
4+
5+
scriptedBufferLog := false
6+
7+
scriptedLaunchOpts := {
8+
scriptedLaunchOpts.value ++
9+
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
10+
}
11+
312
organization in ThisBuild := "com.thoughtworks.deeplearning"
413

514
libraryDependencies += "com.thoughtworks.dsl" %% "keywords-each" % "1.5.3"
@@ -8,4 +17,4 @@ addCompilerPlugin("com.thoughtworks.dsl" %% "compilerplugins-bangnotation" % "1.
817

918
addCompilerPlugin("com.thoughtworks.dsl" %% "compilerplugins-reseteverywhere" % "1.5.3")
1019

11-
libraryDependencies += "org.scalameta" %% "scalameta" % "1.7.0"
20+
libraryDependencies += "org.scalameta" %% "scalameta" % "4.3.21"

src/main/scala/com/thoughtworks/deeplearning/sbtammoniteclasspath/AmmoniteClasspath.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ object AmmoniteClasspath extends AutoPlugin {
5252
val classpathKey = !Each(allClasspathKeys)
5353

5454
Seq(
55-
configuration / classpathKey / exportToAmmoniteScript := {
55+
configuration / classpathKey / exportToAmmoniteScript := {
5656
val code = {
5757
def ammonitePaths = List {
5858
q"_root_.ammonite.ops.Path(${(!Each((configuration / classpathKey).value)).data.toString})"
@@ -102,7 +102,7 @@ object AmmoniteClasspath extends AutoPlugin {
102102
private def runTask(
103103
ammConf: Configuration,
104104
backingConf: Configuration,
105-
classpath: TaskKey[Classpath],
105+
classpath: TaskKey[sbt.Keys.Classpath],
106106
scalaRun: Def.Initialize[Task[ScalaRun]],
107107
): Def.Initialize[Task[Unit]] = {
108108
import Def.parserToInput
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
lazy val root = (project in file("."))
2+
.settings(
3+
version := "0.1",
4+
)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
sys.props.get("plugin.version") match {
2+
case Some(x) => addSbtPlugin("com.thoughtworks.deeplearning" % "sbt-ammonite-classpath" % x)
3+
case _ => sys.error("""|The system property 'plugin.version' is not defined.
4+
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
5+
}
6+
addSbtPlugin("com.github.tkawachi" % "sbt-doctest" % "0.9.7")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
object MainTest extends App {
2+
def x: String = "5"
3+
def y: Int = 6
4+
println("hello")
5+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# check if classpath script file gets created
2+
> compile:fullClasspath::exportToAmmoniteScript
3+
$ exists target/scala-2.12/fullClasspath-Compile.sc

0 commit comments

Comments
 (0)