fix issue 9269

This commit is contained in:
xuwei-k 2026-05-31 10:21:40 +09:00
parent d4f54fd5b6
commit 793a2a285a
3 changed files with 13 additions and 1 deletions

View File

@ -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] =

View File

@ -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))
}

View File

@ -0,0 +1,3 @@
> checkVersion 0.1.0-SNAPSHOT
> set version := "0.2.0-SNAPSHOT"
> checkVersion 0.2.0-SNAPSHOT