<commit_before>GradlePrePatcher [![Build Status](http://nallar.me/buildservice/job/GradlePrePatcher/badge/icon)](http://nallar.me/buildservice/job/GradlePrePatcher/)
==========
Tool for prepatching minecraft source files. Intended for use with [ModPatcher](https://github.com/nallar/ModPatcher).

Copyright &copy; 2014, nallar <<EMAIL>>
LogSpamMustDie is licensed under the MIT license.

Usage
--------
Add a dependency on GradlePrePatcher to your build.gradle: 

```gradle
buildscript {
    repositories {
        // ... more repositories here
        maven {
            name = 'nallar'
            url = 'http://repo.nallar.me/'
        }
    }
    dependencies {
        // ... more deps here
        classpath 'me.nallar:GradlePrePatcher:1.0-SNAPSHOT'
    }
}
```

Add these hooks to the end of your build.gradle:

```gradle
import nallar.nmsprepatcher.Main;

// Change these
def sourceRoot = "src/main/java/" 
def patchPackageName = "org.example.patched"

def prepatchInputs = {
    // Prepatching must run if patch code is updated,
    inputs.dir file(sourceRoot + patchPackageName.replace(".", "/"))
}

project.tasks.deobfBinJar.setDirty()

afterEvaluate {
    Main.loadPatches(file(sourceRoot), file(sourceRoot + patchPackageName.replace(".", "/")))

    deobfBinJar prepatchInputs
    extractMinecraftSrc prepatchInputs
    project.tasks.deobfBinJar.doLast { task -><commit_msg>Update wrong import in README.me<commit_after>GradlePrePatcher [![Build Status](http://nallar.me/buildservice/job/GradlePrePatcher/badge/icon)](http://nallar.me/buildservice/job/GradlePrePatcher/)
==========
Tool for prepatching minecraft source files. Intended for use with [ModPatcher](https://github.com/nallar/ModPatcher).

Copyright &copy; 2014, nallar <<EMAIL>>
LogSpamMustDie is licensed under the MIT license.

Usage
--------
Add a dependency on GradlePrePatcher to your build.gradle: 

```gradle
buildscript {
    repositories {
        // ... more repositories here
        maven {
            name = 'nallar'
            url = 'http://repo.nallar.me/'
        }
    }
    dependencies {
        // ... more deps here
        classpath 'me.nallar:GradlePrePatcher:1.0-SNAPSHOT'
    }
}
```

Add these hooks to the end of your build.gradle:

```gradle
import me.nallar.gradleprepatcher.Main;

// Change these
def sourceRoot = "src/main/java/" 
def patchPackageName = "org.example.patched"

def prepatchInputs = {
    // Prepatching must run if patch code is updated,
    inputs.dir file(sourceRoot + patchPackageName.replace(".", "/"))
}

project.tasks.deobfBinJar.setDirty()

afterEvaluate {
    Main.loadPatches(file(sourceRoot), file(sourceRoot + patchPackageName.replace(".", "/")))

    deobfBinJar prepatchInputs
    extractMinecraftSrc prepatchInputs
    project.tasks.deobfBinJar.doLast { task ->
{'fraction_non_alphanumeric': 0.1320956801142449, 'fraction_numerical': 0.004284184219921457, 'mean_word_length': 3.344186046511628, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 2, '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': '1901374', 'n_tokens_mistral': 934, 'n_tokens_neox': 894, 'n_words': 196}