sbt/project/Release.scala

32 lines
1.0 KiB
Scala
Raw Normal View History

2014-05-01 18:50:07 +02:00
import sbt._
import Keys._
import com.typesafe.sbt.JavaVersionCheckPlugin.autoImport._
2015-04-20 07:20:23 +02:00
import _root_.bintray.BintrayPlugin.autoImport._
import _root_.bintray.InternalBintrayKeys._
2014-05-01 18:50:07 +02:00
2015-04-20 07:20:23 +02:00
object Release {
2014-05-01 18:50:07 +02:00
lazy val launcherRemotePath = SettingKey[String]("launcher-remote-path")
2017-04-21 09:14:31 +02:00
lazy val deployLauncher = TaskKey[Unit](
"deploy-launcher",
"Upload the launcher to its traditional location for compatibility with existing scripts.")
2014-05-01 18:50:07 +02:00
def launcherSettings(launcher: TaskKey[File]): Seq[Setting[_]] = Seq(
2016-05-08 22:45:20 +02:00
launcherRemotePath := {
val organizationPath = organization.value.replaceAll("""\.""", "/")
s"$organizationPath/${moduleName.value}/${version.value}/${moduleName.value}.jar"
},
2015-04-20 07:20:23 +02:00
deployLauncher := {
val repo = bintrayRepo.value
2017-04-21 09:14:31 +02:00
repo.upload(bintrayPackage.value,
version.value,
launcherRemotePath.value,
launcher.value,
sLog.value)
2014-05-01 18:50:07 +02:00
}
2015-04-20 07:20:23 +02:00
)
def javaVersionCheckSettings = Seq(
2016-09-26 16:07:42 +02:00
javaVersionPrefix in javaVersionCheck := Some("1.8")
)
}