File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -670,6 +670,13 @@ object Build {
670670 recur(lines, false )
671671 }
672672
673+ /** Replaces JDK 9+ methods with their JDK 8 alterantive */
674+ def replaceJDKIncompatibilities (lines : List [String ]): List [String ] = {
675+ lines.map(
676+ _.replaceAll(""" (\").repeat\((\w+)\)""" , """ $1 * $2""" )
677+ )
678+ }
679+
673680 /** replace imports of `com.google.protobuf.*` with compiler implemented version */
674681 def replaceProtobuf (lines : List [String ]): List [String ] = {
675682 def recur (ls : List [String ]): List [String ] = ls match {
@@ -2623,7 +2630,7 @@ object Build {
26232630 val mtagsSharedSources = (targetDir ** " *.scala" ).get.toSet
26242631 mtagsSharedSources.foreach(f => {
26252632 val lines = IO .readLines(f)
2626- val substitutions = (replaceProtobuf(_)) andThen (insertUnsafeNullsImport(_))
2633+ val substitutions = (replaceProtobuf(_)) andThen (insertUnsafeNullsImport(_)) andThen (replaceJDKIncompatibilities(_))
26272634 IO .writeLines(f, substitutions(lines))
26282635 })
26292636 mtagsSharedSources
You can’t perform that action at this time.
0 commit comments