mirror of https://github.com/sbt/sbt.git
[2.0.x] fix: Fixes backtick-quoted project handling (#9277)
This commit is contained in:
parent
275f97b7c6
commit
ed042b2219
|
|
@ -11,6 +11,7 @@ package internal
|
|||
|
||||
import Def.Setting
|
||||
import java.nio.file.Path
|
||||
import scala.reflect.NameTransformer
|
||||
|
||||
/**
|
||||
* Represents the exported contents of a .sbt file. Currently, that includes the list of settings,
|
||||
|
|
@ -61,7 +62,7 @@ private[sbt] final class DefinedSbtValues(val sbtFiles: Seq[EvalDefinitions]) {
|
|||
for {
|
||||
file <- sbtFiles
|
||||
m = file.enclosingModule
|
||||
v <- file.valNames
|
||||
v <- file.valNames.map(NameTransformer.decode)
|
||||
} yield s"import ${m}.`${v}`"
|
||||
}
|
||||
def generated: Seq[Path] =
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
// https://github.com/sbt/sbt/issues/9269
|
||||
val `kebab-case-project` = rootProject
|
||||
|
||||
InputKey[Unit]("checkVersion") := {
|
||||
val actual = version.value
|
||||
val expect = Def.spaceDelimited("").parsed.head
|
||||
assert(expect == actual, (actual, expect))
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
> checkVersion 0.1.0-SNAPSHOT
|
||||
> set version := "0.2.0-SNAPSHOT"
|
||||
> checkVersion 0.2.0-SNAPSHOT
|
||||
Loading…
Reference in New Issue