java-mixin-stubber


License

License

Categories

Categories

Java Languages Mixin Application Layer Libs Bytecode Manipulation
GroupId

GroupId

de.lolhens
ArtifactId

ArtifactId

java-mixin-stubber
Last Version

Last Version

0.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

java-mixin-stubber
java-mixin-stubber
Project URL

Project URL

https://github.com/LolHens/java-mixin-stubber
Project Organization

Project Organization

de.lolhens
Source Code Management

Source Code Management

https://github.com/LolHens/java-mixin-stubber

Download java-mixin-stubber

How to add to project

<!-- https://jarcasting.com/artifacts/de.lolhens/java-mixin-stubber/ -->
<dependency>
    <groupId>de.lolhens</groupId>
    <artifactId>java-mixin-stubber</artifactId>
    <version>0.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/de.lolhens/java-mixin-stubber/
implementation 'de.lolhens:java-mixin-stubber:0.0.2'
// https://jarcasting.com/artifacts/de.lolhens/java-mixin-stubber/
implementation ("de.lolhens:java-mixin-stubber:0.0.2")
'de.lolhens:java-mixin-stubber:jar:0.0.2'
<dependency org="de.lolhens" name="java-mixin-stubber" rev="0.0.2">
  <artifact name="java-mixin-stubber" type="jar" />
</dependency>
@Grapes(
@Grab(group='de.lolhens', module='java-mixin-stubber', version='0.0.2')
)
libraryDependencies += "de.lolhens" % "java-mixin-stubber" % "0.0.2"
[de.lolhens/java-mixin-stubber "0.0.2"]

Dependencies

compile (2)

Group / Artifact Type Version
org.scala-lang : scala-library jar 2.13.3
com.github.javaparser : javaparser-core jar 3.16.1

Project Modules

There are no modules declared in this project.

java-mixin-stubber

Test Workflow Release Notes Maven Central Apache License 2.0

Removes everything from java source files that is not needed for Mixin's RefMap generation. This currently includes comments, project specific imports and method bodies.

Using this to generate a RefMap from src/main/scala in forgegradle

buildscript {
    dependencies {
        classpath 'de.lolhens:java-mixin-stubber:0.0.2'
    }
}

def mixinstubsDir = file("$compileJava.temporaryDir/mixinstubs")

sourceSets.main.java.srcDirs += mixinstubsDir

def mixinstubs = task('mixinstubs') {
    doLast {
        delete(mixinstubsDir)
        de.lolhens.jstubber.Stubber.MIXIN.stubDirectory(sourceSets.main.scala.srcDirs[0].toPath(), mixinstubsDir.toPath())
    }
}

compileJava.dependsOn(mixinstubs)

compileJava.doLast {
    delete(compileJava.destinationDir)
    delete(mixinstubsDir)
}

compileScala.doFirst {
    compileScala.options.compilerArgs += compileJava.options.compilerArgs
}

mixin {
    add sourceSets.main, "${mod_id}.refmap.json"
}

Versions

Version
0.0.2
0.0.1