Created
October 24, 2011 23:06
-
-
Save ayosec/1310647 to your computer and use it in GitHub Desktop.
How to compile a Scala project with scons
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Manifest-Version: 1.0 | |
Created-By: author-name | |
Main-Class: Main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PACKAGE_NAME = "foobar" | |
env = Environment(JAVAC = "scalac", JAVASUFFIX=".scala") | |
env.Java('classes', 'src') | |
env.Jar(PACKAGE_NAME, Glob("classes/*") + ["MANIFEST"]) | |
# vim: filetype=python |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ tree | |
. | |
├── MANIFEST | |
├── SConstruct | |
└── src | |
├── foo | |
│ └── Bar.scala | |
└── Main.scala | |
Generate the package with | |
scons | |
And run it with | |
scala packagename.jar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.