Skip to content

Parentheses are added to XML even inside String literals (0.13.7) #1738

@pfn

Description

@pfn
TaskKey[Unit]("crashlytics-gen") <<= (collectResources in Android) map {
  case (_,res) =>
  val resource = """<string name="com.crashlytics.android.build_id">%s</string>""" format java.util.UUID.randomUUID.toString
  val lines = """<?xml version="1.0" encoding="utf-8"?>""" ::
    "<resources>" :: resource :: "</resources>" :: Nil
  println("wtf: " + lines.mkString(""))
  lines foreach println
}

Produces this:

> crashlytics-gen
wtf: <?xml version="1.0" encoding="utf-8"?>(<resources>(<string name="com.crashlytics.android.build_id">f7a7b0d5-9ac9-4c1c-97c7-2fb852fa5bfc</string>)</resources>)
<?xml version="1.0" encoding="utf-8"?>
(<resources>
(<string name="com.crashlytics.android.build_id">f7a7b0d5-9ac9-4c1c-97c7-2fb852fa5bfc</string>)
</resources>)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions