Simpler building for small projects?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Simpler building for small projects?

Scala - User mailing list
I've looked at sbt but it looks far more sophisticated than I need.

I want to build a small GUI project using Swing, ~10-20 .scala files, ~1-2KLOC, plus some .jar files e.g., sqlite-jdbc-3....jar, and maybe a few more.

Maybe a shell script would be enough to rebuild after changes?

I do all my development on Xubuntu, but eventually I'd also want to create a completely stand-alone executable (including everything in one file if possible) for Windows.

Is there a simpler alternative to sbt for this?

Thanks.

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Simpler building for small projects?

Donald McLean-3
"Simpler" is a matter of experience and opinion.

It was simpler (for me) to use Ant. Especially since my project is part of a larger project that also uses Ant, so there are no special hoops for the configuration manager to jump through to build my app.

Cheer,

Donald

On Fri, Jan 13, 2017 at 4:46 AM, 'Mark Summerfield' via scala-user <[hidden email]> wrote:
I've looked at sbt but it looks far more sophisticated than I need.

I want to build a small GUI project using Swing, ~10-20 .scala files, ~1-2KLOC, plus some .jar files e.g., sqlite-jdbc-3....jar, and maybe a few more.

Maybe a shell script would be enough to rebuild after changes?

I do all my development on Xubuntu, but eventually I'd also want to create a completely stand-alone executable (including everything in one file if possible) for Windows.

Is there a simpler alternative to sbt for this?

Thanks.

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.



--
Family photographs are a critical legacy for
ourselves and our descendants. Protect that
legacy with a digital backup and recovery plan.

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Simpler building for small projects?

Seth Tisue-3
In reply to this post by Scala - User mailing list
IMO you actually do want sbt for this. Yes, sbt is extremely powerful and flexible for large projects that need to do custom stuff, but you don't need to get into that; it also has defaults that handle small projects extremely well, with minimal configuration or fuss. Set scalaVersion, add a few libraryDependencies, done. `sbt run` to compile and run your code. For delivery, sbt-native-packager.

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Simpler building for small projects?

Oliver Ruebenacker
In reply to this post by Scala - User mailing list

     Hello,

  If you have a few *.jar files you want to include, just put them in lib and SBT will include them. This is known as "unmanaged dependencies" because SBT does not manage them (e.g. SBT does not go and get them for you).

  You could also let SBT manage them by adding them to libraryDependencies (as Seth points out). That's what people usually do. For example, for sqlite-jdbc, Version 3.7.2, you would write into your *.sbt file:

libraryDependencies += "org.xerial" % "sqlite-jdbc" % "3.7.2"

     Best, Oliver

On Fri, Jan 13, 2017 at 4:46 AM, 'Mark Summerfield' via scala-user <[hidden email]> wrote:
I've looked at sbt but it looks far more sophisticated than I need.

I want to build a small GUI project using Swing, ~10-20 .scala files, ~1-2KLOC, plus some .jar files e.g., sqlite-jdbc-3....jar, and maybe a few more.

Maybe a shell script would be enough to rebuild after changes?

I do all my development on Xubuntu, but eventually I'd also want to create a completely stand-alone executable (including everything in one file if possible) for Windows.

Is there a simpler alternative to sbt for this?

Thanks.

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.



--
Oliver Ruebenacker
Senior Software Engineer, Diabetes Portal, Broad Institute

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Simpler building for small projects?

AmigoNico
In reply to this post by Scala - User mailing list
Perhaps the docs make SBT looks too sophisticated, but you will be surprised at how straightforward the build.sbt file is for what you want to do, and you will be better off for having done it.  For example, you will be able to bring up a REPL with all of your build products on the classpath to try things out.  You can use plugins to do things like check for newer versions of the libraries that you depend on, or to show you the dependency tree for your libraries.

However, you should know that there is an alternative to SBT called CBT that you might find more straightforward.  The author gave this presentation on it a while back (I imagine the tool has progressed significantly since then):

https://www.youtube.com/watch?v=d4QheVMJk7E

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: Simpler building for small projects?

Jeff Dyke
as a relative scala newbie, when we/I (first company using scala, two of us chose it) first started, we did so with SBT and were up and running in minutes as others have pointed out, you will hit complications, but only when you need the advanced options of the tool.  I think its quoted in this thread, from a blog post, but to paraphrase learn how to use sbt, don't immediately try to master it.  A problem for another day, start writing, testing and deploying code today :)

Best,
Jeff

On Fri, Jan 13, 2017 at 4:57 PM, Nicholas Sterling <[hidden email]> wrote:
Perhaps the docs make SBT looks too sophisticated, but you will be surprised at how straightforward the build.sbt file is for what you want to do, and you will be better off for having done it.  For example, you will be able to bring up a REPL with all of your build products on the classpath to try things out.  You can use plugins to do things like check for newer versions of the libraries that you depend on, or to show you the dependency tree for your libraries.

However, you should know that there is an alternative to SBT called CBT that you might find more straightforward.  The author gave this presentation on it a while back (I imagine the tool has progressed significantly since then):

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.