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
06778abb
Commit
06778abb
authored
Jun 16, 2021
by
Andy Wilkinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.5.x'
See gh-26934
parents
81a22738
577c58b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
JavaConventions.java
.../java/org/springframework/boot/build/JavaConventions.java
+9
-5
No files found.
buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java
View file @
06778abb
...
@@ -194,17 +194,21 @@ class JavaConventions {
...
@@ -194,17 +194,21 @@ class JavaConventions {
}
}
private
void
configureJavaConventions
(
Project
project
)
{
private
void
configureJavaConventions
(
Project
project
)
{
JavaPluginExtension
javaPluginExtension
=
project
.
getExtensions
().
getByType
(
JavaPluginExtension
.
class
);
if
(!
project
.
hasProperty
(
"toolchainVersion"
))
{
javaPluginExtension
.
setSourceCompatibility
(
JavaVersion
.
toVersion
(
SOURCE_AND_TARGET_COMPATIBILITY
));
JavaPluginExtension
javaPluginExtension
=
project
.
getExtensions
().
getByType
(
JavaPluginExtension
.
class
);
javaPluginExtension
.
setSourceCompatibility
(
JavaVersion
.
toVersion
(
SOURCE_AND_TARGET_COMPATIBILITY
));
}
project
.
getTasks
().
withType
(
JavaCompile
.
class
,
(
compile
)
->
{
project
.
getTasks
().
withType
(
JavaCompile
.
class
,
(
compile
)
->
{
compile
.
getOptions
().
setEncoding
(
"UTF-8"
);
compile
.
getOptions
().
setEncoding
(
"UTF-8"
);
compile
.
setSourceCompatibility
(
SOURCE_AND_TARGET_COMPATIBILITY
);
compile
.
setTargetCompatibility
(
SOURCE_AND_TARGET_COMPATIBILITY
);
List
<
String
>
args
=
compile
.
getOptions
().
getCompilerArgs
();
List
<
String
>
args
=
compile
.
getOptions
().
getCompilerArgs
();
if
(!
args
.
contains
(
"-parameters"
))
{
if
(!
args
.
contains
(
"-parameters"
))
{
args
.
add
(
"-parameters"
);
args
.
add
(
"-parameters"
);
}
}
if
(
buildingWithJava8
(
project
))
{
if
(
project
.
hasProperty
(
"toolchainVersion"
))
{
compile
.
setSourceCompatibility
(
SOURCE_AND_TARGET_COMPATIBILITY
);
compile
.
setTargetCompatibility
(
SOURCE_AND_TARGET_COMPATIBILITY
);
}
else
if
(
buildingWithJava8
(
project
))
{
args
.
addAll
(
Arrays
.
asList
(
"-Werror"
,
"-Xlint:unchecked"
,
"-Xlint:deprecation"
,
"-Xlint:rawtypes"
,
args
.
addAll
(
Arrays
.
asList
(
"-Werror"
,
"-Xlint:unchecked"
,
"-Xlint:deprecation"
,
"-Xlint:rawtypes"
,
"-Xlint:varargs"
));
"-Xlint:varargs"
));
}
}
...
...
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