Move property file under coursier namespace

Should make it move along the rest when shading coursier
This commit is contained in:
Alexandre Archambault 2017-05-15 15:32:48 +02:00
parent 9c7168fbc7
commit 5ca736b87a
3 changed files with 22 additions and 3 deletions

View File

@ -9,7 +9,7 @@ object Properties {
p.load(
getClass
.getClassLoader
.getResourceAsStream("coursier.properties")
.getResourceAsStream("coursier/coursier.properties")
)
p
}

View File

@ -73,12 +73,12 @@ object Settings {
resourceGenerators.in(Compile) += Def.task {
import sys.process._
val dir = target.value
val dir = classDirectory.in(Compile).value / "coursier"
val ver = version.value
val f = dir / "coursier.properties"
dir.mkdirs()
val p = new java.util.Properties
p.setProperty("version", ver)

View File

@ -0,0 +1,19 @@
package coursier.test
import coursier.util.Properties
import utest._
object PropertiesTests extends TestSuite {
val tests = TestSuite {
'version - {
assert(Properties.version.nonEmpty)
}
'commitHash - {
assert(Properties.commitHash.nonEmpty)
}
}
}