Giter Club home page Giter Club logo

gradle-specialsource's Introduction

gradle-specialsource

A Gradle plugin for remap name definitions in java bytecode using md-5's SpecialSource.

Initial use-case was, using Mojang mapping for Spigot 1.17+ development, then remap back to Spigot mapping for distribution.

Here md-5's post to see what changed in 1.17+.

Usage

plugins {
    id("io.typecraft.gradlesource.spigot") version "1.0.0"
}

dependencies {
    // Requires BuildTools to run with `--remapped` option to use this local dependency.
    compileOnly("org.spigotmc:spigot:1.17.1-R0.1-SNAPSHOT:remapped-mojang")
}

spigotRemap {
    spigotVersion.set("1.17.1")
    sourceJarTask.set(tasks.jar) // or `tasks.shadowJar` if you use Shadow plugin.
}

Developer notes

This is a performance improvement to avoid redoing already completed job, skip gradle tasks if it's input not changed.

To remap java .class files, it should be a task input.

But currently, RemapTask just checking a .jar file not .class files, therefore it remaps all classes even just a single class modified.

The reason why we can't check classes instead of jar is, this plugin depends on md5's SpecialSource which makes hard to doing that.

This limitation is same with the SpecialSourceMP which for Maven, and it doesn't support any incremental!

To improve this, we should refactor SpecialSource or just create a new one including only pure functions.

References

What changed in 1.17: https://www.spigotmc.org/threads/spigot-bungeecord-1-17.510208/#post-4184317

SpecialSource: https://github.com/md-5/SpecialSource

SpecialSource Maven plugin: https://github.com/agaricusb/SpecialSourceMP

gradle-specialsource's People

Contributors

entrypointkr avatar nkomarn avatar

Watchers

 avatar

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.