diff options
author | Andres Pipicello <andres.pipicello@olx.com> | 2019-06-18 15:25:16 -0300 |
---|---|---|
committer | Tobias Roeser <le.petit.fou@web.de> | 2019-06-28 08:37:39 +0200 |
commit | 1ae2061ca5ba6eecf18d4b17203717526d1b3d39 (patch) | |
tree | 9a232fd347701548ba44b84029f5b30f113225a0 /scalalib/test | |
parent | c2c64bbbc4034fdfbd9bc4da56f25fef3cd68f63 (diff) | |
download | mill-1ae2061ca5ba6eecf18d4b17203717526d1b3d39.tar.gz mill-1ae2061ca5ba6eecf18d4b17203717526d1b3d39.tar.bz2 mill-1ae2061ca5ba6eecf18d4b17203717526d1b3d39.zip |
Using mill source path instead of pwd
Diffstat (limited to 'scalalib/test')
4 files changed, 17 insertions, 18 deletions
diff --git a/scalalib/test/resources/gen-idea-hello-world/build.sc b/scalalib/test/resources/gen-idea-hello-world/build.sc index 53cd26a9..45ec2536 100644 --- a/scalalib/test/resources/gen-idea-hello-world/build.sc +++ b/scalalib/test/resources/gen-idea-hello-world/build.sc @@ -1,5 +1,4 @@ import mill.scalalib -import $ivy.`com.lihaoyi::mill-contrib-buildinfo:0.4.0` trait HelloWorldModule extends scalalib.ScalaModule { def scalaVersion = "2.12.4" diff --git a/scalalib/test/resources/gen-idea-hello-world/idea_modules/helloworld.iml b/scalalib/test/resources/gen-idea-hello-world/idea_modules/helloworld.iml index 38ea17be..6808e515 100644 --- a/scalalib/test/resources/gen-idea-hello-world/idea_modules/helloworld.iml +++ b/scalalib/test/resources/gen-idea-hello-world/idea_modules/helloworld.iml @@ -1,12 +1,12 @@ <module type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager"> - <output url="file://$MODULE_DIR$/../target/workspace/gen-idea-hello-world/out/HelloWorld/compile/dest/classes"/> + <output url="file://$MODULE_DIR$/../out/HelloWorld/compile/dest/classes"/> <exclude-output/> - <content url="file://$MODULE_DIR$/../target/workspace/gen-idea-hello-world/out/HelloWorld/generatedSources/dest"/> - <content url="file://$MODULE_DIR$/../target/workspace/gen-idea-hello-world/HelloWorld"> - <sourceFolder url="file://$MODULE_DIR$/../target/workspace/gen-idea-hello-world/HelloWorld/src" isTestSource="false"/> - <sourceFolder url="file://$MODULE_DIR$/../target/workspace/gen-idea-hello-world/HelloWorld/resources" type="java-resource"/> - <excludeFolder url="file://$MODULE_DIR$/../target/workspace/gen-idea-hello-world/HelloWorld/target"/> + <content url="file://$MODULE_DIR$/../out/HelloWorld/generatedSources/dest"/> + <content url="file://$MODULE_DIR$/../HelloWorld"> + <sourceFolder url="file://$MODULE_DIR$/../HelloWorld/src" isTestSource="false"/> + <sourceFolder url="file://$MODULE_DIR$/../HelloWorld/resources" type="java-resource"/> + <excludeFolder url="file://$MODULE_DIR$/../HelloWorld/target"/> </content> <orderEntry type="inheritedJdk"/> <orderEntry type="sourceFolder" forTests="false"/> diff --git a/scalalib/test/resources/gen-idea-hello-world/idea_modules/helloworld.test.iml b/scalalib/test/resources/gen-idea-hello-world/idea_modules/helloworld.test.iml index bfe0ff3c..26fac21d 100644 --- a/scalalib/test/resources/gen-idea-hello-world/idea_modules/helloworld.test.iml +++ b/scalalib/test/resources/gen-idea-hello-world/idea_modules/helloworld.test.iml @@ -1,12 +1,12 @@ <module type="JAVA_MODULE" version="4"> <component name="NewModuleRootManager"> - <output-test url="file://$MODULE_DIR$/../target/workspace/gen-idea-hello-world/out/HelloWorld/test/compile/dest/classes"/> + <output-test url="file://$MODULE_DIR$/../out/HelloWorld/test/compile/dest/classes"/> <exclude-output/> - <content url="file://$MODULE_DIR$/../target/workspace/gen-idea-hello-world/out/HelloWorld/test/generatedSources/dest"/> - <content url="file://$MODULE_DIR$/../target/workspace/gen-idea-hello-world/HelloWorld/test"> - <sourceFolder url="file://$MODULE_DIR$/../target/workspace/gen-idea-hello-world/HelloWorld/test/src" isTestSource="true"/> - <sourceFolder url="file://$MODULE_DIR$/../target/workspace/gen-idea-hello-world/HelloWorld/test/resources" type="java-test-resource"/> - <excludeFolder url="file://$MODULE_DIR$/../target/workspace/gen-idea-hello-world/HelloWorld/test/target"/> + <content url="file://$MODULE_DIR$/../out/HelloWorld/test/generatedSources/dest"/> + <content url="file://$MODULE_DIR$/../HelloWorld/test"> + <sourceFolder url="file://$MODULE_DIR$/../HelloWorld/test/src" isTestSource="true"/> + <sourceFolder url="file://$MODULE_DIR$/../HelloWorld/test/resources" type="java-test-resource"/> + <excludeFolder url="file://$MODULE_DIR$/../HelloWorld/test/target"/> </content> <orderEntry type="inheritedJdk"/> <orderEntry type="sourceFolder" forTests="false"/> diff --git a/scalalib/test/src/GenIdeaTests.scala b/scalalib/test/src/GenIdeaTests.scala index efd6381c..b7d3a257 100644 --- a/scalalib/test/src/GenIdeaTests.scala +++ b/scalalib/test/src/GenIdeaTests.scala @@ -13,17 +13,17 @@ object GenIdeaTests extends ScriptTestSuite(false) { Seq( s"$workspaceSlug/idea_modules/helloworld.iml" -> - os.pwd / ".idea_modules" /"helloworld.iml", + workspacePath / ".idea_modules" /"helloworld.iml", s"$workspaceSlug/idea_modules/helloworld.test.iml" -> - os.pwd / ".idea_modules" /"helloworld.test.iml", + workspacePath / ".idea_modules" /"helloworld.test.iml", // s"$workspaceSlug/idea_modules/mill-build.iml" -> // os.pwd / ".idea_modules" /"mill-build.iml", s"$workspaceSlug/idea/libraries/scala-library-2.12.4.jar.xml" -> - os.pwd / ".idea" / "libraries" / "scala-library-2.12.4.jar.xml", + workspacePath / ".idea" / "libraries" / "scala-library-2.12.4.jar.xml", s"$workspaceSlug/idea/modules.xml" -> - os.pwd / ".idea" / "modules.xml", + workspacePath / ".idea" / "modules.xml", s"$workspaceSlug/idea/misc.xml" -> - os.pwd / ".idea" / "misc.xml" + workspacePath / ".idea" / "misc.xml" ).foreach { case (resource, generated) => val resourceString = scala.io.Source.fromResource(resource).getLines().mkString("\n") val generatedString = normaliseLibraryPaths(os.read(generated)) |