Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
076a384c
Commit
076a384c
authored
Apr 24, 2020
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.2.x'
Closes gh-21112
parents
d5b94414
29dc236b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
LayerResolver.java
...ngframework/boot/gradle/tasks/bundling/LayerResolver.java
+10
-1
PublishingDocumentationTests.java
...mework/boot/gradle/docs/PublishingDocumentationTests.java
+3
-2
GradleBuild.java
.../org/springframework/boot/gradle/testkit/GradleBuild.java
+5
-3
No files found.
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/tasks/bundling/LayerResolver.java
View file @
076a384c
...
@@ -17,8 +17,12 @@
...
@@ -17,8 +17,12 @@
package
org
.
springframework
.
boot
.
gradle
.
tasks
.
bundling
;
package
org
.
springframework
.
boot
.
gradle
.
tasks
.
bundling
;
import
java.io.File
;
import
java.io.File
;
import
java.util.Arrays
;
import
java.util.Collections
;
import
java.util.HashSet
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
import
org.gradle.api.artifacts.ArtifactCollection
;
import
org.gradle.api.artifacts.ArtifactCollection
;
import
org.gradle.api.artifacts.Configuration
;
import
org.gradle.api.artifacts.Configuration
;
...
@@ -92,6 +96,10 @@ class LayerResolver {
...
@@ -92,6 +96,10 @@ class LayerResolver {
*/
*/
private
static
class
ResolvedDependencies
{
private
static
class
ResolvedDependencies
{
private
static
final
Set
<
String
>
DEPRECATED_FOR_RESOLUTION_CONFIGURATIONS
=
Collections
.
unmodifiableSet
(
new
HashSet
<>(
Arrays
.
asList
(
"archives"
,
"compile"
,
"compileOnly"
,
"default"
,
"runtime"
,
"testCompile"
,
"testCompileOnly"
,
"testRuntime"
)));
private
final
Map
<
Configuration
,
ResolvedConfigurationDependencies
>
configurationDependencies
=
new
LinkedHashMap
<>();
private
final
Map
<
Configuration
,
ResolvedConfigurationDependencies
>
configurationDependencies
=
new
LinkedHashMap
<>();
ResolvedDependencies
(
Iterable
<
Configuration
>
configurations
)
{
ResolvedDependencies
(
Iterable
<
Configuration
>
configurations
)
{
...
@@ -99,7 +107,8 @@ class LayerResolver {
...
@@ -99,7 +107,8 @@ class LayerResolver {
}
}
private
void
processConfiguration
(
Configuration
configuration
)
{
private
void
processConfiguration
(
Configuration
configuration
)
{
if
(
configuration
.
isCanBeResolved
())
{
if
(
configuration
.
isCanBeResolved
()
&&
!
DEPRECATED_FOR_RESOLUTION_CONFIGURATIONS
.
contains
(
configuration
.
getName
()))
{
this
.
configurationDependencies
.
put
(
configuration
,
this
.
configurationDependencies
.
put
(
configuration
,
new
ResolvedConfigurationDependencies
(
configuration
.
getIncoming
().
getArtifacts
()));
new
ResolvedConfigurationDependencies
(
configuration
.
getIncoming
().
getArtifacts
()));
}
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/docs/PublishingDocumentationTests.java
View file @
076a384c
...
@@ -39,8 +39,9 @@ class PublishingDocumentationTests {
...
@@ -39,8 +39,9 @@ class PublishingDocumentationTests {
@TestTemplate
@TestTemplate
void
mavenUpload
()
throws
IOException
{
void
mavenUpload
()
throws
IOException
{
assertThat
(
this
.
gradleBuild
.
script
(
"src/docs/gradle/publishing/maven"
).
build
(
"deployerRepository"
).
getOutput
())
assertThat
(
this
.
gradleBuild
.
expectDeprecationWarningsWithAtLeastVersion
(
"5.6"
)
.
contains
(
"https://repo.example.com"
);
.
script
(
"src/docs/gradle/publishing/maven"
).
build
(
"deployerRepository"
).
getOutput
())
.
contains
(
"https://repo.example.com"
);
}
}
@TestTemplate
@TestTemplate
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/java/org/springframework/boot/gradle/testkit/GradleBuild.java
View file @
076a384c
...
@@ -89,7 +89,7 @@ public class GradleBuild {
...
@@ -89,7 +89,7 @@ public class GradleBuild {
}
}
void
after
()
{
void
after
()
{
GradleBuild
.
this
.
script
=
null
;
this
.
script
=
null
;
FileSystemUtils
.
deleteRecursively
(
this
.
projectDir
);
FileSystemUtils
.
deleteRecursively
(
this
.
projectDir
);
}
}
...
@@ -127,8 +127,8 @@ public class GradleBuild {
...
@@ -127,8 +127,8 @@ public class GradleBuild {
public
BuildResult
build
(
String
...
arguments
)
{
public
BuildResult
build
(
String
...
arguments
)
{
try
{
try
{
BuildResult
result
=
prepareRunner
(
arguments
).
build
();
BuildResult
result
=
prepareRunner
(
arguments
).
build
();
if
(
this
.
gradleVersion
!=
null
&&
this
.
expectDeprecationWarnings
!=
null
if
(
this
.
expectDeprecationWarnings
==
null
||
(
this
.
gradleVersion
!=
null
&&
this
.
expectDeprecationWarnings
.
compareTo
(
GradleVersion
.
version
(
this
.
gradleVersion
))
>
0
)
{
&&
this
.
expectDeprecationWarnings
.
compareTo
(
GradleVersion
.
version
(
this
.
gradleVersion
))
>
0
)
)
{
assertThat
(
result
.
getOutput
()).
doesNotContain
(
"Deprecated"
).
doesNotContain
(
"deprecated"
);
assertThat
(
result
.
getOutput
()).
doesNotContain
(
"Deprecated"
).
doesNotContain
(
"deprecated"
);
}
}
return
result
;
return
result
;
...
@@ -167,6 +167,8 @@ public class GradleBuild {
...
@@ -167,6 +167,8 @@ public class GradleBuild {
allArguments
.
add
(
"-PbootVersion="
+
getBootVersion
());
allArguments
.
add
(
"-PbootVersion="
+
getBootVersion
());
allArguments
.
add
(
"--stacktrace"
);
allArguments
.
add
(
"--stacktrace"
);
allArguments
.
addAll
(
Arrays
.
asList
(
arguments
));
allArguments
.
addAll
(
Arrays
.
asList
(
arguments
));
allArguments
.
add
(
"--warning-mode"
);
allArguments
.
add
(
"all"
);
return
gradleRunner
.
withArguments
(
allArguments
);
return
gradleRunner
.
withArguments
(
allArguments
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment