diff options
Diffstat (limited to 'build.sc')
-rwxr-xr-x | build.sc | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -92,14 +92,30 @@ object main extends MillModule { def ivyDeps = Agg( // Keep synchronized with ammonite in Versions.scala - ivy"com.lihaoyi:::ammonite:1.6.7", + ivy"com.lihaoyi:::ammonite:1.6.9", // Necessary so we can share the JNA classes throughout the build process ivy"net.java.dev.jna:jna:4.5.0", ivy"net.java.dev.jna:jna-platform:4.5.0" ) def generatedSources = T { - Seq(PathRef(shared.generateCoreSources(T.ctx().dest))) + val dest = T.ctx().dest + val version = publishVersion() + writeBuildInfo(dest, version) + shared.generateCoreSources(dest) + Seq(PathRef(dest)) + } + + def writeBuildInfo(dir : os.Path, version : String) = { + val code = s""" + |package mill + | + |object BuildInfo { + | val millVersion = "$version" + |} + """.stripMargin.trim + + os.write(dir / "BuildInfo.scala", code) } } |