-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added -g javac option & updated bin/scalafmt
- Loading branch information
Showing
9 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
Binary file not shown.
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
17 changes: 17 additions & 0 deletions
17
modules/sbt-plugin/src/sbt-test/debug-session/debug-java/build.sbt
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import ch.epfl.scala.debugadapter.testfmk._ | ||
|
||
val checkDebugJava = inputKey[Unit]("Check that the -g option has been added") | ||
|
||
def checkDebugJavaTask = Def.inputTask { | ||
val uri = (Compile / startMainClassDebugSession).evaluated | ||
val source = (Compile / sources).value.head.toPath | ||
implicit val context: TestingContext = TestingContext(source, "3.3.0") | ||
DebugTest.check(uri)(Breakpoint(source, 6), Evaluation.success("x", 1)) | ||
} | ||
|
||
lazy val debugJavaWithG = | ||
project | ||
.in(file("./withG")) | ||
.settings(javacOptions += "-g", checkDebugJava := checkDebugJavaTask.evaluated) | ||
|
||
lazy val debugJavaWithoutG = project.in(file("./withoutG")).settings(checkDebugJava := checkDebugJavaTask.evaluated) |
12 changes: 12 additions & 0 deletions
12
modules/sbt-plugin/src/sbt-test/debug-session/debug-java/project/plugins.sbt
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
val pluginVersion = sys.props | ||
.get("plugin.version") | ||
.getOrElse { | ||
sys.error( | ||
"""|The system property 'plugin.version' is not defined. | ||
|Specify this property using the scriptedLaunchOpts -D. | ||
|""".stripMargin | ||
) | ||
} | ||
|
||
addSbtPlugin("ch.epfl.scala" % "sbt-debug-adapter" % pluginVersion) | ||
libraryDependencies += "ch.epfl.scala" %% "scala-debug-adapter-test" % pluginVersion |
2 changes: 2 additions & 0 deletions
2
modules/sbt-plugin/src/sbt-test/debug-session/debug-java/project/project/plugins.sbt
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// required for [email protected] | ||
addSbtPlugin("org.scala-debugger" % "sbt-jdi-tools" % "1.1.1") |
2 changes: 2 additions & 0 deletions
2
modules/sbt-plugin/src/sbt-test/debug-session/debug-java/test
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
> 'debugJavaWithG / checkDebugJava {"class":"example.Main","arguments":[],"jvmOptions":[]}' | ||
> 'debugJavaWithoutG / checkDebugJava {"class":"example.Main","arguments":[],"jvmOptions":[]}' |
8 changes: 8 additions & 0 deletions
8
...es/sbt-plugin/src/sbt-test/debug-session/debug-java/withG/src/main/java/example/Main.java
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package example; | ||
|
||
public class Main { | ||
public static void main(String[] args) { | ||
var x = 1; | ||
System.out.println("Hello, world!"); | ||
} | ||
} |
8 changes: 8 additions & 0 deletions
8
...sbt-plugin/src/sbt-test/debug-session/debug-java/withoutG/src/main/java/example/Main.java
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package example; | ||
|
||
public class Main { | ||
public static void main(String[] args) { | ||
var x = 1; | ||
System.out.println("Hello, world!"); | ||
} | ||
} |