Skip to content

Commit d33f89c

Browse files
committed
common: Fix JDeps task creation when running on Java 8
1 parent b3cd080 commit d33f89c

File tree

1 file changed

+2
-1
lines changed
  • indra-common/src/main/java/net/kyori/indra/task

1 file changed

+2
-1
lines changed

indra-common/src/main/java/net/kyori/indra/task/JDeps.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import java.util.Collection;
2929
import java.util.List;
3030
import javax.inject.Inject;
31+
import net.kyori.indra.util.Versioning;
3132
import org.gradle.api.DefaultTask;
3233
import org.gradle.api.InvalidUserDataException;
3334
import org.gradle.api.JavaVersion;
@@ -134,7 +135,7 @@ public void argumentProvider(final CommandLineArgumentProvider argumentProvider)
134135
*/
135136
public JDeps() {
136137
this.getJavaLauncher().convention(this.getToolchains()
137-
.launcherFor(spec -> spec.getLanguageVersion().set(JavaLanguageVersion.of(JavaVersion.current().toString()))));
138+
.launcherFor(spec -> spec.getLanguageVersion().set(JavaLanguageVersion.of(Versioning.versionNumber(JavaVersion.current())))));
138139
this.getMultireleaseVersion().finalizeValueOnRead();
139140
}
140141

0 commit comments

Comments
 (0)