Closed Thihup closed 3 years ago
An interesting idea. The suggested modules
field would work like a filter, with an empty array as the default, meaning "tweak all tool calls".
Although I consider Bach 16 feature-freezed, I might add this tiny tweak tweak. 😉
Erm. Was about to implement this feature and found:
var jar =
Command.builder("jar")
.with("--create")
.with("--file", main.workspace("modules", archive))
.with(mainClass, (builder, className) -> builder.with("--main-class", className))
.withEach(main.tweaks().arguments("jar"))
.withEach(main.tweaks().arguments("jar(" + name + ')'));
Can you please try:
tweaks = {
@Tweak(tool = "jar(com.foo.bar)", with = {"--main-class", "com.foo.bar.Main"}},
@Tweak(tool = "jar(com.foo.baz)", with = {"--main-class", "com.foo.baz.Main"}},
}
Same goes for junit(MODULE)
tweaks.
Well, that worked 😄 Thanks!
For instance, using the
jar --main-class
.Something like: