Plugin for Minecraft Dev projects that allows use BON2 as analog of fg.reobf from ForgeGradle

Overview

Bon2Gradle

Plugin for Minecraft Dev projects that allows use BON2 as analog of fg.reobf from ForgeGradle.

GitHub issues GitHub forks GitHub stars GitHub license JitPack JitCI status GitHub CI test status

Usage

Dependencies

  • Gradle 6.8+ (Provider as dependency notation).
  • Java 8+ (lambdas and streams).

Adding plugin to build script

buildscript {
    repositories {
        // Add JitPack.io to your build script repositories
        maven { url 'https://jitpack.io' } 
        
        // ForgeGradle stuff
        maven { 
            name 'forge'
            url 'https://maven.minecraftforge.net/'
        }
    }
    dependencies {
        // ForgeGradle (fork by anatawa12) stuff
        classpath('com.anatawa12.forge:ForgeGradle:1.2-1.0.+') {
            changing = true
        }
        
        // Add this dependency, you can use "master-SNAPSHOT" as version for using last commit
        classpath 'com.github.MJaroslav:Bon2Gradle:0.4.0'
    }
}

apply plugin: 'bon2gradle' // Applying plugin

Plugin configuring

// Extension for BON2 configuring
// option = defaultValue // Description
bon2 {
    useParallelDeobfuscation = false // If dependency contains more than one file,
    // then they will deobfuscated paralelly
    forceMapping = false // Use only next mapping for all dependencies
    forcedMappingLocation = null // Directory with methods.csv and fields.csv files
    forcedMappingRelativeConfPath = null // Additional relative path from uppder parameter file.
    // ^ 'unpacked/conf' will be used if not present ^
    
    mappingProvider = 'io.github.mjaroslav.bon2gradle.api.impl.FG12Provider'
    // Just 'io.github.mjaroslav.bon2gradle.api.MappingProvider' interface realization
    // For getting your current Minecraft Dev plugin mapping     
}

Deobfuscating dependencies

Just wrap dependency identifier string to bon2.deobf method:

repositories {
    mavenCentral()
    maven {
        url "https://cursemaven.com/"
        content {
            includeGroup "curse.maven"
        }
    }
}

dependencies {
    // HEE mod from cursemaven just for example
    // All deobfuscated jars will be saved in special directory insode of project build directory.
    implementation bon2.deobf("curse.maven:hardcore-ender-expansion-228015:2316923")
}

Supported Minecraft Dev Plugins

  • It's written and tested with ForgeGradle-1.2 fork by anatawa12.
  • In theory, if I don't use any code of FG outside from their MappingProvider then you can use it with any other plugin.

Building

Just clone repository, checkout to this branch and run ./gradlew build. It will build project with unit tests, if you want to run functional tests to, run it with CI=true environment variable.

Minimal required JDK version is 8. You can see some syntax sugar from the newest versions, it possible by Jabel plugin.

Post Scriptum

Feel free to correct typos and errors in the text or code :)

You might also like...
McMotd - Mirai Plugin for fetching motd from minecraft servers

Mirai-wiki 基于mirai的Minecraft服务器信息查询插件 关于Linux运行环境 如果你正在使用Linux而不是Windows来运行Mirai

Kauth - Open-source powerful minecraft authorization plugin
Kauth - Open-source powerful minecraft authorization plugin

KAuth KAuth is a minecraft plugin for offline-mode authorization on your server.

An advanced Minecraft plugin template made in Gradle

//DONT_APPLY_TEMPLATE_CHANGE Gradle Plugin Template Kotlin DSL Version ℹ️ This template was planned to support only kotlin, but it also supports Java!

Simple (and useless) Minecraft plugin

CDS Minecraft plugin Simple plugin for Minecraft, without any useful feature 🖥 Installation 🧾 Requirements maven 3.0+ java 8+ spigot server 1.19+ 🔧

An easy to use package manager for Fabric Minecraft mods.

pacmc pacmc is a package manager for Fabric Minecraft mods. The aim of this project is to massively reduce the effort you have to put in to installing

A Kotlin compiler plugin that allows Java callers to pass in null for default parameters

kotlin-null-defaults (Compiler plugin) (Gradle Plugin) ( Currently pending approval) A Kotlin compiler plugin that allows Java callers to pass in null

Open as default - A flutter plugin that allows setting up your flutter app to open files as default
Open as default - A flutter plugin that allows setting up your flutter app to open files as default

open_as_default A flutter plugin that allows setting up your flutter app to open

A collection of hand-crafted extensions for your Kotlin projects.

Splitties Splitties is a collection of small Kotlin multiplatform libraries (with Android as first target). These libraries are intended to reduce the

Starter Kit for Android projects.

About Android Starter Kit was created as a way to save time when starting a new Android project. It is a simple native single-module app based on MVVM

Releases(v0.4.0)
Owner
Yaroslav Novitsky
Yaroslav Novitsky
kinstall is an easy way to install gradle-based command-line kotlin projects that use the application plugin.

kinstall kinstall is an easy way to install gradle-based command-line kotlin projects that use the application plugin. use First, install kinstall its

david kilmer 0 Apr 24, 2022
A minecraft modification based on Fabric with Yarn Mappings, developed for the newest version of the sandbox game Minecraft.

JupiterClient A minecraft modification based on Fabric with Yarn Mappings, developed for the newest version of the sandbox game Minecraft. Building th

Cedric H. 1 Jun 27, 2022
Unofficial Android client for dev.to. Open source and free

Dev.to Android by Android Broadcast Unofficial Android client for dev.to Technologies Kotlin Gradle Kotlin DSL Kotlin Coroutines OkHttp + Retrofit kot

Android Broadcast 76 Nov 30, 2022
The KPy gradle plugin allows you to write Kotlin/Native code and use it from python.

The KPy gradle plugin allows you to write Kotlin/Native code and use it from python.

Martmists 14 Dec 26, 2022
A Gradle plugin for Kotlin Multiplatform projects that generate a XCFramework for Apple targets or a FatFramework for iOS targets, and manages the publishing process in a CocoaPod Repository.

KMP Framework Bundler KMP Framework Bundler is a Gradle plugin for Kotlin Multiplatform projects that generate a XCFramework for Apple targets or a Fa

Marco Gomiero 17 Oct 29, 2022
Gradle plugin adding a task to run a Paper Minecraft server

Run Paper Run Paper is a Gradle plugin which adds a task to automatically download and run a Paper Minecraft server along with your plugin built by Gr

Jason 64 Dec 29, 2022
An under development minecraft plugin (1.8.8) to learning Kotlin language

CorePlus CorePlus is a minecraft plugin coded with Kotlin language. Still under development CorePlus will be an essential for each minecraft servers !

Gonz 3 Jun 16, 2021
VirtualTag is a name tag edit plugin for minecraft server

VirtualTag VirtualTag is a NameTag Edit plugin for modern minecraft server Support Version 1.17.x Download https://github.com/jiangdashao/VirtualTag/r

RERERE 13 Dec 18, 2022
An open-source plugin that accommodates Starships on Minecraft servers.

Minecraft Starship Plugin An open-source plugin that accommodates starships on minecraft servers. 'A shameless rip-off of Star Legacy's plugins.' Mine

null 4 Dec 13, 2021
LanServers - A small plugin written in Kotlin that runs on all major Minecraft Servers

LanServers This is a small plugin written in Kotlin that runs on all major Minec

Redstonecrafter0 6 Mar 12, 2022