File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed
libs/javalib/test/src/mill/javalib Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 1- //| mill-version: 1.1.0-RC3-169-6882c4
1+ //| mill-version: 1.1.0-RC3-156-47444a
22//| mill-jvm-opts: ["-XX:NonProfiledCodeHeapSize=250m", "-XX:ReservedCodeCacheSize=500m"]
33//| mill-opts: ["--jobs=0.5C", "-DMILL_ENABLE_STATIC_CHECKS=true"]
44
Original file line number Diff line number Diff line change @@ -122,6 +122,12 @@ object ResolveDepsTests extends TestSuite {
122122 }
123123 }
124124
125+ object sources extends JavaModule {
126+ def mvnDeps = Seq (
127+ mvn " com.lihaoyi:geny_2.13:1.0.0 "
128+ )
129+ }
130+
125131 lazy val millDiscover = Discover [this .type ]
126132 }
127133
@@ -306,5 +312,21 @@ object ResolveDepsTests extends TestSuite {
306312 assert(dependsOnForcedAndNonForcedClassPathFileNames == expectedClassPathFileNames(" 4.6.1" ))
307313 }
308314 }
315+
316+ test(" resolvedMvnDepsSources" ) {
317+ UnitTester (TestCase , null ).scoped { eval =>
318+ val Right (result) = eval(TestCase .sources.resolvedMvnDepsSources): @ unchecked
319+ val sourcesDir = result.value.path
320+
321+ // Check that the sources directory exists and contains unpacked source files
322+ assert(os.exists(sourcesDir))
323+ assert(os.isDir(sourcesDir))
324+
325+ // Check that geny source files are unpacked (geny has a Geny.scala file)
326+ val scalaFiles = os.walk(sourcesDir).filter(_.ext == " scala" )
327+ assert(scalaFiles.nonEmpty)
328+ assert(scalaFiles.exists(_.last == " Geny.scala" ))
329+ }
330+ }
309331 }
310332}
You can’t perform that action at this time.
0 commit comments