diff --git a/build.sbt b/build.sbt index 4647d28..18ce4df 100644 --- a/build.sbt +++ b/build.sbt @@ -10,5 +10,16 @@ lazy val root = (project in file(".")). version := appVersion )), name := "mlflow-gocd", - libraryDependencies ++= Seq(goPluginLibrary, gson, apacheCommons, httpClient, scalaTest) + libraryDependencies ++= Seq(goPluginLibrary, gson, apacheCommons, httpClient, scalaTest), + resourceGenerators in Compile += Def.task { + val inputFile = baseDirectory.value / "template" / "plugin.xml" + val outputFile = (resourceManaged in Compile).value / "plugin.xml" + val contents = IO.read(inputFile) + IO.write(outputFile, contents.replaceAll("\\$\\{version\\}", appVersion)) + Seq(outputFile) + }.taskValue, + mappings in (Compile, packageBin) += { + (resourceManaged in Compile).value / "plugin.xml" -> "plugin.xml" + }, + javacOptions ++= Seq("-source", "1.8", "-target", "1.8") ) diff --git a/template/plugin.xml b/template/plugin.xml new file mode 100644 index 0000000..1eaee71 --- /dev/null +++ b/template/plugin.xml @@ -0,0 +1,18 @@ + + + + MLFlow Package Plugin + ${version} + 17.2.0 + MLFlow as package source for GoCD + + Indix + http://www.indix.com + + + Linux + Mac OS X + Windows + + + \ No newline at end of file