-
Notifications
You must be signed in to change notification settings - Fork 7
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
b6d16d3
commit e5dce8a
Showing
5 changed files
with
135 additions
and
22 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ pkgs ? import <nixpkgs> {} }: | ||
let | ||
jdk = pkgs.jdk8; | ||
in | ||
pkgs.mkShell { | ||
nativeBuildInputs = [ | ||
(pkgs.sbt.override { jre = jdk; }) | ||
]; | ||
shellHook = '' | ||
export JAVA_HOME=${jdk} | ||
PATH="${jdk}/bin:$PATH" | ||
''; | ||
} |
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,39 @@ | ||
package com.earldouglas.sbt.frege | ||
|
||
import sbt.Def.Initialize | ||
import sbt.Keys._ | ||
import sbt._ | ||
|
||
object Compat { | ||
|
||
val Compile_fullClasspath: Initialize[Task[Seq[File]]] = | ||
Def.task { | ||
(Compile / fullClasspath).value | ||
.map(_.data) | ||
} | ||
|
||
def dependencyClasspath(scope: Configuration): Initialize[Task[Seq[File]]] = | ||
Def.task { | ||
(scope / sbt.Keys.dependencyClasspath).value | ||
.map(_.data) | ||
} | ||
|
||
def managedClasspath(scope: Configuration): Initialize[Task[Seq[File]]] = | ||
Def.task { | ||
(scope / sbt.Keys.managedClasspath).value | ||
.map(_.data) | ||
} | ||
|
||
def fregeCompiler(scope: Configuration) = scope / SbtFregec.autoImport.fregeCompiler | ||
def fregeOptions(scope: Configuration) = scope / SbtFregec.autoImport.fregeOptions | ||
def fregeSource(scope: Configuration) = scope / SbtFregec.autoImport.fregeSource | ||
def fregeTarget(scope: Configuration) = scope / SbtFregec.autoImport.fregeTarget | ||
def sourceDirectory(scope: Configuration) = scope / sbt.Keys.sourceDirectory | ||
def sourceGenerators(scope: Configuration) = scope / sbt.Keys.sourceGenerators | ||
|
||
def managedJars(config: Configuration): Initialize[Task[Seq[File]]] = | ||
Def.task { | ||
Classpaths.managedJars(config, classpathTypes.value, update.value) | ||
.map(_.data) | ||
} | ||
} |
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,43 @@ | ||
package com.earldouglas.sbt.frege | ||
|
||
import sbt.Def.Initialize | ||
import sbt.Keys._ | ||
import sbt._ | ||
import sbt.given | ||
|
||
object Compat: | ||
|
||
val Compile_fullClasspath: Initialize[Task[Seq[File]]] = | ||
Def.task: | ||
(Compile / fullClasspath).value | ||
.map(_.data) | ||
.map(fileConverter.value.toPath(_)) | ||
.map(_.toFile()) | ||
|
||
def dependencyClasspath(scope: Configuration): Initialize[Task[Seq[File]]] = | ||
Def.task: | ||
(scope / sbt.Keys.dependencyClasspath).value | ||
.map(_.data) | ||
.map(fileConverter.value.toPath(_)) | ||
.map(_.toFile()) | ||
|
||
def managedClasspath(scope: Configuration): Initialize[Task[Seq[File]]] = | ||
Def.task: | ||
(scope / sbt.Keys.managedClasspath).value | ||
.map(_.data) | ||
.map(fileConverter.value.toPath(_)) | ||
.map(_.toFile()) | ||
|
||
def fregeCompiler(scope: Configuration) = scope / SbtFregec.autoImport.fregeCompiler | ||
def fregeOptions(scope: Configuration) = scope / SbtFregec.autoImport.fregeOptions | ||
def fregeSource(scope: Configuration) = scope / SbtFregec.autoImport.fregeSource | ||
def fregeTarget(scope: Configuration) = scope / SbtFregec.autoImport.fregeTarget | ||
def sourceDirectory(scope: Configuration) = scope / sbt.Keys.sourceDirectory | ||
def sourceGenerators(scope: Configuration) = scope / sbt.Keys.sourceGenerators | ||
|
||
def managedJars(config: Configuration): Initialize[Task[Seq[File]]] = | ||
Def.task: | ||
Classpaths.managedJars(config, classpathTypes.value, update.value, fileConverter.value) | ||
.map(_.data) | ||
.map(fileConverter.value.toPath(_)) | ||
.map(_.toFile()) |
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