SpongePowered/MixinGradle

Name: MixinGradle

Owner: SpongePowered

Description: Gradle plugin that adds the Mixin technology capability to your project.

Created: 2015-12-04 02:15:19.0

Updated: 2018-05-22 01:42:01.0

Pushed: 2017-10-01 19:45:28.0

Homepage: null

Size: 51

Language: Groovy

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

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 to your buildScript -> dependencies block:

    dscript {
    repositories {
        <add source repository here>
    }
    dependencies {
        ...
        classpath 'org.spongepowered:mixingradle:0.5-SNAPSHOT'
    }
    
    
  2. Apply the plugin:

    y plugin: 'org.spongepowered.mixin'
    
  3. 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.

    n {
    add sourceSets.main, "main.refmap.json"
    add sourceSets.another, "another.refmap.json"
    
    
  4. Alternatively, you can simply specify the ext.refMap property directly on your sourceSet:

    ceSets {
    main {
        ext.refMap = "main.refmap.json"
    }
    another {
        ext.refMap = "another.refmap.json"
    }
    
    
  5. 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:

    n {
    disableTargetExport = true
    disableTargetValidator = true
    
    

    or simply issuing them as directives:

    n {
    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:

    n {
    // Specify "notch" or "searge" here
    defaultObfuscationEnv notch
    
    
Building MixinGradle

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

gradle

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

gradle build install

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.