Skip to content

Commit

Permalink
Merge branch '2.3.x' into 2.4.x
Browse files Browse the repository at this point in the history
Closes gh-24735
  • Loading branch information
wilkinsona committed Jan 11, 2021
2 parents 097f878 + 064de4e commit 3c3aa9e
Showing 1 changed file with 12 additions and 1 deletion.
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2020 the original author or authors.
* Copyright 2012-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,10 +21,12 @@
import java.util.Set;

import org.gradle.api.file.SourceDirectorySet;
import org.gradle.api.provider.Property;
import org.gradle.api.tasks.Input;
import org.gradle.api.tasks.JavaExec;
import org.gradle.api.tasks.SourceSet;
import org.gradle.api.tasks.SourceSetOutput;
import org.gradle.jvm.toolchain.JavaLauncher;

/**
* Custom {@link JavaExec} task for running a Spring Boot application.
Expand Down Expand Up @@ -87,6 +89,15 @@ public void exec() {
}

private boolean isJava13OrLater() {
try {
Property<JavaLauncher> javaLauncher = this.getJavaLauncher();
if (javaLauncher.isPresent()) {
return javaLauncher.get().getMetadata().getLanguageVersion().asInt() >= 13;
}
}
catch (NoSuchMethodError ex) {
// Continue
}
for (Method method : String.class.getMethods()) {
if (method.getName().equals("stripIndent")) {
return true;
Expand Down

0 comments on commit 3c3aa9e

Please sign in to comment.