Why not use `stripMargin`?

    def packageCode = """
      |package scala.bippy
      |class A { new util.Random() }
      |""".stripMargin('|')

yields the same result.