<commit_before>package glide.runner.services

import org.gradle.tooling.GradleConnector
import org.gradle.tooling.ProjectConnection

/**
 * Simple wrapper around gradle api
 */
class GradleProjectRunner {
    ProjectConnection connection

    GradleProjectRunner(File root) {
        connection = GradleConnector.newConnector()
                .forProjectDirectory(root)
                .connect()
    }

    def run(String taskName) {
        try {
            connection.newBuild()
                    .forTasks(taskName)
                    .setJvmArguments("-Xmx512m", "-XX:MaxPermSize=256m")
                    .withArguments("--no-search-upward",'-q')
                    .run();
        } catch (e) {
            System.err.println(e.toString())
        }
    }

    def cleanup() {
        connection.close();
    }
}
<commit_msg>support multiple task-names. also max perm wont make sense in jdk 8. later extract the config out<commit_after>package glide.runner.services

import org.gradle.tooling.GradleConnector
import org.gradle.tooling.ProjectConnection

/**
 * Simple wrapper around gradle api
 */
class GradleProjectRunner {
    ProjectConnection connection

    GradleProjectRunner(File root) {
        connection = GradleConnector.newConnector()
                .forProjectDirectory(root)
                .connect()
    }

    def run(String ...taskNames) {
        try {
            connection.newBuild()
                    .forTasks(taskNames)
                    .setJvmArguments("-Xmx512m")
                    .withArguments("--no-search-upward",'-q')
                    .run();
        } catch (e) {
            System.err.println(e.toString())
        }
    }

    def cleanup() {
        connection.close();
    }
}

{'fraction_non_alphanumeric': 0.10671256454388985, 'fraction_numerical': 0.005737234652897304, 'mean_word_length': 1.873146622734761, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5901135', 'n_tokens_mistral': 489, 'n_tokens_neox': 464, 'n_words': 89}