summaryrefslogtreecommitdiff
path: root/build.sc
diff options
context:
space:
mode:
Diffstat (limited to 'build.sc')
-rwxr-xr-xbuild.sc20
1 files changed, 18 insertions, 2 deletions
diff --git a/build.sc b/build.sc
index b95d46ac..ed5415f8 100755
--- a/build.sc
+++ b/build.sc
@@ -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)
}
}