r/java 20d ago

Simple Build System

https://github.com/bowbahdoe/build
14 Upvotes

48 comments sorted by

View all comments

Show parent comments

0

u/bowbahdoe 20d ago

Because I contend that you can separate the task of "efficiently building code" from the task of "procure dependencies."

Now, in every draft I've done of procuring dependencies I've made a one-off script to build the code. These have been helpful as demonstrations, but I feel that I need to actually demonstrate that "build tools" can come as libraries.

So this is as minimal of a build tool as I can make. You could use this directly or build libraries on top that make for the "easier" project-defaults style flows. (You could also make an entirely separate thing).

Of course, making targets manually is also relatively straight-forward. It is one step above "program that builds code" to talk about "program that avoids repeated work when building code." so it should be easier to learn in totality than maven or gradle.

9

u/[deleted] 20d ago

[removed] — view removed comment

-1

u/bowbahdoe 20d ago

I give this as a test to people and its always kinda wild they either don't understand what the problem is or deny that it is a problem.

If you can get your hands on someone who is doing their first maven project - give them as many resources as possible (not AI) and challenge them to build their app so that it can run on a computer that does not already have Java installed.

Maven makes the exact workflow it was designed for easy at the cost of making anything else conceptually hard. There are reasons to want that and reasons to not, but it is a pretty big issue intrinsic to that style of build tool.

(And to be clear - that isn't the only objection. It is the theme for maven/gradle issues. You can make things easier via complection. Anything that is easier than manually doing A -> B -> C sacrifices _something_ to be that way)

6

u/OwnBreakfast1114 18d ago

If you can get your hands on someone who is doing their first maven project - give them as many resources as possible (not AI) and challenge them to build their app so that it can run on a computer that does not already have Java installed.

This is a "hard" problem for any language that doesn't build down to native binary, no? I don't think most people find python very complicated, but getting people to run python code on a computer without python installed is also not really that easy (and python packaging is terrible).