-
Notifications
You must be signed in to change notification settings - Fork 40.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test Gradle plugin against Gradle 8.0.1
Closes gh-34457
- Loading branch information
1 parent
d39c94f
commit 4f7e038
Showing
25 changed files
with
172 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2012-2021 the original author or authors. | ||
* Copyright 2012-2023 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. | ||
|
@@ -31,6 +31,7 @@ protected BootRunClasspathApplication() { | |
} | ||
|
||
public static void main(String[] args) { | ||
System.out.println("Main class name = " + BootRunClasspathApplication.class.getName()); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
wilkinsona
Author
Member
|
||
int i = 1; | ||
for (String entry : ManagementFactory.getRuntimeMXBean().getClassPath().split(File.pathSeparator)) { | ||
System.out.println(i++ + ". " + entry); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...radle/plugin/JavaPluginActionIntegrationTests-applyingJavaPluginCreatesBootJarTask.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '{version}' | ||
id 'java' | ||
} |
4 changes: 4 additions & 0 deletions
4
...radle/plugin/JavaPluginActionIntegrationTests-applyingJavaPluginCreatesBootRunTask.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '{version}' | ||
id 'java' | ||
} |
12 changes: 12 additions & 0 deletions
12
...PluginActionIntegrationTests-applyingJavaPluginCreatesDevelopmentOnlyConfiguration.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '{version}' | ||
id 'java' | ||
} | ||
|
||
springBoot { | ||
mainClass = "com.example.Main" | ||
} | ||
|
||
gradle.taskGraph.whenReady { | ||
println "developmentOnly exists = ${configurations.findByName('developmentOnly') != null}" | ||
} |
4 changes: 4 additions & 0 deletions
4
...avaPluginActionIntegrationTests-errorMessageIsHelpfulWhenMainClassCannotBeResolved.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '{version}' | ||
id 'java' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...oot/gradle/plugin/JavaPluginActionIntegrationTests-javaCompileTasksUseUtf8Encoding.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '{version}' | ||
id 'java' | ||
} | ||
|
||
springBoot { | ||
mainClass = "com.example.Main" | ||
} | ||
|
||
gradle.taskGraph.whenReady { | ||
gradle.taskGraph.allTasks.each { | ||
if (it instanceof JavaCompile) { | ||
println "${it.name} = ${it.options.encoding}" | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...adle/plugin/JavaPluginActionIntegrationTests-noBootJarTaskWithoutJavaPluginApplied.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '{version}' | ||
} |
3 changes: 3 additions & 0 deletions
3
...adle/plugin/JavaPluginActionIntegrationTests-noBootRunTaskWithoutJavaPluginApplied.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '{version}' | ||
} |
16 changes: 16 additions & 0 deletions
16
...aPluginActionIntegrationTests-productionRuntimeClasspathIsConfiguredWithAttributes.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '{version}' | ||
id 'java' | ||
} | ||
|
||
springBoot { | ||
mainClass = "com.example.Main" | ||
} | ||
|
||
gradle.taskGraph.whenReady { | ||
def attributes = configurations.findByName('productionRuntimeClasspath').attributes | ||
println "${attributes.keySet().size()} productionRuntimeClasspath attributes:" | ||
attributes.keySet().each { attribute -> | ||
println " ${attribute}: ${attributes.getAttribute(attribute)}" | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...eClasspathIsConfiguredWithResolvabilityAndConsumabilityThatMatchesRuntimeClasspath.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
plugins { | ||
id 'org.springframework.boot' version '{version}' | ||
id 'java' | ||
} | ||
|
||
springBoot { | ||
mainClass = "com.example.Main" | ||
} | ||
|
||
gradle.taskGraph.whenReady { | ||
analyzeConfiguration('productionRuntimeClasspath') | ||
analyzeConfiguration('runtimeClasspath') | ||
} | ||
|
||
def analyzeConfiguration(String configurationName) { | ||
Configuration configuration = configurations.findByName(configurationName) | ||
println "$configurationName canBeResolved: ${configuration.canBeResolved}" | ||
println "$configurationName canBeConsumed: ${configuration.canBeConsumed}" | ||
} |
Oops, something went wrong.
Is this a leftover or intended?