wscript (1321B)
1 #! /usr/bin/env python 2 # encoding: utf-8 3 # Thomas Nagy, 2006-2010 (ita) 4 5 """ 6 java example 7 8 The gcj compiler has a very different command-line - see playground/gcj 9 """ 10 11 VERSION = '0.0.4' 12 APPNAME = 'java_test' 13 14 top = '.' 15 out = 'build' 16 17 def options(opt): 18 opt.load('junit', tooldir='.') 19 20 def configure(conf): 21 conf.load('java') 22 23 try: 24 ret = conf.load('junit', tooldir='.') 25 conf.env.DO_JUNIT = True 26 except: 27 pass 28 29 conf.check_java_class('java.io.FileOutputStream') 30 conf.check_java_class('FakeClass') 31 32 conf.env.CLASSPATH_NNN = ['aaaa.jar', 'bbbb.jar'] 33 34 def build(bld): 35 36 bld(features = 'javac jar javadoc', 37 srcdir = 'src/', # folder containing the sources to compile 38 outdir = 'src', # folder where to output the classes (in the build directory) 39 compat = '1.6', # java compatibility version number 40 sourcepath = ['src', 'sup'], 41 classpath = ['.', '..'], 42 #jaropts = ['-C', 'default/src/', '.'], # can be used to give files 43 basedir = 'src', # folder containing the classes and other files to package (must match outdir) 44 destfile = 'foo.jar', # do not put the destfile in the folder of the java classes! 45 use = 'NNN', 46 47 # javadoc 48 javadoc_package = ['com.meow' , 'com.meow.truc.bar', 'com.meow.truc.foo'], 49 javadoc_output = 'javadoc', 50 ) 51 52 bld.recurse('animals cats bengala') 53