Match Mercury sourceCompatibility with Gradle (#224)
* Match Mercury sourceCompatibility with Gradle * Fix checkstyle
This commit is contained in:
parent
c2c3e5c3c6
commit
4eb699c2fb
1 changed files with 10 additions and 0 deletions
|
@ -41,7 +41,9 @@ import org.cadixdev.mercury.Mercury;
|
|||
import org.cadixdev.mercury.remapper.MercuryRemapper;
|
||||
import org.gradle.api.GradleException;
|
||||
import org.gradle.api.IllegalDependencyNotation;
|
||||
import org.gradle.api.JavaVersion;
|
||||
import org.gradle.api.Project;
|
||||
import org.gradle.api.plugins.JavaPluginConvention;
|
||||
import org.gradle.api.tasks.TaskAction;
|
||||
import org.gradle.api.tasks.options.Option;
|
||||
|
||||
|
@ -159,6 +161,14 @@ public class MigrateMappingsTask extends AbstractLoomTask {
|
|||
project.getLogger().lifecycle(":remapping");
|
||||
Mercury mercury = SourceRemapper.createMercuryWithClassPath(project, false);
|
||||
|
||||
final JavaPluginConvention convention = project.getConvention().findPlugin(JavaPluginConvention.class);
|
||||
final JavaVersion javaVersion = convention != null
|
||||
?
|
||||
convention.getSourceCompatibility()
|
||||
:
|
||||
JavaVersion.current();
|
||||
mercury.setSourceCompatibility(javaVersion.toString());
|
||||
|
||||
mercury.getClassPath().add(minecraftMappedProvider.getMappedJar().toPath());
|
||||
mercury.getClassPath().add(minecraftMappedProvider.getIntermediaryJar().toPath());
|
||||
|
||||
|
|
Loading…
Reference in a new issue