2018-05-05 23:34:35 +00:00
|
|
|
import java.io.{File, FileNotFoundException, FileOutputStream}
|
|
|
|
import java.util.zip._
|
2018-04-22 23:13:32 +00:00
|
|
|
|
2018-06-30 13:11:17 +00:00
|
|
|
lazy val i2pVersion = "0.9.35"
|
2018-04-22 23:13:32 +00:00
|
|
|
|
2018-05-02 03:39:14 +00:00
|
|
|
lazy val cleanAllTask = taskKey[Unit]("Clean up and remove the OSX bundle")
|
2018-04-24 04:18:21 +00:00
|
|
|
lazy val buildAppBundleTask = taskKey[Unit](s"Build an Mac OS X bundle for I2P ${i2pVersion}.")
|
2018-05-05 23:34:35 +00:00
|
|
|
lazy val buildDeployZipTask = taskKey[String](s"Build an zipfile with base directory for I2P ${i2pVersion}.")
|
|
|
|
lazy val bundleBuildPath = new File("./output")
|
2018-04-24 04:18:21 +00:00
|
|
|
|
|
|
|
|
|
|
|
lazy val resDir = new File("./../installer/resources")
|
2018-05-02 03:39:14 +00:00
|
|
|
lazy val i2pBuildDir = new File("./../pkg-temp")
|
|
|
|
lazy val warsForCopy = new File(i2pBuildDir, "webapps").list.filter { f => f.endsWith(".war") }
|
|
|
|
lazy val jarsForCopy = new File(i2pBuildDir, "lib").list.filter { f => f.endsWith(".jar") }
|
|
|
|
|
2018-05-01 03:21:04 +00:00
|
|
|
|
|
|
|
// Unmanaged classpath will be available at compile time
|
|
|
|
unmanagedClasspath in Compile ++= Seq(
|
2018-07-13 10:10:04 +00:00
|
|
|
baseDirectory.value / ".." / ".." / "pkg-temp" / "lib" / "router.jar",
|
|
|
|
baseDirectory.value / ".." / ".." / "pkg-temp" / "lib" / "i2p.jar"
|
2018-05-02 03:39:14 +00:00
|
|
|
)
|
|
|
|
|
2018-07-13 10:10:04 +00:00
|
|
|
unmanagedBase in Compile := baseDirectory.value / ".." / ".." / "pkg-temp" / "lib"
|
|
|
|
|
2018-07-08 13:16:07 +00:00
|
|
|
assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = false, includeDependency = false)
|
2018-05-01 03:21:04 +00:00
|
|
|
|
2018-05-02 03:39:14 +00:00
|
|
|
assemblyExcludedJars in assembly := {
|
2018-07-13 06:30:16 +00:00
|
|
|
val cp = (fullClasspath in assembly).value
|
|
|
|
cp filter { c => jarsForCopy.toList.contains(c.data.getName) }
|
2018-05-02 03:39:14 +00:00
|
|
|
}
|
2018-05-01 03:21:04 +00:00
|
|
|
|
2018-07-13 10:10:04 +00:00
|
|
|
javacOptions ++= Seq("-source", "1.7", "-target", "1.7")
|
|
|
|
scalacOptions in Compile := Seq("-deprecated","-target:jvm-1.7")
|
2018-07-13 06:30:16 +00:00
|
|
|
|