Skip to content

Commit 0209cd3

Browse files
committed
Polish quote form used in Gradle scripts
Replace Gradle single quote strings with the double quote form whenever possible. The change helps to being consistency to the dependencies section where mostly single quotes were used, but occasionally double quotes were required due to `${}` references.
1 parent ed6fbc6 commit 0209cd3

File tree

175 files changed

+3234
-3235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+3234
-3235
lines changed

build.gradle

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
11
plugins {
2-
id 'org.jetbrains.kotlin.jvm' apply false // https://youtrack.jetbrains.com/issue/KT-30276
2+
id "org.jetbrains.kotlin.jvm" apply false // https://youtrack.jetbrains.com/issue/KT-30276
33
}
44

5-
description = 'Spring Boot Build'
5+
description = "Spring Boot Build"
66

77
allprojects {
8-
group 'org.springframework.boot'
8+
group "org.springframework.boot"
99

1010
repositories {
1111
mavenCentral()
12-
maven { url 'https://repo.spring.io/milestone' }
13-
maven { url 'https://repo.spring.io/snapshot' }
12+
maven { url "https://repo.spring.io/milestone" }
13+
maven { url "https://repo.spring.io/snapshot" }
1414
}
1515

1616
configurations.all {
17-
resolutionStrategy.cacheChangingModulesFor 60, 'minutes'
17+
resolutionStrategy.cacheChangingModulesFor 60, "minutes"
1818
}
19-
2019
}

buildSrc/build.gradle

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
11
plugins {
2-
id 'java-gradle-plugin'
3-
id 'io.spring.javaformat' version "${javaFormatVersion}"
4-
id 'checkstyle'
2+
id "java-gradle-plugin"
3+
id "io.spring.javaformat" version "${javaFormatVersion}"
4+
id "checkstyle"
55
}
66

77
repositories {
88
mavenCentral()
99
gradlePluginPortal()
10-
maven { url 'https://repo.spring.io/release' }
10+
maven { url "https://repo.spring.io/release" }
1111
}
1212

1313
sourceCompatibility = 1.8
1414
targetCompatibility = 1.8
1515

1616
dependencies {
1717
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:${javaFormatVersion}"
18-
implementation 'com.fasterxml.jackson.core:jackson-databind:2.10.0'
19-
implementation 'commons-codec:commons-codec:1.13'
20-
implementation 'org.apache.maven:maven-embedder:3.6.2'
21-
implementation 'org.asciidoctor:asciidoctor-gradle-jvm:2.4.0'
22-
implementation 'org.springframework:spring-core:5.2.2.RELEASE'
23-
implementation 'org.springframework:spring-web:5.2.2.RELEASE'
24-
implementation 'com.google.code.gson:gson:2.8.5'
18+
implementation "com.fasterxml.jackson.core:jackson-databind:2.10.0"
19+
implementation "commons-codec:commons-codec:1.13"
20+
implementation "org.apache.maven:maven-embedder:3.6.2"
21+
implementation "org.asciidoctor:asciidoctor-gradle-jvm:2.4.0"
22+
implementation "org.springframework:spring-core:5.2.2.RELEASE"
23+
implementation "org.springframework:spring-web:5.2.2.RELEASE"
24+
implementation "com.google.code.gson:gson:2.8.5"
2525
implementation "io.spring.javaformat:spring-javaformat-gradle-plugin:${javaFormatVersion}"
26-
testImplementation 'org.assertj:assertj-core:3.11.1'
27-
testImplementation 'org.apache.logging.log4j:log4j-core:2.12.1'
28-
testImplementation 'org.junit.jupiter:junit-jupiter:5.5.2'
26+
testImplementation "org.assertj:assertj-core:3.11.1"
27+
testImplementation "org.apache.logging.log4j:log4j-core:2.12.1"
28+
testImplementation "org.junit.jupiter:junit-jupiter:5.5.2"
2929
}
3030

3131
checkstyle {
32-
def archive = configurations.checkstyle.filter { it.name.startsWith('spring-javaformat-checkstyle')}
33-
config = resources.text.fromArchiveEntry(archive, 'io/spring/javaformat/checkstyle/checkstyle.xml')
32+
def archive = configurations.checkstyle.filter { it.name.startsWith("spring-javaformat-checkstyle")}
33+
config = resources.text.fromArchiveEntry(archive, "io/spring/javaformat/checkstyle/checkstyle.xml")
3434
toolVersion = 8.11
3535
}
3636

buildSrc/settings.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pluginManagement {
55
}
66
resolutionStrategy {
77
eachPlugin {
8-
if (requested.id.id == 'io.spring.javaformat') {
8+
if (requested.id.id == "io.spring.javaformat") {
99
useModule "io.spring.javaformat:spring-javaformat-gradle-plugin:${requested.version}"
1010
}
1111
}

gradle/build-cache-settings.gradle

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ buildCache {
44
}
55
remote(HttpBuildCache) {
66
enabled = true
7-
url = 'https://ge.spring.io/cache/'
8-
def cacheUsername = System.getenv('GRADLE_ENTERPRISE_CACHE_USERNAME')
9-
def cachePassword = System.getenv('GRADLE_ENTERPRISE_CACHE_PASSWORD')
7+
url = "https://ge.spring.io/cache/"
8+
def cacheUsername = System.getenv("GRADLE_ENTERPRISE_CACHE_USERNAME")
9+
def cachePassword = System.getenv("GRADLE_ENTERPRISE_CACHE_PASSWORD")
1010
if (cacheUsername && cachePassword) {
1111
push = true
1212
credentials {

gradle/build-scan-user-data.gradle

+19-19
Original file line numberDiff line numberDiff line change
@@ -5,57 +5,57 @@ tagCiOrLocal()
55
addGitMetadata()
66

77
void tagOs() {
8-
gradleEnterprise.buildScan.tag System.getProperty('os.name')
8+
gradleEnterprise.buildScan.tag System.getProperty("os.name")
99
}
1010

1111
void tagJdk() {
12-
gradleEnterprise.buildScan.tag "JDK-${System.getProperty('java.specification.version')}"
12+
gradleEnterprise.buildScan.tag "JDK-" + System.getProperty('java.specification.version')
1313
}
1414

1515
void tagIde() {
16-
if (System.getProperty('idea.version')) {
17-
gradleEnterprise.buildScan.tag 'IntelliJ IDEA'
18-
} else if (System.getProperty('eclipse.buildId')) {
19-
gradleEnterprise.buildScan.tag 'Eclipse'
16+
if (System.getProperty("idea.version")) {
17+
gradleEnterprise.buildScan.tag "IntelliJ IDEA"
18+
} else if (System.getProperty("eclipse.buildId")) {
19+
gradleEnterprise.buildScan.tag "Eclipse"
2020
}
2121
}
2222

2323
void tagCiOrLocal() {
24-
gradleEnterprise.buildScan.tag(isCi() ? 'CI' : 'LOCAL')
24+
gradleEnterprise.buildScan.tag(isCi() ? "CI" : "LOCAL")
2525
}
2626

2727
void addGitMetadata() {
2828
gradleEnterprise.buildScan.background {
29-
def gitCommitId = execAndGetStdout('git', 'rev-parse', '--short=8', '--verify', 'HEAD')
29+
def gitCommitId = execAndGetStdout("git", "rev-parse", "--short=8", "--verify", "HEAD")
3030
def gitBranchName = getBranch()
31-
def gitStatus = execAndGetStdout('git', 'status', '--porcelain')
31+
def gitStatus = execAndGetStdout("git", "status", "--porcelain")
3232

3333
if(gitCommitId) {
34-
def commitIdLabel = 'Git Commit ID'
34+
def commitIdLabel = "Git Commit ID"
3535
value commitIdLabel, gitCommitId
36-
link 'Git commit build scans', customValueSearchUrl([(commitIdLabel): gitCommitId])
36+
link "Git commit build scans", customValueSearchUrl([(commitIdLabel): gitCommitId])
3737
}
3838
if (gitBranchName) {
3939
tag gitBranchName
40-
value 'Git branch', gitBranchName
40+
value "Git branch", gitBranchName
4141
}
4242
if (gitStatus) {
43-
tag 'dirty'
44-
value 'Git status', gitStatus
43+
tag "dirty"
44+
value "Git status", gitStatus
4545
}
4646
}
4747
}
4848

4949
boolean isCi() {
50-
System.getenv('CI')
50+
System.getenv("CI")
5151
}
5252

5353
String getBranch() {
54-
def branch = System.getenv('BRANCH')
54+
def branch = System.getenv("BRANCH")
5555
if (branch) {
5656
return branch
5757
}
58-
return execAndGetStdout('git', 'rev-parse', '--abbrev-ref', 'HEAD')
58+
return execAndGetStdout("git", "rev-parse", "--abbrev-ref", "HEAD")
5959
}
6060

6161
String execAndGetStdout(String... args) {
@@ -70,11 +70,11 @@ String execAndGetStdout(String... args) {
7070
String customValueSearchUrl(Map<String, String> search) {
7171
def query = search.collect { name, value ->
7272
"search.names=${encodeURL(name)}&search.values=${encodeURL(value)}"
73-
}.join('&')
73+
}.join("&")
7474

7575
"${gradleEnterprise.buildScan.server}/scans?${query}"
7676
}
7777

7878
String encodeURL(String url) {
79-
URLEncoder.encode(url, 'UTF-8')
79+
URLEncoder.encode(url, "UTF-8")
8080
}

settings.gradle

+34-34
Original file line numberDiff line numberDiff line change
@@ -2,68 +2,68 @@ pluginManagement {
22
repositories {
33
mavenCentral()
44
gradlePluginPortal()
5-
maven { url 'https://repo.spring.io/snapshot' }
5+
maven { url "https://repo.spring.io/snapshot" }
66
}
77
resolutionStrategy {
88
eachPlugin {
9-
if (requested.id.id == 'org.jetbrains.kotlin.jvm') {
9+
if (requested.id.id == "org.jetbrains.kotlin.jvm") {
1010
useVersion "${kotlinVersion}"
1111
}
12-
if (requested.id.id == 'org.jetbrains.kotlin.plugin.spring') {
12+
if (requested.id.id == "org.jetbrains.kotlin.plugin.spring") {
1313
useVersion "${kotlinVersion}"
1414
}
1515
}
1616
}
1717
}
1818

1919
plugins {
20-
id 'com.gradle.enterprise' version '3.1.1'
20+
id "com.gradle.enterprise" version "3.1.1"
2121
}
2222

2323
apply from: "${rootDir}/gradle/build-scan-user-data.gradle"
2424
gradleEnterprise {
2525
buildScan {
2626
captureTaskInputFiles = true
2727
obfuscation {
28-
ipAddresses { addresses -> addresses.collect { address -> '0.0.0.0'} }
28+
ipAddresses { addresses -> addresses.collect { address -> "0.0.0.0"} }
2929
}
3030
publishAlways()
3131
publishIfAuthenticated()
32-
server = 'https://ge.spring.io'
32+
server = "https://ge.spring.io"
3333
}
3434
}
3535

3636
apply from: "${settingsDir}/gradle/build-cache-settings.gradle"
3737

38-
rootProject.name='spring-boot-build'
38+
rootProject.name="spring-boot-build"
3939

40-
include 'spring-boot-project:spring-boot-dependencies'
41-
include 'spring-boot-project:spring-boot-parent'
42-
include 'spring-boot-project:spring-boot-tools:spring-boot-antlib'
43-
include 'spring-boot-project:spring-boot-tools:spring-boot-autoconfigure-processor'
44-
include 'spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform'
45-
include 'spring-boot-project:spring-boot-tools:spring-boot-configuration-metadata'
46-
include 'spring-boot-project:spring-boot-tools:spring-boot-configuration-processor'
47-
include 'spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin'
48-
include 'spring-boot-project:spring-boot-tools:spring-boot-layertools'
49-
include 'spring-boot-project:spring-boot-tools:spring-boot-loader'
50-
include 'spring-boot-project:spring-boot-tools:spring-boot-loader-tools'
51-
include 'spring-boot-project:spring-boot-tools:spring-boot-maven-plugin'
52-
include 'spring-boot-project:spring-boot-tools:spring-boot-test-support'
53-
include 'spring-boot-project:spring-boot'
54-
include 'spring-boot-project:spring-boot-autoconfigure'
55-
include 'spring-boot-project:spring-boot-actuator'
56-
include 'spring-boot-project:spring-boot-actuator-autoconfigure'
57-
include 'spring-boot-project:spring-boot-cli'
58-
include 'spring-boot-project:spring-boot-devtools'
59-
include 'spring-boot-project:spring-boot-docs'
60-
include 'spring-boot-project:spring-boot-properties-migrator'
61-
include 'spring-boot-project:spring-boot-test'
62-
include 'spring-boot-project:spring-boot-test-autoconfigure'
63-
include 'spring-boot-tests:spring-boot-deployment-tests'
64-
include 'spring-boot-tests:spring-boot-integration-tests:spring-boot-configuration-processor-tests'
65-
include 'spring-boot-tests:spring-boot-integration-tests:spring-boot-launch-script-tests'
66-
include 'spring-boot-tests:spring-boot-integration-tests:spring-boot-server-tests'
40+
include "spring-boot-project:spring-boot-dependencies"
41+
include "spring-boot-project:spring-boot-parent"
42+
include "spring-boot-project:spring-boot-tools:spring-boot-antlib"
43+
include "spring-boot-project:spring-boot-tools:spring-boot-autoconfigure-processor"
44+
include "spring-boot-project:spring-boot-tools:spring-boot-buildpack-platform"
45+
include "spring-boot-project:spring-boot-tools:spring-boot-configuration-metadata"
46+
include "spring-boot-project:spring-boot-tools:spring-boot-configuration-processor"
47+
include "spring-boot-project:spring-boot-tools:spring-boot-gradle-plugin"
48+
include "spring-boot-project:spring-boot-tools:spring-boot-layertools"
49+
include "spring-boot-project:spring-boot-tools:spring-boot-loader"
50+
include "spring-boot-project:spring-boot-tools:spring-boot-loader-tools"
51+
include "spring-boot-project:spring-boot-tools:spring-boot-maven-plugin"
52+
include "spring-boot-project:spring-boot-tools:spring-boot-test-support"
53+
include "spring-boot-project:spring-boot"
54+
include "spring-boot-project:spring-boot-autoconfigure"
55+
include "spring-boot-project:spring-boot-actuator"
56+
include "spring-boot-project:spring-boot-actuator-autoconfigure"
57+
include "spring-boot-project:spring-boot-cli"
58+
include "spring-boot-project:spring-boot-devtools"
59+
include "spring-boot-project:spring-boot-docs"
60+
include "spring-boot-project:spring-boot-properties-migrator"
61+
include "spring-boot-project:spring-boot-test"
62+
include "spring-boot-project:spring-boot-test-autoconfigure"
63+
include "spring-boot-tests:spring-boot-deployment-tests"
64+
include "spring-boot-tests:spring-boot-integration-tests:spring-boot-configuration-processor-tests"
65+
include "spring-boot-tests:spring-boot-integration-tests:spring-boot-launch-script-tests"
66+
include "spring-boot-tests:spring-boot-integration-tests:spring-boot-server-tests"
6767

6868
file("${rootDir}/spring-boot-project/spring-boot-starters").eachDirMatch(~/spring-boot-starter.*/) {
6969
include "spring-boot-project:spring-boot-starters:${it.name}"

0 commit comments

Comments
 (0)