Skip to content

Commit

Permalink
Merge branch 'lts'
Browse files Browse the repository at this point in the history
  • Loading branch information
wagyourtail committed May 13, 2024
2 parents b6ec1b1 + ae86a00 commit 25c070c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ in `build.gradle`:
plugins {
id 'xyz.wagyourtail.jvmdowngrader' version '0.3.0'
}
// optionally you can change some globals:
jvmdg.defaultMavens = false // stops from inserting my maven into the project repositories
jvmdg.group = "xyz.wagyourtail.jvmdowngrader" // default
jvmdg.coreArchiveName "jvmdowngrader" // default
jvmdg.apiArchiveName "jvmdowngrader-java-api" // default
jvmdg.version = "0.3.0" // default
jvmdg.asmVersion = "9.7" // default
```

This will create a default downgrade task for `jar` (or `shadowJar` if present) called `downgradeJar` that will downgrade the output to java 8 by default.
Expand Down Expand Up @@ -59,15 +70,21 @@ 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, used for classpath
classpath = sourceSets.main.compileClasspath // default
archiveClassifier = "downgraded-8"
configureDowngrade {
jvmArgs += ["-Djvmdg.quiet=true"]
}
}
task customShadeDowngradedApi(type: xyz.wagyourtail.jvmdg.gradle.task.ShadeApi) {
inputFile = customDowngrade.archiveFile
downgradeTo = JavaVersion.VERSION_1_8 // default
shadePath = "${archiveBaseName}/jvmdg/api" // default, where the shaded classes will be placed
archiveClassifier = "downgraded-8-shaded"
configureShade {
jvmArgs += ["-Djvmdg.quiet=true"]
}
}
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ abstract class JVMDowngraderExtension(val project: Project) {
val coreArchiveName by FinalizeOnRead("jvmdowngrader")
var apiArchiveName by FinalizeOnRead("jvmdowngrader-java-api")

var version by FinalizeOnRead(JVMDowngraderPlugin::class.java.`package`.implementationVersion ?: "0.2.0")
var version by FinalizeOnRead(JVMDowngraderPlugin::class.java.`package`.implementationVersion ?: "0.3.0")

var asmVersion by FinalizeOnRead("9.7")

Expand Down

0 comments on commit 25c070c

Please sign in to comment.