Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Escape plugin names in fetched plugins.sbt
  • Loading branch information
hlxid committed Jul 21, 2019
commit e719b3f1993f364594d5188bd74c9a56cd6e2adc
6 changes: 3 additions & 3 deletions project/SbtFile.scala
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class SbtFile(var name: String, var version: String, var plugins: List[Plugin],

if (plugins.nonEmpty) {
for (plugin <- plugins) {
var pluginLine = "\nlazy val %s = (project in file(\"%s\"))".format(plugin.normalizedName, plugin.pluginDirectoryPath)
var pluginLine = "\nlazy val `%s` = (project in file(\"%s\"))".format(plugin.normalizedName, plugin.pluginDirectoryPath)

if (apiProjectPath != "") {
pluginLine += ".dependsOn(apiProject)"
Expand All @@ -79,8 +79,8 @@ class SbtFile(var name: String, var version: String, var plugins: List[Plugin],
}

if (defineRoot) {
var rootLine = "\n\nlazy val root = (project in file(\".\")).aggregate(apiProject,%s)"
.format(plugins.map(_.normalizedName).mkString(", "))
var rootLine = "\n\nlazy val root = (project in file(\".\")).aggregate(apiProject, %s)"
.format(plugins.map(p => s"`${p.normalizedName}`").mkString(", "))

if (apiProjectPath != "") {
rootLine += ".dependsOn(apiProject)"
Expand Down