Formatting

This commit is contained in:
Viktor Klang 2010-08-09 10:09:26 +02:00
parent bc7326e9d6
commit d41f64df2f

View file

@ -723,29 +723,28 @@ class AkkaParentProject(info: ProjectInfo) extends DefaultProject(info) {
// ------------------------------------------------------------ // ------------------------------------------------------------
class AkkaDefaultProject(info: ProjectInfo, val deployPath: Path) extends DefaultProject(info) with DeployProject with OSGiProject class AkkaDefaultProject(info: ProjectInfo, val deployPath: Path) extends DefaultProject(info) with DeployProject with OSGiProject
} }
trait DeployProject { self: BasicScalaProject => trait DeployProject { self: BasicScalaProject =>
// defines where the deployTask copies jars to // defines where the deployTask copies jars to
def deployPath: Path def deployPath: Path
lazy val dist = deployTask(jarPath, packageDocsJar, packageSrcJar, deployPath, true, true, true) dependsOn( lazy val dist = deployTask(jarPath, packageDocsJar, packageSrcJar, deployPath, true, true, true) dependsOn(
`package`, packageDocs, packageSrc) describedAs("Deploying") `package`, packageDocs, packageSrc) describedAs("Deploying")
def deployTask(jar: Path, docs: Path, src: Path, toDir: Path, def deployTask(jar: Path, docs: Path, src: Path, toDir: Path,
genJar: Boolean, genDocs: Boolean, genSource: Boolean) = task { genJar: Boolean, genDocs: Boolean, genSource: Boolean) = task {
def gen(jar: Path, toDir: Path, flag: Boolean, msg: String): Option[String] = def gen(jar: Path, toDir: Path, flag: Boolean, msg: String): Option[String] =
if (flag) { if (flag) {
log.info(msg + " " + jar) log.info(msg + " " + jar)
FileUtilities.copyFile(jar, toDir / jar.name, log) FileUtilities.copyFile(jar, toDir / jar.name, log)
} else None } else None
gen(jar, toDir, genJar, "Deploying bits") orElse gen(jar, toDir, genJar, "Deploying bits") orElse
gen(docs, toDir, genDocs, "Deploying docs") orElse gen(docs, toDir, genDocs, "Deploying docs") orElse
gen(src, toDir, genSource, "Deploying sources") gen(src, toDir, genSource, "Deploying sources")
}
} }
}
trait OSGiProject extends BNDPlugin { self: DefaultProject => trait OSGiProject extends BNDPlugin { self: DefaultProject =>
override def bndExportPackage = Seq("se.scalablesolutions.akka.*;version=%s".format(projectVersion.value)) override def bndExportPackage = Seq("se.scalablesolutions.akka.*;version=%s".format(projectVersion.value))
} }