mirror of https://github.com/sbt/sbt.git
introduce file-mappings for File->File, Extracted.append for reloading with additional settings
This commit is contained in:
parent
9f4778a2a0
commit
f7068a4cbb
|
|
@ -139,6 +139,7 @@ object Keys
|
|||
val artifactClassifier = SettingKey[Option[String]]("artifact-classifier", "Sets the classifier used by the default artifact definition.")
|
||||
val artifactName = SettingKey[(String, ModuleID, Artifact) => String]("artifact-name", "Function that produces the artifact name from its definition.")
|
||||
val mappings = TaskKey[Seq[(File,String)]]("mappings", "Defines the mappings from a file to a path, used by packaging, for example.")
|
||||
val fileMappings = TaskKey[Seq[(File,File)]]("file-mappings", "Defines the mappings from a file to a file, used for copying files, for example.")
|
||||
|
||||
// Run Keys
|
||||
val selectMainClass = TaskKey[Option[String]]("select-main-class", "Selects the main class to run.")
|
||||
|
|
|
|||
|
|
@ -83,6 +83,13 @@ final case class Extracted(structure: BuildStructure, session: SessionSettings,
|
|||
value getOrElse error(Project.display(ScopedKey(scope, key)) + " is undefined.")
|
||||
private def getOrError[T](scope: Scope, key: AttributeKey[T]): T =
|
||||
structure.data.get(scope, key) getOrElse error(Project.display(ScopedKey(scope, key)) + " is undefined.")
|
||||
|
||||
def append(settings: Seq[Setting[_]], state: State): State =
|
||||
{
|
||||
val appendSettings = Load.transformSettings(Load.projectScope(currentRef), currentRef.build, rootProject, settings)
|
||||
val newStructure = Load.reapply(session.original ++ appendSettings, structure)
|
||||
Project.setProject(session, newStructure, state)
|
||||
}
|
||||
}
|
||||
|
||||
sealed trait ClasspathDep[PR <: ProjectReference] { def project: PR; def configuration: Option[String] }
|
||||
|
|
|
|||
Loading…
Reference in New Issue