File tree Expand file tree Collapse file tree 8 files changed +34
-3
lines changed
main/scala/com/thoughtworks/deeplearning/sbtammoniteclasspath
sbt-test/sbt-ammonite-classpath/scalameta-version-conflict Expand file tree Collapse file tree 8 files changed +34
-3
lines changed Original file line number Diff line number Diff line change @@ -3,4 +3,5 @@ local.sbt
33secret /
44.metals /
55.bloop /
6+ .vscode /
67metals.sbt
Original file line number Diff line number Diff line change 1313jdk :
1414 - openjdk8
1515
16+ script :
17+ sbt ++$TRAVIS_SCALA_VERSION test scripted
18+
1619before_cache :
1720 - find $HOME/.sbt -name '*.lock' -delete
1821 - find $HOME/.ivy2 -name 'ivydata-*.properties' -delete
Original file line number Diff line number Diff line change 11sbtPlugin := true
22
3+ enablePlugins(SbtPlugin )
4+
5+ scriptedBufferLog := false
6+
7+ scriptedLaunchOpts := {
8+ scriptedLaunchOpts.value ++
9+ Seq (" -Xmx1024M" , " -Dplugin.version=" + version.value)
10+ }
11+
312organization in ThisBuild := " com.thoughtworks.deeplearning"
413
514libraryDependencies += " com.thoughtworks.dsl" %% " keywords-each" % " 1.5.3"
@@ -8,4 +17,4 @@ addCompilerPlugin("com.thoughtworks.dsl" %% "compilerplugins-bangnotation" % "1.
817
918addCompilerPlugin(" 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 "
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 1+ lazy val root = (project in file(" ." ))
2+ .settings(
3+ version := " 0.1" ,
4+ )
Original file line number Diff line number Diff line change 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" )
Original file line number Diff line number Diff line change 1+ object MainTest extends App {
2+ def x : String = " 5"
3+ def y : Int = 6
4+ println(" hello" )
5+ }
Original file line number Diff line number Diff line change 1+ # check if classpath script file gets created
2+ > compile:fullClasspath::exportToAmmoniteScript
3+ $ exists target/scala-2.12/fullClasspath-Compile.sc
You can’t perform that action at this time.
0 commit comments