<commit_before>package com.thilko.springdoc

import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.Copy
import org.gradle.api.tasks.compile.JavaCompile


class SpringDocPlugin implements Plugin<Project> {

    @Override
    void apply(Project project) {
        project.plugins.apply("java")

        if (project.configurations.findByName("springdoc") == null) {
            project.configurations.create("springdoc")
        }
        project.dependencies {
            springdoc "com.thilko.spring:gradle-springdoc-plugin:0.3.1"
            springdoc localGroovy()
        }

        project.task(type: Copy, "copyCss") {
            project.afterEvaluate {
                from project.zipTree(project.configurations.springdoc.filter { it.name.startsWith('gradle-springdoc-plugin') }.singleFile)
                include "springdoc.css"
                into "${project.buildDir}/springdoc"
            }
        }

        project.task(type: JavaCompile, "generateSpringDoc", dependsOn: project.copyCss) {
            project.afterEvaluate {
                source = project.sourceSets.main.java
                classpath = project.files(project.configurations.compile, project.configurations.springdoc,
                        project.sourceSets.main.output)

                options.compilerArgs = [
                        "-s", "${project.buildDir}",<commit_msg>copy springdoc css in the build dir<commit_after>package com.thilko.springdoc

import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.Copy
import org.gradle.api.tasks.compile.JavaCompile


class SpringDocPlugin implements Plugin<Project> {

    @Override
    void apply(Project project) {
        project.plugins.apply("java")

        if (project.configurations.findByName("springdoc") == null) {
            project.configurations.create("springdoc")
        }
        project.dependencies {
            springdoc "com.thilko.spring:gradle-springdoc-plugin:0.3.1"
            springdoc localGroovy()
        }

        project.task(type: Copy, "copyCss") {
            project.afterEvaluate {
                from project.zipTree(project.configurations.springdoc.filter { it.name.startsWith('gradle-springdoc-plugin') }.singleFile)
                include "springdoc.css"
                into "${project.buildDir}"
            }
        }

        project.task(type: JavaCompile, "generateSpringDoc", dependsOn: project.copyCss) {
            project.afterEvaluate {
                source = project.sourceSets.main.java
                classpath = project.files(project.configurations.compile, project.configurations.springdoc,
                        project.sourceSets.main.output)

                options.compilerArgs = [
                        "-s", "${project.buildDir}",
{'fraction_non_alphanumeric': 0.10554371002132196, 'fraction_numerical': 0.0021321961620469083, 'mean_word_length': 2.2581018518518516, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5561434', 'n_tokens_mistral': 779, 'n_tokens_neox': 726, 'n_words': 115}