• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

SpongePowered/MixinGradle: Gradle plugin that adds the Mixin technology capabili ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

SpongePowered/MixinGradle

开源软件地址(OpenSource Url):

https://github.com/SpongePowered/MixinGradle

开源编程语言(OpenSource Language):

Groovy 97.4%

开源软件介绍(OpenSource 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



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap