Skip to content

Commit

Permalink
Merge pull request #51 from ciuncan/master
Browse files Browse the repository at this point in the history
Bump scalameta version from 1.7.0 to 4.3.21
  • Loading branch information
Atry authored Sep 2, 2020
2 parents 54344b9 + 04b88be commit 1801409
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ local.sbt
secret/
.metals/
.bloop/
.vscode/
metals.sbt
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ scala:
jdk:
- openjdk8

script:
sbt ++$TRAVIS_SCALA_VERSION test scripted

before_cache:
- find $HOME/.sbt -name '*.lock' -delete
- find $HOME/.ivy2 -name 'ivydata-*.properties' -delete
Expand Down
11 changes: 10 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
sbtPlugin := true

enablePlugins(SbtPlugin)

scriptedBufferLog := false

scriptedLaunchOpts := {
scriptedLaunchOpts.value ++
Seq("-Xmx1024M", "-Dplugin.version=" + version.value)
}

organization in ThisBuild := "com.thoughtworks.deeplearning"

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

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

libraryDependencies += "org.scalameta" %% "scalameta" % "1.7.0"
libraryDependencies += "org.scalameta" %% "scalameta" % "4.3.21"
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ object AmmoniteClasspath extends AutoPlugin {
val classpathKey = !Each(allClasspathKeys)

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

0 comments on commit 1801409

Please sign in to comment.