nest.repository.support Documentation TaskDoc JavaDoc Packages

Java compile classpath

Passing saker.nest bundles as an input to Java compilation can be done using the following ways. For proper operation, we recommend using the compile dependency filter when resolving the bundles.

saker.java.classpath.bundle()

The saker.java.classpath.bundle() task can be used to create a classpath for the given bundles. It is the recommended approach to create a classpath. It also retrieves the source attachments of the bundles when building inside an IDE.

See Nest bundle classpath for usage example.

Localized bundles

You can localize the given bundles, and then pass them to the saker.java.compile() as local path references:

$localized = nest.bundle.localize(### ... ###)
saker.java.compile(
	SourceDirectories: src,
	ClassPath: foreach $path in $localized[BundleLocalPaths]: 
		[ std.file.local($path) ]
)

This way the bundles don't have to be copied into the build system file hierarchy.

Downloaded bundles

$downloaded = nest.bundle.download(### ... ###)
saker.java.compile(
	SourceDirectories: src,
	ClassPath: foreach $path in $downloaded[BundlePaths]: 
		[ $path ]
)

The above will download the bundles, and the pass their paths as input to the Java compiler task.