2011-09-10 11:13:51 +02:00
|
|
|
#! /usr/bin/env python
|
|
|
|
# encoding: utf-8
|
|
|
|
# Thomas Nagy, 2006-2010 (ita)
|
|
|
|
|
|
|
|
"""
|
|
|
|
java example
|
|
|
|
|
|
|
|
The gcj compiler has a very different command-line - see playground/gcj
|
|
|
|
"""
|
|
|
|
|
|
|
|
VERSION = '0.0.4'
|
|
|
|
APPNAME = 'java_test'
|
|
|
|
|
|
|
|
top = '.'
|
|
|
|
out = 'build'
|
|
|
|
|
|
|
|
def options(opt):
|
|
|
|
opt.load('junit', tooldir='.')
|
|
|
|
|
|
|
|
def configure(conf):
|
|
|
|
conf.load('java')
|
|
|
|
|
|
|
|
try:
|
|
|
|
ret = conf.load('junit', tooldir='.')
|
|
|
|
conf.env.DO_JUNIT = True
|
|
|
|
except:
|
|
|
|
pass
|
|
|
|
|
|
|
|
conf.check_java_class('java.io.FileOutputStream')
|
|
|
|
conf.check_java_class('FakeClass')
|
|
|
|
|
|
|
|
conf.env.CLASSPATH_NNN = ['aaaa.jar', 'bbbb.jar']
|
|
|
|
|
|
|
|
def build(bld):
|
|
|
|
|
2012-03-23 03:31:56 +01:00
|
|
|
bld(features = 'javac jar javadoc',
|
2011-09-10 11:13:51 +02:00
|
|
|
srcdir = 'src/', # folder containing the sources to compile
|
|
|
|
outdir = 'src', # folder where to output the classes (in the build directory)
|
2024-05-19 12:43:55 +02:00
|
|
|
compat = '8', # java compatibility version number
|
2011-09-10 11:13:51 +02:00
|
|
|
sourcepath = ['src', 'sup'],
|
|
|
|
classpath = ['.', '..'],
|
2018-04-04 11:15:18 +02:00
|
|
|
#jaropts = ['-C', 'default/src/', '.'], # can be used to give files
|
2011-09-10 11:13:51 +02:00
|
|
|
basedir = 'src', # folder containing the classes and other files to package (must match outdir)
|
|
|
|
destfile = 'foo.jar', # do not put the destfile in the folder of the java classes!
|
2012-03-23 03:31:56 +01:00
|
|
|
use = 'NNN',
|
|
|
|
|
|
|
|
# javadoc
|
|
|
|
javadoc_package = ['com.meow' , 'com.meow.truc.bar', 'com.meow.truc.foo'],
|
|
|
|
javadoc_output = 'javadoc',
|
|
|
|
)
|
2011-09-10 11:13:51 +02:00
|
|
|
|
2019-06-06 20:33:43 +02:00
|
|
|
bld.recurse('animals cats bengala')
|
2011-09-10 11:13:51 +02:00
|
|
|
|