Mixin refmap won't generate

I know, trust me. “You shouldn’t use mixins when this is possible within the api!” Trust me, I believe in this philosophy; however, what I am doing here is only a test for much more complicated things I plan on doing in the future.

So I’ve setup a gradle project following the docs very closely, but a refmap doesn’t generate when I build my project. I’m trying to inject a handler method into BlockLeaves#updateTick(). Since no refmap is created, running it on my local test server spits errors saying no method found.


public abstract class MixinBlockLeaves {
    @Inject(method = "updateTick", at = @At("HEAD"))
    public void onUpdate(CallbackInfo callback) {
        System.out.println("Leaves update");

Mixin json:

    "package": "%group%.core.sponge.mixin",
    "refmap": "mixins.%group%.refmap.json",
    "target": "@env(DEFAULT)",
    "compatibilityLevel": "JAVA_8",
    "minVersion": "0.7.2",
    "mixins": [


buildscript {
    repositories {
        maven {
            url 'http://files.minecraftforge.net/maven' /* Forge */

        maven {
            url 'https://repo.spongepowered.org/maven' /* Sponge */

    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
        classpath 'org.spongepowered:mixingradle:0.6-SNAPSHOT'

plugins {
    id 'org.spongepowered.plugin' version '0.8.1'

apply plugin: 'net.minecraftforge.gradle.forge'
apply plugin: 'org.spongepowered.mixin'

dependencies {
    compile project(':%group%-common')

    compileOnly 'org.spongepowered:spongeapi:7.0.0-SNAPSHOT'
    compileOnly 'org.spongepowered:mixin:0.7.2-SNAPSHOT'

minecraft {
    version = '1.12.2-'
    mappings = 'snapshot_20171025'

jar {
        'TweakClass': 'org.spongepowered.asm.launch.MixinTweaker',
        'MixinConfigs': 'mixins.%group%.json',
        'FMLCorePluginContainsFMLMod': 'true',

sourceSets {
    main {
        ext.refMap = "mixins.%group%.refmap.json"

Solution: Calling shadowJar when building the project stops refmap from being generated.