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 {
670
670
recur(lines, false )
671
671
}
672
672
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
+
673
680
/** replace imports of `com.google.protobuf.*` with compiler implemented version */
674
681
def replaceProtobuf (lines : List [String ]): List [String ] = {
675
682
def recur (ls : List [String ]): List [String ] = ls match {
@@ -2623,7 +2630,7 @@ object Build {
2623
2630
val mtagsSharedSources = (targetDir ** " *.scala" ).get.toSet
2624
2631
mtagsSharedSources.foreach(f => {
2625
2632
val lines = IO .readLines(f)
2626
- val substitutions = (replaceProtobuf(_)) andThen (insertUnsafeNullsImport(_))
2633
+ val substitutions = (replaceProtobuf(_)) andThen (insertUnsafeNullsImport(_)) andThen (replaceJDKIncompatibilities(_))
2627
2634
IO .writeLines(f, substitutions(lines))
2628
2635
})
2629
2636
mtagsSharedSources
You can’t perform that action at this time.
0 commit comments