equal
deleted
inserted
replaced
92 val jar_path = context(dir, component = component).module_result |
92 val jar_path = context(dir, component = component).module_result |
93 Result(output, jar_bytes, jar_path) |
93 Result(output, jar_bytes, jar_path) |
94 } |
94 } |
95 } |
95 } |
96 |
96 |
|
97 object Scala_Fun extends Scala.Fun("scala_build") with Scala.Bytes_Fun { |
|
98 val here = Scala_Project.here |
|
99 def invoke(args: List[Bytes]): List[Bytes] = |
|
100 args match { |
|
101 case List(component, dir) => |
|
102 val result = |
|
103 build_result(Path.explode(dir.text), |
|
104 component = Value.Boolean.parse(component.text)) |
|
105 val jar_name = |
|
106 result.jar_path match { |
|
107 case Some(path) => path.file_name |
|
108 case None => "result.jar" |
|
109 } |
|
110 List(Bytes("scala_build/" + jar_name), result.jar_bytes, Bytes(result.output)) |
|
111 case _ => error("Bad arguments") |
|
112 } |
|
113 } |
|
114 |
97 def component_contexts(): List[Context] = |
115 def component_contexts(): List[Context] = |
98 isabelle.setup.Build.component_contexts().asScala.toList.map(new Context(_)) |
116 isabelle.setup.Build.component_contexts().asScala.toList.map(new Context(_)) |
99 } |
117 } |