Closed andytill closed 9 years ago
How about a build.gradle file to do this?
Yes, maybe. Would it be any better than a shell script?
Yep. Gradle does a lot of things for you automatically. Just declare dependencies and it will install them all.
After thinking about this a lot, I still have a strong preference for a shell script.
The reason is that this script is intended to remove manual steps from the compile process, requiring gradle is adding a manual step. The situation is already pretty bad for the average beam dev who might not have java and maven installed.
Gradle does not need to be installed. You use the gradlew script stored in the repo. It works on windows and unixes.
On Fri, Oct 23, 2015, 1:43 PM Andy Till notifications@github.com wrote:
After thinking about this a lot, I still have a strong preference for a shell script.
The reason is that this script is intended to remove manual steps from the compile process, requiring gradle is adding a manual step. The situation is already pretty bad for the average beam dev who might not have java and maven installed.
— Reply to this email directly or view it on GitHub https://github.com/andytill/erlyberly/issues/43#issuecomment-150659980.
This was desperately needed so I committed a shell script to do it, setup.sh
.
I barely know anything about gradle (demonstrated above!) so don't think I can usefully maintain a build script using it, maven is doing an okay job as the build system and I would rather not add new tech if it isn't really required.
Problem
Setting up all the dependencies to build erlyberly is a manual task with several steps, I doubt many of the people who clone it reach the end, and I don't blame them.
Solution
Write a shell (bash) script that automates the steps, this should suffice for most environments that erlyberly will be run in.
It should assume erlang, Java8u20 and Maven is installed, since this is platform specific e.g. apt-get, yum, homebrew.
It will need to perform the following tasks:
git clone
the floaty-field project, build it and install it to the local cache.git clone
the jinterface directory only form the erlang/otp repo on github. I have investigated this briefly here. jinterface is a very small part of erlang/otp, it would be a much better experience if the entire repo didn't have to be pulled down.assembly:single
target to create a runnable.Many of the commands are documented in the README already.
It might be useful to break to break out building the erlyberly.erl file into a separate shell script so it can be run throughout dev, not just as a one-time setup task.
This has some overlap with #27 but doesn't obsolete it. Having Maven build erlyberly.erl can be done later, on top of this work.