Match Mercury sourceCompatibility with Gradle (#224)
* Match Mercury sourceCompatibility with Gradle * Fix checkstyledev/0.11
parent
c2c3e5c3c6
commit
4eb699c2fb
|
@ -41,7 +41,9 @@ import org.cadixdev.mercury.Mercury;
|
||||||
import org.cadixdev.mercury.remapper.MercuryRemapper;
|
import org.cadixdev.mercury.remapper.MercuryRemapper;
|
||||||
import org.gradle.api.GradleException;
|
import org.gradle.api.GradleException;
|
||||||
import org.gradle.api.IllegalDependencyNotation;
|
import org.gradle.api.IllegalDependencyNotation;
|
||||||
|
import org.gradle.api.JavaVersion;
|
||||||
import org.gradle.api.Project;
|
import org.gradle.api.Project;
|
||||||
|
import org.gradle.api.plugins.JavaPluginConvention;
|
||||||
import org.gradle.api.tasks.TaskAction;
|
import org.gradle.api.tasks.TaskAction;
|
||||||
import org.gradle.api.tasks.options.Option;
|
import org.gradle.api.tasks.options.Option;
|
||||||
|
|
||||||
|
@ -159,6 +161,14 @@ public class MigrateMappingsTask extends AbstractLoomTask {
|
||||||
project.getLogger().lifecycle(":remapping");
|
project.getLogger().lifecycle(":remapping");
|
||||||
Mercury mercury = SourceRemapper.createMercuryWithClassPath(project, false);
|
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.getMappedJar().toPath());
|
||||||
mercury.getClassPath().add(minecraftMappedProvider.getIntermediaryJar().toPath());
|
mercury.getClassPath().add(minecraftMappedProvider.getIntermediaryJar().toPath());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue