<commit_before>package org.xtend.gradle.tasks

import java.io.File
import java.util.List
import org.eclipse.xtend.lib.annotations.Accessors
import org.gradle.api.GradleException
import org.gradle.api.file.FileCollection
import org.gradle.api.file.SourceDirectorySet
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputFiles
import org.gradle.api.tasks.Nested
import org.gradle.api.tasks.Optional
import org.gradle.api.tasks.SkipWhenEmpty
import org.gradle.api.tasks.compile.AbstractCompile
import org.gradle.api.tasks.TaskAction

@Accessors
class XtendCompile extends AbstractCompile {
	@InputFiles SourceDirectorySet srcDirs
	@InputFiles @Optional String bootClasspath
	@InputFiles FileCollection xtendClasspath
	@Input File classesDir;
	@Nested XtendCompileOptions options = new XtendCompileOptions

	@InputFiles @SkipWhenEmpty
	def getXtendSources() {
		getSrcDirs.filter[path.endsWith(".xtend")]
	}

	@TaskAction
	override compile() {
		val sourcePath = getSrcDirs.srcDirTrees.filter[dir.exists].map[dir.absolutePath].join(File.pathSeparator)
		val compilerArguments = newArrayList(
			"-cp",
			classpath.asPath,
			"-d",
			project.file(destinationDir).absolutePath,
			"-encoding",
			getOptions.encoding,
			"-td",
			new File(project.buildDir, "xtend-temp").absolutePath
		)
		if (getBootClasspath !== null) {
			compilerArguments += #[
				"-bootClasspath",
				getBootClasspath
			]
		}
		compilerArguments += #["-javaSourceVersion", sourceCompatibility]
		if (!getOptions.addSuppressWarnings) {
			compilerArguments += #["-noSuppressWarningsAnnotation"]
		}
		getOptions.generatedAnnotation => [
			if (active) {
				compilerArguments += #["-generateGeneratedAnnotation"]
				if (includeDate) {
					compilerArguments += #["-includeDateInGeneratedAnnnotation"]
				}
				if (comment != null) {<commit_msg>filter nonexisting directories from the classpath<commit_after>package org.xtend.gradle.tasks

import java.io.File
import java.util.List
import org.eclipse.xtend.lib.annotations.Accessors
import org.gradle.api.GradleException
import org.gradle.api.file.FileCollection
import org.gradle.api.file.SourceDirectorySet
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputFiles
import org.gradle.api.tasks.Nested
import org.gradle.api.tasks.Optional
import org.gradle.api.tasks.SkipWhenEmpty
import org.gradle.api.tasks.compile.AbstractCompile
import org.gradle.api.tasks.TaskAction

@Accessors
class XtendCompile extends AbstractCompile {
	@InputFiles SourceDirectorySet srcDirs
	@InputFiles @Optional String bootClasspath
	@InputFiles FileCollection xtendClasspath
	@Input File classesDir;
	@Nested XtendCompileOptions options = new XtendCompileOptions

	@InputFiles @SkipWhenEmpty
	def getXtendSources() {
		getSrcDirs.filter[path.endsWith(".xtend")]
	}

	@TaskAction
	override compile() {
		val sourcePath = getSrcDirs.srcDirTrees.map[dir].filter[exists].map[absolutePath].join(File.pathSeparator)
		val compilerArguments = newArrayList(
			"-cp",
			classpath.filter[exists].asPath,
			"-d",
			project.file(destinationDir).absolutePath,
			"-encoding",
			getOptions.encoding,
			"-td",
			new File(project.buildDir, "xtend-temp").absolutePath
		)
		if (getBootClasspath !== null) {
			compilerArguments += #[
				"-bootClasspath",
				getBootClasspath
			]
		}
		compilerArguments += #["-javaSourceVersion", sourceCompatibility]
		if (!getOptions.addSuppressWarnings) {
			compilerArguments += #["-noSuppressWarningsAnnotation"]
		}
		getOptions.generatedAnnotation => [
			if (active) {
				compilerArguments += #["-generateGeneratedAnnotation"]
				if (includeDate) {
					compilerArguments += #["-includeDateInGeneratedAnnnotation"]
				}
				if (comment != null) {
{'fraction_non_alphanumeric': 0.11141011840688912, 'fraction_numerical': 0.0, 'mean_word_length': 5.034090909090909, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5046421', 'n_tokens_mistral': 1272, 'n_tokens_neox': 1123, 'n_words': 205}