Giter Site home page Giter Site logo

mixingradle's Introduction

MixinGradle Logo

MixinGradle is a Gradle plugin which simplifies the build-time complexity of working with the SpongePowered Mixin framework for Java. It currently only supports usage with ForgeGradle.

Features

MixinGradle automates the following tasks:

Using MixinGradle

To use MixinGradle you must be using ForgeGradle. To configure the plugin for your build:

  1. Add a source repository and the MixinGradle dependency to your buildScript -> dependencies block:
buildscript {
       repositories {
           <add source repository here>
       }
       dependencies {
           ...
           classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
       }
}

Please ensure you are using the correct version of MixinGradle for your ForgeGradle version. Versions are not interchangeable.

ForgeGradle Version Mixin Version MixinGradle Version To Use
2.3 0.8 and below 0.6-SNAPSHOT
3.0+ 0.8 0.7-SNAPSHOT
  1. Apply the plugin:
apply plugin: 'org.spongepowered.mixin'
  1. Create your mixin block, specify which sourceSets to process and provide refmap resource names for each one, the generated refmap will be added to the compiler task outputs automatically.
mixin {
       add sourceSets.main, "main.refmap.json"
       add sourceSets.another, "another.refmap.json"
}
  1. Alternatively, you can simply specify the ext.refMap property directly on your sourceSet:
sourceSets {
       main {
           ext.refMap = "main.refmap.json"
       }
       another {
           ext.refMap = "another.refmap.json"
       }
}
  1. You can define other mixin AP options in the mixin block, for example disableTargetValidator and disableTargetExport can be configured either by setting them as boolean properties:
mixin {
       disableTargetExport = true
       disableTargetValidator = true
}

or simply issuing them as directives:

mixin {
       disableTargetExport
       disableTargetValidator
}

You can also set the default obfuscation environment for generated refmaps, this is the obfuscation environment which will be contributed to the refmap's mappings node:

mixin {
       // Specify "notch" or "searge" here
       defaultObfuscationEnv notch
}

Building MixinGradle

MixinGradle can of course be built using Gradle. To perform a build simply execute:

gradlew build

To add the compiled jar to your local maven repository, run:

gradlew publishToMavenLocal

mixingradle's People

Contributors

mumfrey avatar lexmanos avatar sizableshrimp avatar killjoy1221 avatar stephan-gh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.