Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed May 12, 2024
1 parent dc3eb3e commit ec34e6d
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,29 +59,34 @@ you can create a custom task by doing:
task customDowngrade(type: xyz.wagyourtail.jvmdg.gradle.task.DowngradeJar) {
inputFile = tasks.jar.archiveFile
downgradeTo = JavaVersion.VERSION_1_8 // default
sourceSet = sourceSets.main // default
sourceSet = sourceSets.main // default, used for classpath
archiveClassifier = "downgraded-8"
}
task customShadeDowngradedApi(type: xyz.wagyourtail.jvmdg.gradle.task.ShadeDowngradedApi) {
task customShadeDowngradedApi(type: xyz.wagyourtail.jvmdg.gradle.task.ShadeApi) {
inputFile = customDowngrade.archiveFile
downgradeTo = JavaVersion.VERSION_1_8 // default
shadePath = "${archiveBaseName}/jvmdg/api" // default
shadePath = "${archiveBaseName}/jvmdg/api" // default, where the shaded classes will be placed
archiveClassifier = "downgraded-8-shaded"
}
```

## "Compile" Time Downgrading

Shading the required api is currently only supported in the gradle plugin.
So this isn't recommended outside of debugging.

### Zip Downgrading

Downgrades the contents of a zip file to an older version.

ex. `java -cp JvmDowngrader-all.jar xyz.wagyourtail.jvmdg.compile.ZipDowngrader 52 input.jar output.jar classpath.jar;classpath2.jar`

### Shading Api

Analyze a downgraded zip file for API usages and shade them into the output.

ex. `java -cp JvmDowngrader-all.jar xyz.wagyourtail.jvmdg.compile.ApiShader 52 "shade/prefix" input.jar output.jar`

The class version can be replaced with a path to the pre-downgraded api jar to save time.

### Path Downgrading

Downgrade the contents of 1 or more directory trees to an older version.
Expand Down

0 comments on commit ec34e6d

Please sign in to comment.