Cleaned up in SBT build file. Sorted assignments, task definitions and such.

This commit is contained in:
meeh
2018-05-01 03:21:04 +00:00
parent 2d15f8e16e
commit 975d8a069a

View File

@@ -20,13 +20,40 @@ lazy val staticFiles = List(
"webapps.config"
)
// Pointing the resources directory to the "installer" directory
resourceDirectory in Compile := baseDirectory.value / ".." / ".." / "installer" / "resources"
lazy val resDir = new File("./../installer/resources")
lazy val i2pBuildDir = new File("./../build")
lazy val warsForCopy = i2pBuildDir.list.filter { f => f.endsWith(".war") }
lazy val jarsForCopy = i2pBuildDir.list.filter { f => f.endsWith(".jar") }
// Pointing the resources directory to the "installer" directory
resourceDirectory in Compile := baseDirectory.value / ".." / ".." / "installer" / "resources"
// Unmanaged classpath will be available at compile time
unmanagedClasspath in Compile ++= Seq(
baseDirectory.value / ".." / ".." / "build" / "*.jar",
baseDirectory.value / ".." / ".." / "router" / "java" / "src"
)
// Please note the difference between browserbundle, this has
// the "in Compile" which limit it's scope to that.
//unmanagedBase in Compile := baseDirectory.value / ".." / ".." / "build"
libraryDependencies ++= Seq(
"net.i2p" % "router" % i2pVersion % Compile
)
//assemblyOption in assembly := (assemblyOption in assembly).value.copy(prependShellScript = Some(defaultShellScript))
assemblyJarName in assembly := s"${name.value}-${version.value}"
// TODO: MEEH: Add assemblyExcludedJars and load the router from own jar files, to handle upgrades better.
// In fact, most likely the bundle never would need an update except for the router jars/wars.
convertToICNSTask := {
println("TODO")
}
@@ -60,22 +87,3 @@ buildAppBundleTask := {
warsForCopy.map { w => IO.copyFile( new File(i2pBuildDir, w), new File(paths.get("webappsBunldePath").get, w) ) }
warsForCopy.map { j => IO.copyFile( new File(i2pBuildDir, j), new File(paths.get("i2pJarsBunldePath").get, j) ) }
}
// Unmanaged classpath will be available at compile time
unmanagedClasspath in Compile ++= Seq(
baseDirectory.value / ".." / ".." / "build" / "*.jar",
baseDirectory.value / ".." / ".." / "router" / "java" / "src"
)
// Please note the difference between browserbundle, this has
// the "in Compile" which limit it's scope to that.
//unmanagedBase in Compile := baseDirectory.value / ".." / ".." / "build"
libraryDependencies ++= Seq(
"net.i2p" % "router" % i2pVersion % Compile
)
//assemblyOption in assembly := (assemblyOption in assembly).value.copy(prependShellScript = Some(defaultShellScript))
assemblyJarName in assembly := s"${name.value}-${version.value}"