<commit_before>package de.hannesstruss.godot

import com.google.gson.GsonBuilder
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.joda.time.DateTime

class GodotPlugin implements Plugin<Project> {
  private final gson = GsonFactory.get()

  @Override
  void apply(Project project) {
    def start = System.currentTimeMillis()

    project.gradle.buildFinished { buildResult ->
      def seconds = ((System.currentTimeMillis() - start) / 1000.0)
      log(project, seconds.toDouble(), buildResult.getFailure() == null)
    }

    def generate = project.tasks.create("generateGodotReport", GenerateReportTask)
    generate.inputFile = new File("${project.rootDir}/godot.log")
    generate.outputDir = new File("${project.buildDir}/outputs/godot")
  }
<commit_msg>don't log generating the report<commit_after>package de.hannesstruss.godot

import org.gradle.api.Plugin
import org.gradle.api.Project
import org.joda.time.DateTime

class GodotPlugin implements Plugin<Project> {
  private static final GENERATE_TASK_NAME = "generateGodotReport"
  private final gson = GsonFactory.get()

  @Override
  void apply(Project project) {
    def start = System.currentTimeMillis()

    project.gradle.buildFinished { buildResult ->
      // don't log generating our report
      if (project.gradle.startParameter.taskNames.findAll({ it.contains(GENERATE_TASK_NAME) }).isEmpty()) {
        def seconds = ((System.currentTimeMillis() - start) / 1000.0)
        log(project, seconds.toDouble(), buildResult.getFailure() == null)
      }
    }

    def generate = project.tasks.create(GENERATE_TASK_NAME, GenerateReportTask)
    generate.inputFile = new File("${project.rootDir}/godot.log")
    generate.outputDir = new File("${project.buildDir}/outputs/godot")
  }

{'fraction_non_alphanumeric': 0.11744776962168267, 'fraction_numerical': 0.00564652738565782, 'mean_word_length': 4.211764705882353, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3746806', 'n_tokens_mistral': 549, 'n_tokens_neox': 526, 'n_words': 108}