Browse Source
The applicationDefaultJvmArgs property was added in Gradle 1.7. This commit updates RunPluginFeatures to access the property defensively so that the plugin can be used with Gradle 1.6. Fixes gh-1511pull/1588/head
5 changed files with 85 additions and 3 deletions
@ -0,0 +1,26 @@
@@ -0,0 +1,26 @@
|
||||
buildscript { |
||||
repositories { |
||||
mavenLocal() |
||||
mavenCentral() |
||||
} |
||||
dependencies { |
||||
classpath("org.springframework.boot:spring-boot-gradle-plugin:${project.bootVersion}") |
||||
classpath("org.springframework:springloaded:${project.springLoadedVersion}") |
||||
} |
||||
} |
||||
|
||||
apply plugin: 'java' |
||||
apply plugin: 'spring-boot' |
||||
|
||||
repositories { |
||||
mavenLocal() |
||||
mavenCentral() |
||||
} |
||||
|
||||
dependencies { |
||||
compile("org.springframework.boot:spring-boot-starter") |
||||
} |
||||
|
||||
jar { |
||||
baseName = 'spring-loaded-old-gradle' |
||||
} |
||||
@ -0,0 +1,25 @@
@@ -0,0 +1,25 @@
|
||||
package test; |
||||
|
||||
import java.io.File; |
||||
import java.io.FileWriter; |
||||
import java.io.PrintWriter; |
||||
import java.lang.management.ManagementFactory; |
||||
|
||||
import org.springframework.beans.factory.annotation.Value; |
||||
import org.springframework.boot.SpringApplication; |
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; |
||||
import org.springframework.context.annotation.Bean; |
||||
import org.springframework.context.annotation.ComponentScan; |
||||
import org.springframework.context.annotation.Configuration; |
||||
import org.springframework.util.Assert; |
||||
|
||||
public class Application { |
||||
|
||||
public static void main(String[] args) throws Exception { |
||||
PrintWriter writer = new PrintWriter(new FileWriter(new File("build/output.txt"))); |
||||
for (String argument: ManagementFactory.getRuntimeMXBean().getInputArguments()) { |
||||
writer.println(argument); |
||||
} |
||||
writer.close(); |
||||
} |
||||
} |
||||
Loading…
Reference in new issue