diff options
author | Nikolay Tatarinov <5min4eq.unity@gmail.com> | 2018-06-01 11:18:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-01 11:18:00 +0300 |
commit | baf2295c6d99d32c61d56dac38adf08388b6cc07 (patch) | |
tree | e3ec3fcef37b7f3775a71c800816902dce956cfd /scalalib/test/resources/hello-world-multi | |
parent | 1b03026dd2009d4a6f3d25226b2f13bd5c42e8a4 (diff) | |
download | mill-baf2295c6d99d32c61d56dac38adf08388b6cc07.tar.gz mill-baf2295c6d99d32c61d56dac38adf08388b6cc07.tar.bz2 mill-baf2295c6d99d32c61d56dac38adf08388b6cc07.zip |
fix #233 add append and exclude rules to assembly (#309)
* fix #233 add append and exclude rules to assembly
* handle existing files and concatenation when file already exists in assembly
* add assembly tests for append rules
* tests for append patterns
* tests for exclude patterns
* make append algorithm use single map with fold over classpathIterator
* move assembly rules logic to method
* move grouping method to Assembly object, make assemblyRules Seq[_] rather than T[Seq[_]]
* add test cases for when there are no rules
* keep default parameter in createAssembly not to break CI
* add one more reference.conf entry to tests
Diffstat (limited to 'scalalib/test/resources/hello-world-multi')
4 files changed, 21 insertions, 0 deletions
diff --git a/scalalib/test/resources/hello-world-multi/core/resources/reference.conf b/scalalib/test/resources/hello-world-multi/core/resources/reference.conf new file mode 100644 index 00000000..afb44467 --- /dev/null +++ b/scalalib/test/resources/hello-world-multi/core/resources/reference.conf @@ -0,0 +1,4 @@ +############################## +# Core Reference Config File # +############################## +bar.baz=hello diff --git a/scalalib/test/resources/hello-world-multi/core/src/Main.scala b/scalalib/test/resources/hello-world-multi/core/src/Main.scala new file mode 100644 index 00000000..5cbb75cf --- /dev/null +++ b/scalalib/test/resources/hello-world-multi/core/src/Main.scala @@ -0,0 +1,5 @@ +object Main extends App { + val person = Person.fromString("rockjam:25") + println(s"hello ${person.name}, your age is: ${person.age}") +} + diff --git a/scalalib/test/resources/hello-world-multi/model/resources/reference.conf b/scalalib/test/resources/hello-world-multi/model/resources/reference.conf new file mode 100644 index 00000000..8e7ed298 --- /dev/null +++ b/scalalib/test/resources/hello-world-multi/model/resources/reference.conf @@ -0,0 +1,4 @@ +############################### +# Model Reference Config File # +############################### +foo.bar=2 diff --git a/scalalib/test/resources/hello-world-multi/model/src/Person.scala b/scalalib/test/resources/hello-world-multi/model/src/Person.scala new file mode 100644 index 00000000..23e3821e --- /dev/null +++ b/scalalib/test/resources/hello-world-multi/model/src/Person.scala @@ -0,0 +1,8 @@ +object Person { + def fromString(s: String): Person = { + val Array(name, age) = s.split(":") + Person(name, age.toInt) + } +} +case class Person(name: String, age: Int) + |