createCompileTask function

Task createCompileTask(
  1. JbFiles jbFiles,
  2. JbConfigContainer config,
  3. DartleCache cache,
  4. JBuildSender jBuildSender,
)

Create the compile task.

Implementation

Task createCompileTask(JbFiles jbFiles, JbConfigContainer config,
    DartleCache cache, JBuildSender jBuildSender) {
  final workingDir = Directory.current.path;
  return Task(
      (List<String> args, [ChangeSet? changes]) => _compile(
          jbFiles, config, workingDir, changes, args, cache, jBuildSender),
      runCondition: _createCompileRunCondition(config, cache),
      name: compileTaskName,
      argsValidator: const AcceptAnyArgs(),
      dependsOn: const {
        installCompileDepsTaskName,
        installProcessorDepsTaskName
      },
      description: 'Compile Java source code.');
}