Skip to content

Commit

Permalink
[build system] remove default t1package.jar target
Browse files Browse the repository at this point in the history
Use t1package.assembly to get correct dependencies bundled fat jar
package.

Signed-off-by: Avimitin <[email protected]>
  • Loading branch information
Avimitin authored and sequencer committed Apr 2, 2024
1 parent adc65cd commit 6df032a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -297,5 +297,4 @@ object t1package extends ScalaModule {
def scalaVersion = T(v.scala)
def moduleDeps = super.moduleDeps ++ Seq(t1, ipemu, subsystem, panamaconverter)
override def sourceJar: T[PathRef] = T(Jvm.createJar(T.traverse(transitiveModuleDeps)(dep => T.sequence(Seq(dep.allSources, dep.resources, dep.compileResources)))().flatten.flatten.map(_.path).filter(os.exists), manifest()))
override def jar: T[PathRef] = T(Jvm.createJar(upstreamAssemblyClasspath().map(_.path).filter(os.exists), manifest()))
}
5 changes: 3 additions & 2 deletions nix/t1/t1.nix
Original file line number Diff line number Diff line change
Expand Up @@ -77,21 +77,22 @@ let
mill -i '__.assembly'
mill -i t1package.sourceJar
mill -i t1package.jar
'';

installPhase = ''
mkdir -p $out/share/java
strip-nondeterminism out/elaborator/assembly.dest/out.jar
strip-nondeterminism out/configgen/assembly.dest/out.jar
strip-nondeterminism out/t1package/assembly.dest/out.jar
strip-nondeterminism out/t1package/sourceJar.dest/out.jar
mv out/configgen/assembly.dest/out.jar $out/share/java/configgen.jar
mv out/elaborator/assembly.dest/out.jar $out/share/java/elaborator.jar
mkdir -p $t1package/share/java
mv out/t1package/sourceJar.dest/out.jar $t1package/share/java/t1package-sources.jar
mv out/t1package/jar.dest/out.jar $t1package/share/java/t1package.jar
mv out/t1package/assembly.dest/out.jar $t1package/share/java/t1package.jar
mkdir -p $configgen/bin $elaborator/bin
makeWrapper ${jdk21}/bin/java $configgen/bin/configgen --add-flags "-jar $out/share/java/configgen.jar"
Expand Down

0 comments on commit 6df032a

Please sign in to comment.