Formatting

This commit is contained in:
Eugene Yokota 2018-09-14 00:59:01 -04:00
parent e30a481585
commit f3424e265c
3 changed files with 26 additions and 24 deletions

View File

@ -27,12 +27,12 @@ import sbt.util.Tracked.{ inputChanged, outputChanged }
sealed trait PackageOption
/**
* == Package ==
*
* This module provides an API to package jar files.
*
* @see [[https://docs.oracle.com/javase/tutorial/deployment/jar/index.html]]
*/
* == Package ==
*
* This module provides an API to package jar files.
*
* @see [[https://docs.oracle.com/javase/tutorial/deployment/jar/index.html]]
*/
object Package {
final case class JarManifest(m: Manifest) extends PackageOption {
assert(m != null)
@ -58,12 +58,12 @@ object Package {
}
/**
* The jar package configuration. Contains all relevant information to create a jar file.
*
* @param sources the jar contents
* @param jar the destination jar file
* @param options additional package information, e.g. jar manifest, main class or manifest attributes
*/
* The jar package configuration. Contains all relevant information to create a jar file.
*
* @param sources the jar contents
* @param jar the destination jar file
* @param options additional package information, e.g. jar manifest, main class or manifest attributes
*/
final class Configuration(
val sources: Seq[(File, String)],
val jar: File,
@ -71,11 +71,11 @@ object Package {
)
/**
*
* @param conf the package configuration that should be build
* @param cacheStoreFactory used for jar caching. We try to avoid rebuilds as much as possible
* @param log feedback for the user
*/
*
* @param conf the package configuration that should be build
* @param cacheStoreFactory used for jar caching. We try to avoid rebuilds as much as possible
* @param log feedback for the user
*/
def apply(conf: Configuration, cacheStoreFactory: CacheStoreFactory, log: Logger): Unit = {
val manifest = new Manifest
val main = manifest.getMainAttributes
@ -109,10 +109,10 @@ object Package {
}
/**
* updates the manifest version is there is none present.
*
* @param main the current jar attributes
*/
* updates the manifest version is there is none present.
*
* @param main the current jar attributes
*/
def setVersion(main: Attributes): Unit = {
val version = Attributes.Name.MANIFEST_VERSION
if (main.getValue(version) eq null) {

View File

@ -824,7 +824,7 @@ object BuiltinCommands {
if (version != app.id.version()) {
state.log.warn(s"""sbt version mismatch, current: ${app.id
.version()}, in build.properties: "$version", use 'reboot' to use the new value.""")
}
}
)
}

View File

@ -226,8 +226,10 @@ class JUnitXmlTestsListener(val outputDir: String, logger: Logger) extends Tests
d.truncatedTo(ChronoUnit.SECONDS).format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
private def writeSuite() = {
val legacyFile = new File(targetDir, s"${normalizeName(withTestSuite(_.name))}.xml").getAbsolutePath
val file = new File(targetDir, s"TEST-${normalizeName(withTestSuite(_.name))}.xml").getAbsolutePath
val legacyFile =
new File(targetDir, s"${normalizeName(withTestSuite(_.name))}.xml").getAbsolutePath
val file =
new File(targetDir, s"TEST-${normalizeName(withTestSuite(_.name))}.xml").getAbsolutePath
// TODO would be nice to have a logger and log this with level debug
// System.err.println("Writing JUnit XML test report: " + file)
XML.save(legacyFile, withTestSuite(_.stop()), "UTF-8", true, null)