protected List<String> getCompileCommand() throws IOException {
		List<String> compileCmd = new ArrayList<>();

		Project project = ctx.getProject();
		compileCmd.add(getCompilerBinary());
		compileCmd.addAll(getCompileCommandOptions());

		// add source files to compile
		compileCmd.addAll(project.getMainSourceSet()
			.getSources()
			.stream()
			.map(x -> x.getFile().toString())
			.collect(Collectors.toList()));

		if (project.getModuleName().isPresent()) {
			if (project.getMainSource() != null && !project.getMainSource().getJavaPackage().isPresent()) {
				throw new ExitException(BaseCommand.EXIT_INVALID_INPUT,
						"Module code cannot work with the default package, adding a 'package' statement is required");
			}
			if (!hasModuleInfoFile()) {
				// generate module-info descriptor and add it to list of files to compile
				Path infoFile = ModuleUtil.generateModuleInfo(ctx);
				if (infoFile != null) {
					compileCmd.add(infoFile.toString());
				}
			}
		}

		return compileCmd;
	}
This class takes a <code>Project</code> and compiles it.
src/main/java/dev/jbang/source/buildsteps/CompileBuildStep.java