Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enchancement] An easier way to enable mixin class export and mixin hot swap agent #1037

Open
maityyy opened this issue Feb 2, 2024 · 1 comment
Milestone

Comments

@maityyy
Copy link

maityyy commented Feb 2, 2024

I use this and it looks ugly

afterEvaluate {
    loom.runs.configureEach {
        // https://gist.github.com/maityyy/3dbcd558d58a6412c3a2a38c72706e8e
        vmArg "-javaagent:${ configurations.compileClasspath.find { it.name.contains("sponge-mixin") } }"

        // https://github.com/SpongePowered/Mixin/wiki/Mixin-Java-System-Properties
        property "mixin.debug.export=true" // export classes with all mixin changes to run/.mixin.out
    }
}

IMO, these features are quite useful and common since most of Fabric dev is working with mixins, so enabling these features should be easier.

I suggest that these features can be enabled globally and separately for each run config

// Globally
loom {
    exportMixinClasses
    enableMixinHotSwapAgent
}

// Per run config
loom {
    runs {
        client {
            exportMixinClasses
            enableMixinHotSwapAgent
        }
    }
}

And please, no boolean flags, they look really ugly

@maityyy maityyy changed the title [Enchancement] An easier way to auto export mixin classes and connect the mixin hotswap agent [Enchancement] An easier way to enable mixin class export and mixin hot swap agent Feb 2, 2024
@modmuss50
Copy link
Member

This should be possible, loom will need a task to copy the mixin agent jar to somewhere static, within the project .gradle directory, as it cannot be set via DLI.

@modmuss50 modmuss50 added this to the 1.6 milestone Feb 3, 2024
@modmuss50 modmuss50 modified the milestones: 1.6, 1.7 Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants