<commit_before>package xyz.papermodloader.tree;

import com.google.common.collect.ImmutableMap;
import org.gradle.api.*;
import xyz.papermodloader.tree.task.*;

import java.io.IOException;
import java.net.URL;

public class Tree implements Plugin<Project> {
    public static Tree INSTANCE;
    public static final String VERSION = "0.1.0";

    private Project project;
    private boolean headerDisplayed;

    @Override
    public void apply(Project project) {
        Tree.INSTANCE = this;
        this.project = project;
        this.project.apply(ImmutableMap.of("plugin", "java"));
        this.project.apply(ImmutableMap.of("plugin", "idea"));
        this.project.afterEvaluate(p -> this.afterEvaluate());
        this.project.getExtensions().create("paper", TreeExtension.class);

        this.addTask(Constants.TASK_DOWNLOAD_CLIENT, DownloadTask.class, task -> task.setInit(download -> {
            try {
                task.setCache(Constants.CLIENT_JAR_CACHE.get().getName());
                task.setFile(Constants.CLIENT_JAR.get());
                task.setURL(new URL(Constants.CLIENT_DOWNLOAD.get().url));
                task.setSHA1(Constants.CLIENT_DOWNLOAD.get().sha1);
            } catch (IOException e) {
                e.printStackTrace();
            }
        })).dependsOn(Constants.TASK_DOWNLOAD_ASSETS, Constants.TASK_DOWNLOAD_LIBRARIES);
        this.addTask(Constants.TASK_DOWNLOAD_LIBRARIES, DownloadLibrariesTask.class);
        this.addTask(Constants.TASK_DOWNLOAD_MAPPINGS, DownloadTask.class, task -> task.setInit(download -> {
            try {
                task.setCache(Constants.CLIENT_JAR_CACHE.get().getName());
                task.setFile(Constants.MAPPINGS_FILE_CACHE.get());
                task.setURL(new URL("http://ci.ilexiconn.net/job/Cardboard/" + this.getExtension().mappings + "/artifact/" + this.getExtension().minecraft + ".mappings"));
            } catch (IOException e) {
                e.printStackTrace();
            }
        }));
        this.addTask(Constants.TASK_DOWNLOAD_SERVER, DownloadTask.class, task -> task.setInit(download -> {
            try {
                task.setCache(Constants.SERVER_JAR_CACHE.get().getName());
                task.setURL(new URL(Constants.SERVER_DOWNLOAD.get().url));<commit_msg>Fix tasks not depending on mappings<commit_after>package xyz.papermodloader.tree;

import com.google.common.collect.ImmutableMap;
import org.gradle.api.*;
import xyz.papermodloader.tree.task.*;

import java.io.IOException;
import java.net.URL;

public class Tree implements Plugin<Project> {
    public static Tree INSTANCE;
    public static final String VERSION = "0.1.0";

    private Project project;
    private boolean headerDisplayed;

    @Override
    public void apply(Project project) {
        Tree.INSTANCE = this;
        this.project = project;
        this.project.apply(ImmutableMap.of("plugin", "java"));
        this.project.apply(ImmutableMap.of("plugin", "idea"));
        this.project.afterEvaluate(p -> this.afterEvaluate());
        this.project.getExtensions().create("paper", TreeExtension.class);

        this.addTask(Constants.TASK_DOWNLOAD_CLIENT, DownloadTask.class, task -> task.setInit(download -> {
            try {
                task.setCache(Constants.CLIENT_JAR_CACHE.get().getName());
                task.setFile(Constants.CLIENT_JAR.get());
                task.setURL(new URL(Constants.CLIENT_DOWNLOAD.get().url));
                task.setSHA1(Constants.CLIENT_DOWNLOAD.get().sha1);
            } catch (IOException e) {
                e.printStackTrace();
            }
        })).dependsOn(Constants.TASK_DOWNLOAD_ASSETS, Constants.TASK_DOWNLOAD_LIBRARIES);
        this.addTask(Constants.TASK_DOWNLOAD_LIBRARIES, DownloadLibrariesTask.class).dependsOn(Constants.TASK_DOWNLOAD_MAPPINGS);
        this.addTask(Constants.TASK_DOWNLOAD_MAPPINGS, DownloadTask.class, task -> task.setInit(download -> {
            try {
                task.setCache(Constants.CLIENT_JAR_CACHE.get().getName());
                task.setFile(Constants.MAPPINGS_FILE_CACHE.get());
                task.setURL(new URL("http://ci.ilexiconn.net/job/Cardboard/" + this.getExtension().mappings + "/artifact/" + this.getExtension().minecraft + ".mappings"));
            } catch (IOException e) {
                e.printStackTrace();
            }
        }));
        this.addTask(Constants.TASK_DOWNLOAD_SERVER, DownloadTask.class, task -> task.setInit(download -> {
            try {
                task.setCache(Constants.SERVER_JAR_CACHE.get().getName());
                task.setURL(new URL(Constants.SERVER_DOWNLOAD.get().url));
{'fraction_non_alphanumeric': 0.12747631352282515, 'fraction_numerical': 0.002153316106804479, 'mean_word_length': 2.7641815235008105, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 14, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '521603', 'n_tokens_mistral': 1353, 'n_tokens_neox': 1315, 'n_words': 190}