Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/col-e/class-version-patcher
For when you are stuck in Java 8 but want to use new language features and dependencies
https://github.com/col-e/class-version-patcher
gradle gradle-plugin java maven maven-plugin
Last synced: 3 months ago
JSON representation
For when you are stuck in Java 8 but want to use new language features and dependencies
- Host: GitHub
- URL: https://github.com/col-e/class-version-patcher
- Owner: Col-E
- License: mit
- Created: 2020-11-28T03:53:37.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-23T12:26:44.000Z (over 2 years ago)
- Last Synced: 2023-03-05T02:18:04.517Z (almost 2 years ago)
- Topics: gradle, gradle-plugin, java, maven, maven-plugin
- Language: Java
- Homepage:
- Size: 57.6 KB
- Stars: 30
- Watchers: 2
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Class Version Patcher
This plugin allows you to utilize all the new language features of Java while targeting an older version's bytecode.
## Usage - Maven
To integrate into your project:
1. Install the plugin locally
2. Add the plugin to your project
- Update the scope of any dependency that is future-versioned to `provided`
3. Run `compile` on your project to generate the modified classes in the `%PROJECT%/target/classes` directory
4. Run any phase you like, such as `test` _(They should now see the modified classes)_### Installing the plugin locally
```
git clone https://github.com/Col-E/Class-Version-Patcher.git
cd Maven-Class-Patcher
mvn install
```### Using the plugin in your `pom.xml`
```xml
software.coley
class-version-patcher-maven
2.1.0
8
group_id:artifact_id
org.jgroups:jgroups
patch-compiled
patch-dependencies
patch-postprocess
```
## Usage - Gradle
> NOTE: The gradle plugin is not yet developed, however you can add the `core` module of this project as a dependency to your buildscript.
> From there, you can invoke `software.coley.versionpatcher.VersionPatcher` as you see fit.## This doesn't properly downgrade Java X's "xyz-feature" to Java Y's version!
Please open an issue with an example of how to replicate your problem.
For example:
- Providing a class file
- Listing a [maven dependency](https://mvnrepository.com/artifact/org.jgroups/jgroups/5.1.2.Final)
- Listing an [open source project](https://github.com/belaban/JGroups)