Test our Gradle plugin against 7.1-rc-1
7.1-rc-1 deprecates JavaExec's main property in favor of mainClass which was introduced in Gradle 6.4. This commit updates some tests to use mainClass rather than main that would otherwise have failed due to deprecation warnings in their output. Closes gh-26793
This commit is contained in:
		
							parent
							
								
									15721595fe
								
							
						
					
					
						commit
						87d35250a5
					
				| 
						 | 
					@ -48,10 +48,10 @@ final class GradleCompatibilityExtension implements TestTemplateInvocationContex
 | 
				
			||||||
	static {
 | 
						static {
 | 
				
			||||||
		JavaVersion javaVersion = JavaVersion.current();
 | 
							JavaVersion javaVersion = JavaVersion.current();
 | 
				
			||||||
		if (javaVersion.isCompatibleWith(JavaVersion.VERSION_16)) {
 | 
							if (javaVersion.isCompatibleWith(JavaVersion.VERSION_16)) {
 | 
				
			||||||
			GRADLE_VERSIONS = Arrays.asList("7.0.2");
 | 
								GRADLE_VERSIONS = Arrays.asList("7.0.2", "7.1-rc-1");
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		else {
 | 
							else {
 | 
				
			||||||
			GRADLE_VERSIONS = Arrays.asList("6.8.3", "current", "7.0.2");
 | 
								GRADLE_VERSIONS = Arrays.asList("6.8.3", "current", "7.0.2", "7.1-rc-1");
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,5 +21,5 @@ task explode(type: Sync) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
task launch(type: JavaExec) {
 | 
					task launch(type: JavaExec) {
 | 
				
			||||||
	classpath = files(explode)
 | 
						classpath = files(explode)
 | 
				
			||||||
	main = 'org.springframework.boot.loader.JarLauncher'
 | 
						mainClass = 'org.springframework.boot.loader.JarLauncher'
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -5,6 +5,6 @@ plugins {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bootRun {
 | 
					bootRun {
 | 
				
			||||||
	doFirst {
 | 
						doFirst {
 | 
				
			||||||
		println "Main class name = ${bootRun.main}"
 | 
							println "Main class name = ${bootRun.mainClass.get()}"
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Loading…
	
		Reference in New Issue