summaryrefslogtreecommitdiff
path: root/scalalib/test/resources/gen-idea-extended-hello-world/build.sc
diff options
context:
space:
mode:
Diffstat (limited to 'scalalib/test/resources/gen-idea-extended-hello-world/build.sc')
-rw-r--r--scalalib/test/resources/gen-idea-extended-hello-world/build.sc44
1 files changed, 44 insertions, 0 deletions
diff --git a/scalalib/test/resources/gen-idea-extended-hello-world/build.sc b/scalalib/test/resources/gen-idea-extended-hello-world/build.sc
new file mode 100644
index 00000000..4d1affbb
--- /dev/null
+++ b/scalalib/test/resources/gen-idea-extended-hello-world/build.sc
@@ -0,0 +1,44 @@
+import mill.scalalib
+import mill.define.Command
+import mill.scalalib.GenIdeaModule._
+
+trait HelloWorldModule extends scalalib.ScalaModule {
+ def scalaVersion = "2.12.4"
+ object test extends super.Tests {
+ def testFrameworks = Seq("utest.runner.Framework")
+ }
+
+ def ideaJavaModuleFacets(ideaConfigVersion: Int): Command[Seq[JavaFacet]] = T.command {
+ ideaConfigVersion match {
+ case 4 =>
+ Seq(
+ JavaFacet("AspectJ", "AspectJ",
+ Element("configuration", childs = Seq(
+ Element("projectLibrary", childs = Seq(
+ Element("option", Map("name" -> "name", "value" -> "/tmp"))
+ ))
+ ))
+ )
+ )
+ }
+ }
+
+ override def ideaConfigFiles(ideaConfigVersion: Int): Command[Seq[IdeaConfigFile]] = T.command {
+ ideaConfigVersion match {
+ case 4 =>
+ Seq(
+ IdeaConfigFile(
+ name = "compiler.xml",
+ component = "AjcSettings",
+ config = Seq(Element("option", Map("name" -> "ajcPath", "value" -> "/tmp/aspectjtools.jar")))),
+ IdeaConfigFile(
+ name = "compiler.xml",
+ component = "CompilerConfiguration",
+ config = Seq(Element("option", Map("name" -> "DEFAULT_COMPILER", "value" -> "ajc")))
+ )
+ )
+ }
+ }
+}
+
+object HelloWorld extends HelloWorldModule