17
17
import java .util .jar .Manifest ;
18
18
import java .util .stream .Collectors ;
19
19
import java .util .stream .Stream ;
20
- import org .apache .commons .lang3 .tuple .Pair ;
21
20
import org .apache .maven .artifact .Artifact ;
22
21
import org .apache .maven .plugin .logging .Log ;
23
22
import sbt .internal .inc .*;
27
26
import sbt .io .IO ;
28
27
import sbt .util .Logger ;
29
28
import scala .Option ;
29
+ import scala .Tuple2 ;
30
30
import scala_maven .MavenArtifactResolver ;
31
31
import util .FileUtils ;
32
32
import xsbti .PathBasedFile ;
@@ -194,9 +194,9 @@ private String compilerBridgeArtifactId(String scalaVersion) {
194
194
}
195
195
}
196
196
197
- private static List <Pair <File , String >> computeZipEntries (List <Path > paths , Path rootDir ) {
197
+ private static List <Tuple2 <File , String >> computeZipEntries (List <Path > paths , Path rootDir ) {
198
198
int rootDirLength = rootDir .toString ().length ();
199
- Stream <Pair <File , String >> stream =
199
+ Stream <Tuple2 <File , String >> stream =
200
200
paths .stream ()
201
201
.map (
202
202
path -> {
@@ -205,7 +205,7 @@ private static List<Pair<File, String>> computeZipEntries(List<Path> paths, Path
205
205
if (Files .isDirectory (path )) {
206
206
zipPath = zipPath + "/" ;
207
207
}
208
- return Pair . of (path .toFile (), zipPath );
208
+ return new Tuple2 (path .toFile (), zipPath );
209
209
});
210
210
return stream .collect (Collectors .toList ());
211
211
}
@@ -313,18 +313,18 @@ private File getCompiledBridgeJar(ScalaInstance scalaInstance, Log mavenLogger)
313
313
manifest .read (is );
314
314
}
315
315
316
- List <Pair <File , String >> scalaCompiledClasses =
316
+ List <Tuple2 <File , String >> scalaCompiledClasses =
317
317
computeZipEntries (FileUtils .listDirectoryContent (classesDir , file -> true ), classesDir );
318
- List <Pair <File , String >> resources =
318
+ List <Tuple2 <File , String >> resources =
319
319
computeZipEntries (bridgeSourcesNonScalaFiles , sourcesDir );
320
- List <Pair <File , String >> allZipEntries = new ArrayList <>();
320
+ List <Tuple2 <File , String >> allZipEntries = new ArrayList <>();
321
321
allZipEntries .addAll (scalaCompiledClasses );
322
322
allZipEntries .addAll (resources );
323
323
324
324
IO .jar (
325
325
IterableHasAsScala (
326
326
allZipEntries .stream ()
327
- .map (x -> scala .Tuple2 .apply (x .getLeft () , x .getRight () ))
327
+ .map (x -> scala .Tuple2 .apply (x ._1 , x ._2 ))
328
328
.collect (Collectors .toList ()))
329
329
.asScala (),
330
330
cachedCompiledBridgeJar ,
0 commit comments