summaryrefslogtreecommitdiff
path: root/scalalib/test
diff options
context:
space:
mode:
authorOlivier Mélois <baccata64@gmail.com>2018-05-31 02:22:40 +0100
committerLi Haoyi <haoyi.sg@gmail.com>2018-05-30 18:22:40 -0700
commit1b03026dd2009d4a6f3d25226b2f13bd5c42e8a4 (patch)
treeafab4b39e02f718e22b12f5b510e3c5b52b1ad99 /scalalib/test
parent5766840e1978b5db7612020c64d2dd33967175d2 (diff)
downloadmill-1b03026dd2009d4a6f3d25226b2f13bd5c42e8a4.tar.gz
mill-1b03026dd2009d4a6f3d25226b2f13bd5c42e8a4.tar.bz2
mill-1b03026dd2009d4a6f3d25226b2f13bd5c42e8a4.zip
Improve Intellij Idea support (#351)
* Improve Intellij Idea support Improves the Intellij Idea support in various ways : * Cherrypicks the idea conf that needs deleting rather than deleting the whole .idea directory. That directory contains elements of configuration like VCS reference that were annoying to set again every time mill regenerated idea config. * Attempts to retrieve libraries that the build depends on by inspecting the classloader of the top module * Attempts at grouping jars and sources together in order to have both in the same idea files, which appears to give better jump to definition * Hacks the library names for the libraries the build depends on, in order to match Intellij's ammonite support and not show red to the user about the library that has successfuly been resolved. Also allows to jump to the library sources from the magic import. * Remove un-necessary filters * Avoid Agg throwing because of duplicated build libraries * Removing hardcoded version from SBT idea module names
Diffstat (limited to 'scalalib/test')
-rw-r--r--scalalib/test/resources/gen-idea/idea/libraries/scala-library-2.12.4-sources.jar.xml7
-rw-r--r--scalalib/test/resources/gen-idea/idea/libraries/scala-library-2.12.4.jar.xml3
-rw-r--r--scalalib/test/src/mill/scalalib/GenIdeaTests.scala2
3 files changed, 3 insertions, 9 deletions
diff --git a/scalalib/test/resources/gen-idea/idea/libraries/scala-library-2.12.4-sources.jar.xml b/scalalib/test/resources/gen-idea/idea/libraries/scala-library-2.12.4-sources.jar.xml
deleted file mode 100644
index e8af8eb1..00000000
--- a/scalalib/test/resources/gen-idea/idea/libraries/scala-library-2.12.4-sources.jar.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-<component name="libraryTable">
- <library name="scala-library-2.12.4-sources.jar" type="Scala">
- <CLASSES>
- <root url="jar://COURSIER_HOME/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.4/scala-library-2.12.4-sources.jar!/"/>
- </CLASSES>
- </library>
-</component>
diff --git a/scalalib/test/resources/gen-idea/idea/libraries/scala-library-2.12.4.jar.xml b/scalalib/test/resources/gen-idea/idea/libraries/scala-library-2.12.4.jar.xml
index d45f3206..5f6d7263 100644
--- a/scalalib/test/resources/gen-idea/idea/libraries/scala-library-2.12.4.jar.xml
+++ b/scalalib/test/resources/gen-idea/idea/libraries/scala-library-2.12.4.jar.xml
@@ -3,5 +3,8 @@
<CLASSES>
<root url="jar://COURSIER_HOME/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.4/scala-library-2.12.4.jar!/"/>
</CLASSES>
+ <SOURCES>
+ <root url="jar://COURSIER_HOME/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.12.4/scala-library-2.12.4-sources.jar!/"/>
+ </SOURCES>
</library>
</component>
diff --git a/scalalib/test/src/mill/scalalib/GenIdeaTests.scala b/scalalib/test/src/mill/scalalib/GenIdeaTests.scala
index b21c070c..db70a325 100644
--- a/scalalib/test/src/mill/scalalib/GenIdeaTests.scala
+++ b/scalalib/test/src/mill/scalalib/GenIdeaTests.scala
@@ -43,8 +43,6 @@ object GenIdeaTests extends TestSuite {
millSourcePath / "generated" / ".idea_modules" /"mill-build.iml",
"gen-idea/idea/libraries/scala-library-2.12.4.jar.xml" ->
millSourcePath / "generated" / ".idea" / "libraries" / "scala-library-2.12.4.jar.xml",
- "gen-idea/idea/libraries/scala-library-2.12.4-sources.jar.xml" ->
- millSourcePath / "generated" / ".idea" / "libraries" / "scala-library-2.12.4-sources.jar.xml",
"gen-idea/idea/modules.xml" ->
millSourcePath / "generated" / ".idea" / "modules.xml",
"gen-idea/idea/misc.xml" ->