Giter Site home page Giter Site logo

grimoire-shenanigans's Introduction

Grimoire Shenanigans

Gradle plugin that simplifies workspace setup for Grimoire implementers. Works in tandem with ForgeGradle (and MixinGradle if on 1.12.2).

Workspace Setup:

For an example of how this plugin can be used in project, check out following templates.

Features:

  • Compatible with both 1.7.10 and 1.12.2 toolchain;
  • On 1.7.10, fully takes care of specifying proper compiler arguments to ensure Mixin annotation processor will do its job and generate appropriate refmap when compiling;
  • Automatically specifies repository where Grimoire can be located, as well as proper artifacts to use at compile-time and runtime;
  • Adds tasks for clearing build cache and resource cache before constructing a jar. Needed to ensure proper file inflation/token replacement when building;
  • For Eclipse projects, adds an amount of access rules to .classpath, which help you to not accidentally stick your fingers into non-API parts of Grimoire;
  • Integrates Mixin annotation processor tests for Eclipse IDE;
  • Automatically replaces @MIXIN_REFMAP@ when processing project resources and sources with actual refmap name as specified by mixinRefmapName property.

Gradle Properties

This plugin uses an amount of properties which you can specify in gradle.properties file if you need to control them. Among these are:

  • grimoireVersion, allows you define Grimoire version that should be attached as dependency to project. Can be either strict version or maven-like version range;
  • grimoireRestrictionRule, which allows you to specify what type of access rules will be defined for non-API parts of Grimoire in Eclipse projects. Possible values are nonaccessible (default), discouraged and accessible;
  • disableGrimoireDependency, allows to prevent plugin from automatically specifying Grimoire artifacts among project dependencies. Might be useful if you, for instance, use custom mappings and need to create your own deobfuscated artifact to serve as dev version;
  • mixinRefmapName, specifies mixin refmap name that will be generated for this project and embedded in production jar. Can include subdirectories to avoid conflicting refmap names on the classpath in runtime, for instance examplemod/examplemod.refmap.json will put your refmap with name examplemod.refmap.json into examplemod folder within your jar when building;
  • disableMixinRefmap, allows to disable adding tasks for refmap generation and embedding it into main .jar artifact upon building. Might be useful if you want your particular project to depend on Grimoire for extra features like omniconfig or EventHelper integration, but don't need Mixin itself;
  • isGrimoireItself, should only be used by Grimoire project alone.

grimoire-shenanigans's People

Contributors

aizistral avatar

Watchers

 avatar  avatar  avatar

grimoire-shenanigans's Issues

Intellij Idea - AP Configuration Issues

In an instance when Idea is used as IDE and Grimoire-dependent project is imported as Gradle project, Mixin AP cannot be properly configured if build is forced to be done by IDE itself and not by Gradle (one of possible settings in "Build, Execution, Deployment"). Currently this can be worked around by manually specifying MCP->SRG mappings file via IDE-specific java compiler option, but it will be nice to detect and address this sort of situation automatically in future.

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.