Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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)