-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
251c02d
commit e7d7c1b
Showing
19 changed files
with
118 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,35 @@ | ||
package com.earldouglas.sbt.war | ||
|
||
import sbt.Def.Initialize | ||
import sbt.Keys._ | ||
import sbt.Keys.{`package` => pkg} | ||
import sbt._ | ||
|
||
import java.io.{File => JavaFile} | ||
|
||
object Compat { | ||
|
||
val Compile_pkg_artifact = Compile / pkg / artifact | ||
val Compile_sourceDirectory = Compile / sourceDirectory | ||
val Compile_target = Compile / target | ||
val Global_onLoad = Global / onLoad | ||
val pkg_artifact = pkg / artifact | ||
|
||
val webappContents: Initialize[Task[Map[String, JavaFile]]] = | ||
WebappComponentsPlugin.webappContents | ||
|
||
def managedJars(config: Configuration): Initialize[Task[Seq[File]]] = | ||
Def.task { | ||
Classpaths | ||
.managedJars(config, classpathTypes.value, update.value) | ||
.map(_.data) | ||
.toSeq | ||
} | ||
|
||
def toFile(file: TaskKey[File]): Initialize[Task[File]] = | ||
file | ||
|
||
val classpathFiles: Initialize[Task[Seq[File]]] = | ||
(Runtime / fullClasspath) | ||
.map(_.files) | ||
} |
17 changes: 0 additions & 17 deletions
17
src/main/scala-2/com/earldouglas/sbt/war/WarPackagePluginCompat.scala
This file was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
src/main/scala-2/com/earldouglas/sbt/war/WarPackageRunnerPluginCompat.scala
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
src/main/scala-2/com/earldouglas/sbt/war/WebappComponentsPluginCompat.scala
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
src/main/scala-2/com/earldouglas/sbt/war/WebappPackageRunnerPluginCompat.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 0 additions & 26 deletions
26
src/main/scala-3/com/earldouglas/sbt/war/WarPackagePluginCompat.scala
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
src/main/scala-3/com/earldouglas/sbt/war/WarPackageRunnerPluginCompat.scala
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
src/main/scala-3/com/earldouglas/sbt/war/WebappComponentsPluginCompat.scala
This file was deleted.
Oops, something went wrong.
23 changes: 0 additions & 23 deletions
23
src/main/scala-3/com/earldouglas/sbt/war/WebappPackageRunnerPluginCompat.scala
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package com.earldouglas.sbt.war | ||
import java.util.{List => JavaList} | ||
import java.util.{Map => JavaMap} | ||
import scala.collection.JavaConverters._ | ||
|
||
object TestCompat { | ||
|
||
def asScala[A, B](javaMap: JavaMap[A, B]): Map[A, B] = | ||
javaMap.asScala.toMap | ||
|
||
def asScala[A](javaList: JavaList[A]): List[A] = | ||
javaList.asScala.toList | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package com.earldouglas.sbt.war | ||
|
||
import java.net.HttpURLConnection | ||
import java.net.URI | ||
import scala.jdk.CollectionConverters._ | ||
import scala.io.Source | ||
import java.util.{List => JavaList} | ||
import java.util.{Map => JavaMap} | ||
|
||
object TestCompat: | ||
|
||
def asScala[A, B](javaMap: JavaMap[A, B]): Map[A, B] = | ||
javaMap | ||
.asScala | ||
.toMap | ||
|
||
def asScala[A](javaList: JavaList[A]): List[A] = | ||
javaList | ||
.asScala | ||
.toList |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.