summaryrefslogtreecommitdiff
path: root/scalalib/test/resources
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2018-01-20 03:49:17 -0800
committerLi Haoyi <haoyi.sg@gmail.com>2018-01-20 03:49:17 -0800
commitd14f56a3fd881f809e58783c49866d1491a5f3fe (patch)
tree4a9f93d3d7f69211aa444ce15837fe6e79b9db7f /scalalib/test/resources
parentaebd7a144fab5bdb95f6ee4f4bc170be65cd0549 (diff)
downloadmill-d14f56a3fd881f809e58783c49866d1491a5f3fe.tar.gz
mill-d14f56a3fd881f809e58783c49866d1491a5f3fe.tar.bz2
mill-d14f56a3fd881f809e58783c49866d1491a5f3fe.zip
Swap over to simplified Mill module/source layout from SBT's
Removes a lot of useless folders and gives us a chance to exercise this simplified layout. Support for the SBT layout is still verified by our integration tests
Diffstat (limited to 'scalalib/test/resources')
-rw-r--r--scalalib/test/resources/gen-idea/idea/libraries/modules_scala-xml_2.12_1.0.6_scala-xml_2.12-1.0.6-sources.jar.xml7
-rw-r--r--scalalib/test/resources/gen-idea/idea/libraries/modules_scala-xml_2.12_1.0.6_scala-xml_2.12-1.0.6.jar.xml7
-rw-r--r--scalalib/test/resources/gen-idea/idea/libraries/scala-compiler_2.12.4_scala-compiler-2.12.4-sources.jar.xml7
-rw-r--r--scalalib/test/resources/gen-idea/idea/libraries/scala-compiler_2.12.4_scala-compiler-2.12.4.jar.xml7
-rw-r--r--scalalib/test/resources/gen-idea/idea/libraries/scala-library_2.12.4_scala-library-2.12.4-sources.jar.xml7
-rw-r--r--scalalib/test/resources/gen-idea/idea/libraries/scala-library_2.12.4_scala-library-2.12.4.jar.xml7
-rw-r--r--scalalib/test/resources/gen-idea/idea/libraries/scala-reflect_2.12.4_scala-reflect-2.12.4-sources.jar.xml7
-rw-r--r--scalalib/test/resources/gen-idea/idea/libraries/scala-reflect_2.12.4_scala-reflect-2.12.4.jar.xml7
-rw-r--r--scalalib/test/resources/gen-idea/idea/misc.xml5
-rw-r--r--scalalib/test/resources/gen-idea/idea/modules.xml8
-rw-r--r--scalalib/test/resources/gen-idea/idea_modules/iml22
-rw-r--r--scalalib/test/resources/gen-idea/idea_modules/root.iml9
-rw-r--r--scalalib/test/resources/hello-world/src/Main.scala12
-rw-r--r--scalalib/test/resources/hello-world/src/Result.scala7
14 files changed, 119 insertions, 0 deletions
diff --git a/scalalib/test/resources/gen-idea/idea/libraries/modules_scala-xml_2.12_1.0.6_scala-xml_2.12-1.0.6-sources.jar.xml b/scalalib/test/resources/gen-idea/idea/libraries/modules_scala-xml_2.12_1.0.6_scala-xml_2.12-1.0.6-sources.jar.xml
new file mode 100644
index 00000000..a6398d46
--- /dev/null
+++ b/scalalib/test/resources/gen-idea/idea/libraries/modules_scala-xml_2.12_1.0.6_scala-xml_2.12-1.0.6-sources.jar.xml
@@ -0,0 +1,7 @@
+<component name="libraryTable">
+ <library name="modules_scala-xml_2.12_1.0.6_scala-xml_2.12-1.0.6-sources.jar">
+ <CLASSES>
+ <root url="jar:COURSIER_HOME/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-xml_2.12/1.0.6/scala-xml_2.12-1.0.6-sources.jar!/"/>
+ </CLASSES>
+ </library>
+</component> \ No newline at end of file
diff --git a/scalalib/test/resources/gen-idea/idea/libraries/modules_scala-xml_2.12_1.0.6_scala-xml_2.12-1.0.6.jar.xml b/scalalib/test/resources/gen-idea/idea/libraries/modules_scala-xml_2.12_1.0.6_scala-xml_2.12-1.0.6.jar.xml
new file mode 100644
index 00000000..5e21f3f3
--- /dev/null
+++ b/scalalib/test/resources/gen-idea/idea/libraries/modules_scala-xml_2.12_1.0.6_scala-xml_2.12-1.0.6.jar.xml
@@ -0,0 +1,7 @@
+<component name="libraryTable">
+ <library name="modules_scala-xml_2.12_1.0.6_scala-xml_2.12-1.0.6.jar">
+ <CLASSES>
+ <root url="jar:COURSIER_HOME/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/modules/scala-xml_2.12/1.0.6/scala-xml_2.12-1.0.6.jar!/"/>
+ </CLASSES>
+ </library>
+</component> \ No newline at end of file
diff --git a/scalalib/test/resources/gen-idea/idea/libraries/scala-compiler_2.12.4_scala-compiler-2.12.4-sources.jar.xml b/scalalib/test/resources/gen-idea/idea/libraries/scala-compiler_2.12.4_scala-compiler-2.12.4-sources.jar.xml
new file mode 100644
index 00000000..fe9d533a
--- /dev/null
+++ b/scalalib/test/resources/gen-idea/idea/libraries/scala-compiler_2.12.4_scala-compiler-2.12.4-sources.jar.xml
@@ -0,0 +1,7 @@
+<component name="libraryTable">
+ <library name="scala-compiler_2.12.4_scala-compiler-2.12.4-sources.jar">
+ <CLASSES>
+ <root url="jar:COURSIER_HOME/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.4/scala-compiler-2.12.4-sources.jar!/"/>
+ </CLASSES>
+ </library>
+</component> \ No newline at end of file
diff --git a/scalalib/test/resources/gen-idea/idea/libraries/scala-compiler_2.12.4_scala-compiler-2.12.4.jar.xml b/scalalib/test/resources/gen-idea/idea/libraries/scala-compiler_2.12.4_scala-compiler-2.12.4.jar.xml
new file mode 100644
index 00000000..ec0460d7
--- /dev/null
+++ b/scalalib/test/resources/gen-idea/idea/libraries/scala-compiler_2.12.4_scala-compiler-2.12.4.jar.xml
@@ -0,0 +1,7 @@
+<component name="libraryTable">
+ <library name="scala-compiler_2.12.4_scala-compiler-2.12.4.jar">
+ <CLASSES>
+ <root url="jar:COURSIER_HOME/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.4/scala-compiler-2.12.4.jar!/"/>
+ </CLASSES>
+ </library>
+</component> \ No newline at end of file
diff --git a/scalalib/test/resources/gen-idea/idea/libraries/scala-library_2.12.4_scala-library-2.12.4-sources.jar.xml b/scalalib/test/resources/gen-idea/idea/libraries/scala-library_2.12.4_scala-library-2.12.4-sources.jar.xml
new file mode 100644
index 00000000..a1278e29
--- /dev/null
+++ b/scalalib/test/resources/gen-idea/idea/libraries/scala-library_2.12.4_scala-library-2.12.4-sources.jar.xml
@@ -0,0 +1,7 @@
+<component name="libraryTable">
+ <library name="scala-library_2.12.4_scala-library-2.12.4-sources.jar">
+ <CLASSES>
+ <root url="jar:COURSIER_HOME/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.4/scala-library-2.12.4-sources.jar!/"/>
+ </CLASSES>
+ </library>
+</component> \ No newline at end of file
diff --git a/scalalib/test/resources/gen-idea/idea/libraries/scala-library_2.12.4_scala-library-2.12.4.jar.xml b/scalalib/test/resources/gen-idea/idea/libraries/scala-library_2.12.4_scala-library-2.12.4.jar.xml
new file mode 100644
index 00000000..bbd957f0
--- /dev/null
+++ b/scalalib/test/resources/gen-idea/idea/libraries/scala-library_2.12.4_scala-library-2.12.4.jar.xml
@@ -0,0 +1,7 @@
+<component name="libraryTable">
+ <library name="scala-library_2.12.4_scala-library-2.12.4.jar">
+ <CLASSES>
+ <root url="jar:COURSIER_HOME/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.4/scala-library-2.12.4.jar!/"/>
+ </CLASSES>
+ </library>
+</component> \ No newline at end of file
diff --git a/scalalib/test/resources/gen-idea/idea/libraries/scala-reflect_2.12.4_scala-reflect-2.12.4-sources.jar.xml b/scalalib/test/resources/gen-idea/idea/libraries/scala-reflect_2.12.4_scala-reflect-2.12.4-sources.jar.xml
new file mode 100644
index 00000000..09db75bb
--- /dev/null
+++ b/scalalib/test/resources/gen-idea/idea/libraries/scala-reflect_2.12.4_scala-reflect-2.12.4-sources.jar.xml
@@ -0,0 +1,7 @@
+<component name="libraryTable">
+ <library name="scala-reflect_2.12.4_scala-reflect-2.12.4-sources.jar">
+ <CLASSES>
+ <root url="jar:COURSIER_HOME/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.12.4/scala-reflect-2.12.4-sources.jar!/"/>
+ </CLASSES>
+ </library>
+</component> \ No newline at end of file
diff --git a/scalalib/test/resources/gen-idea/idea/libraries/scala-reflect_2.12.4_scala-reflect-2.12.4.jar.xml b/scalalib/test/resources/gen-idea/idea/libraries/scala-reflect_2.12.4_scala-reflect-2.12.4.jar.xml
new file mode 100644
index 00000000..f23b80f6
--- /dev/null
+++ b/scalalib/test/resources/gen-idea/idea/libraries/scala-reflect_2.12.4_scala-reflect-2.12.4.jar.xml
@@ -0,0 +1,7 @@
+<component name="libraryTable">
+ <library name="scala-reflect_2.12.4_scala-reflect-2.12.4.jar">
+ <CLASSES>
+ <root url="jar:COURSIER_HOME/cache/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-reflect/2.12.4/scala-reflect-2.12.4.jar!/"/>
+ </CLASSES>
+ </library>
+</component> \ No newline at end of file
diff --git a/scalalib/test/resources/gen-idea/idea/misc.xml b/scalalib/test/resources/gen-idea/idea/misc.xml
new file mode 100644
index 00000000..2726692f
--- /dev/null
+++ b/scalalib/test/resources/gen-idea/idea/misc.xml
@@ -0,0 +1,5 @@
+<project version="4">
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8 (1)" project-jdk-type="JavaSDK">
+ <output url="file://$PROJECT_DIR$/target/idea_output"/>
+ </component>
+</project> \ No newline at end of file
diff --git a/scalalib/test/resources/gen-idea/idea/modules.xml b/scalalib/test/resources/gen-idea/idea/modules.xml
new file mode 100644
index 00000000..374b9a1f
--- /dev/null
+++ b/scalalib/test/resources/gen-idea/idea/modules.xml
@@ -0,0 +1,8 @@
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/.idea_modules/root.iml" filepath="$PROJECT_DIR$/.idea_modules/root.iml"/>
+ <module fileurl="file://$PROJECT_DIR$/.idea_modules/.iml" filepath="$PROJECT_DIR$/.idea_modules/.iml"/>
+ </modules>
+ </component>
+</project> \ No newline at end of file
diff --git a/scalalib/test/resources/gen-idea/idea_modules/iml b/scalalib/test/resources/gen-idea/idea_modules/iml
new file mode 100644
index 00000000..548865f1
--- /dev/null
+++ b/scalalib/test/resources/gen-idea/idea_modules/iml
@@ -0,0 +1,22 @@
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager">
+ <output url="file://$MODULE_DIR$/../target/workspace/gen-idea/out/compile/dest/classes"/>
+ <exclude-output/>
+ <content url="file://$MODULE_DIR$/../target/workspace/hello-world/src/src">
+ <sourceFolder url="file://$MODULE_DIR$/../target/workspace/hello-world/src/src" isTestSource="false"/>
+ </content>
+ <content url="file://$MODULE_DIR$/../target/workspace/hello-world/src/resources">
+ <sourceFolder url="file://$MODULE_DIR$/../target/workspace/hello-world/src/resources" isTestSource="false" type="java-resource"/>
+ </content>
+ <orderEntry type="inheritedJdk"/>
+ <orderEntry type="sourceFolder" forTests="false"/>
+ <orderEntry type="library" name="modules_scala-xml_2.12_1.0.6_scala-xml_2.12-1.0.6-sources.jar" level="project"/>
+ <orderEntry type="library" name="modules_scala-xml_2.12_1.0.6_scala-xml_2.12-1.0.6.jar" level="project"/>
+ <orderEntry type="library" name="scala-compiler_2.12.4_scala-compiler-2.12.4-sources.jar" level="project"/>
+ <orderEntry type="library" name="scala-compiler_2.12.4_scala-compiler-2.12.4.jar" level="project"/>
+ <orderEntry type="library" name="scala-library_2.12.4_scala-library-2.12.4-sources.jar" level="project"/>
+ <orderEntry type="library" name="scala-library_2.12.4_scala-library-2.12.4.jar" level="project"/>
+ <orderEntry type="library" name="scala-reflect_2.12.4_scala-reflect-2.12.4-sources.jar" level="project"/>
+ <orderEntry type="library" name="scala-reflect_2.12.4_scala-reflect-2.12.4.jar" level="project"/>
+ </component>
+</module> \ No newline at end of file
diff --git a/scalalib/test/resources/gen-idea/idea_modules/root.iml b/scalalib/test/resources/gen-idea/idea_modules/root.iml
new file mode 100644
index 00000000..dcf5f7fc
--- /dev/null
+++ b/scalalib/test/resources/gen-idea/idea_modules/root.iml
@@ -0,0 +1,9 @@
+<module type="JAVA_MODULE" version="4">
+ <component name="NewModuleRootManager">
+ <output url="file://$MODULE_DIR$/../out"/>
+ <content url="file://$MODULE_DIR$/.."/>
+ <exclude-output/>
+ <orderEntry type="inheritedJdk"/>
+ <orderEntry type="sourceFolder" forTests="false"/>
+ </component>
+</module> \ No newline at end of file
diff --git a/scalalib/test/resources/hello-world/src/Main.scala b/scalalib/test/resources/hello-world/src/Main.scala
new file mode 100644
index 00000000..14139d6f
--- /dev/null
+++ b/scalalib/test/resources/hello-world/src/Main.scala
@@ -0,0 +1,12 @@
+import scala.collection._ // unused import to check unused imports warning
+import java.nio.file.{Files, Paths}
+
+object Main extends App {
+
+ val person = Person.fromString("rockjam:25")
+ val greeting = s"hello ${person.name}, your age is: ${person.age}"
+ println(greeting)
+ val resultPath = Paths.get(args(0))
+ Files.createDirectories(resultPath.getParent)
+ Files.write(resultPath, greeting.getBytes)
+}
diff --git a/scalalib/test/resources/hello-world/src/Result.scala b/scalalib/test/resources/hello-world/src/Result.scala
new file mode 100644
index 00000000..d7d29a51
--- /dev/null
+++ b/scalalib/test/resources/hello-world/src/Result.scala
@@ -0,0 +1,7 @@
+object Person {
+ def fromString(s: String): Person = {
+ val Array(name, age) = s.split(":")
+ Person(name, age.toInt)
+ }
+}
+case class Person(name: String, age: Int)