mirror of https://github.com/sbt/sbt.git
Move property file under coursier namespace
Should make it move along the rest when shading coursier
This commit is contained in:
parent
9c7168fbc7
commit
5ca736b87a
|
|
@ -9,7 +9,7 @@ object Properties {
|
|||
p.load(
|
||||
getClass
|
||||
.getClassLoader
|
||||
.getResourceAsStream("coursier.properties")
|
||||
.getResourceAsStream("coursier/coursier.properties")
|
||||
)
|
||||
p
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue