Skip to content

Instantly share code, notes, and snippets.

@ayosec
Created October 24, 2011 23:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ayosec/1310647 to your computer and use it in GitHub Desktop.
Save ayosec/1310647 to your computer and use it in GitHub Desktop.
How to compile a Scala project with scons
Manifest-Version: 1.0
Created-By: author-name
Main-Class: Main
PACKAGE_NAME = "foobar"
env = Environment(JAVAC = "scalac", JAVASUFFIX=".scala")
env.Java('classes', 'src')
env.Jar(PACKAGE_NAME, Glob("classes/*") + ["MANIFEST"])
# vim: filetype=python
$ tree
.
├── MANIFEST
├── SConstruct
└── src
├── foo
│   └── Bar.scala
└── Main.scala
Generate the package with
scons
And run it with
scala packagename.jar
@holdenk
Copy link

holdenk commented Apr 11, 2012

This almost works for me. Namely if I run scons twice it works. It doesn't seem to pick up the additional classes (like Main$) that scala generates in the first pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment