Polish Gradle expression references

Expand all expression `$` references to the full `${...}` form.
pull/19850/head
Phillip Webb 5 years ago
parent 89237634c7
commit bfd2ca7fd9

@ -1,6 +1,6 @@
plugins {
id 'java-gradle-plugin'
id 'io.spring.javaformat' version "$javaFormatVersion"
id 'io.spring.javaformat' version "${javaFormatVersion}"
id 'checkstyle'
}
@ -14,7 +14,7 @@ sourceCompatibility = 1.8
targetCompatibility = 1.8
dependencies {
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:$javaFormatVersion"
checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:${javaFormatVersion}"
implementation 'com.fasterxml.jackson.core:jackson-databind:2.10.0'
implementation 'commons-codec:commons-codec:1.13'
implementation 'org.apache.maven:maven-embedder:3.6.2'
@ -22,7 +22,7 @@ dependencies {
implementation 'org.springframework:spring-core:5.2.2.RELEASE'
implementation 'org.springframework:spring-web:5.2.2.RELEASE'
implementation 'com.google.code.gson:gson:2.8.5'
implementation "io.spring.javaformat:spring-javaformat-gradle-plugin:$javaFormatVersion"
implementation "io.spring.javaformat:spring-javaformat-gradle-plugin:${javaFormatVersion}"
testImplementation 'org.assertj:assertj-core:3.11.1'
testImplementation 'org.apache.logging.log4j:log4j-core:2.12.1'
testImplementation 'org.junit.jupiter:junit-jupiter:5.5.2'

@ -12,4 +12,4 @@ pluginManagement {
}
}
apply from: "$settingsDir/../gradle/build-cache-settings.gradle"
apply from: "${settingsDir}/../gradle/build-cache-settings.gradle"

@ -72,7 +72,7 @@ String customValueSearchUrl(Map<String, String> search) {
"search.names=${encodeURL(name)}&search.values=${encodeURL(value)}"
}.join('&')
"$gradleEnterprise.buildScan.server/scans?$query"
"${gradleEnterprise.buildScan.server}/scans?${query}"
}
String encodeURL(String url) {

@ -20,7 +20,7 @@ plugins {
id 'com.gradle.enterprise' version '3.1.1'
}
apply from: "$rootDir/gradle/build-scan-user-data.gradle"
apply from: "${rootDir}/gradle/build-scan-user-data.gradle"
gradleEnterprise {
buildScan {
captureTaskInputFiles = true
@ -33,7 +33,7 @@ gradleEnterprise {
}
}
apply from: "$settingsDir/gradle/build-cache-settings.gradle"
apply from: "${settingsDir}/gradle/build-cache-settings.gradle"
rootProject.name='spring-boot-build'
@ -64,10 +64,10 @@ include 'spring-boot-tests:spring-boot-integration-tests:spring-boot-configurati
include 'spring-boot-tests:spring-boot-integration-tests:spring-boot-launch-script-tests'
include 'spring-boot-tests:spring-boot-integration-tests:spring-boot-server-tests'
file("$rootDir/spring-boot-project/spring-boot-starters").eachDirMatch(~/spring-boot-starter.*/) {
include "spring-boot-project:spring-boot-starters:$it.name"
file("${rootDir}/spring-boot-project/spring-boot-starters").eachDirMatch(~/spring-boot-starter.*/) {
include "spring-boot-project:spring-boot-starters:${it.name}"
}
file("$rootDir/spring-boot-tests/spring-boot-smoke-tests").eachDirMatch(~/spring-boot-smoke-test.*/) {
include "spring-boot-tests:spring-boot-smoke-tests:$it.name"
file("${rootDir}/spring-boot-tests/spring-boot-smoke-tests").eachDirMatch(~/spring-boot-smoke-test.*/) {
include "spring-boot-tests:spring-boot-smoke-tests:${it.name}"
}

@ -152,7 +152,7 @@ compileTestJava {
}
test {
outputs.dir("$buildDir/generated-snippets")
outputs.dir("${buildDir}/generated-snippets")
}
asciidoctor {

@ -81,7 +81,7 @@ dependencies {
}
task syncSpringBootDependenciesBom(type: Sync) {
destinationDir = file("$buildDir/generated-resources/org/springframework/boot/cli/compiler/dependencies")
destinationDir = file("${buildDir}/generated-resources/org/springframework/boot/cli/compiler/dependencies")
from configurations.dependenciesBom
}
@ -92,7 +92,7 @@ task syncTestRepository(type: Sync) {
sourceSets {
main {
output.dir("$buildDir/generated-resources", builtBy: 'syncSpringBootDependenciesBom')
output.dir("${buildDir}/generated-resources", builtBy: 'syncSpringBootDependenciesBom')
}
}
@ -156,12 +156,12 @@ task tar(type: Tar) {
task scoopManifest(type: org.springframework.boot.build.cli.ScoopManifest) {
dependsOn zip
outputDir = file("$buildDir/scoop")
outputDir = file("${buildDir}/scoop")
template = file('src/main/scoop/springboot.json')
archive = zip.archiveFile
}
def scoopManifestArtifact = artifacts.add('archives', file("$buildDir/scoop/springboot.json")) {
def scoopManifestArtifact = artifacts.add('archives', file("${buildDir}/scoop/springboot.json")) {
type 'json'
classifier 'scoop'
builtBy 'scoopManifest'
@ -169,12 +169,12 @@ def scoopManifestArtifact = artifacts.add('archives', file("$buildDir/scoop/spri
task homebrewFormula(type: org.springframework.boot.build.cli.HomebrewFormula) {
dependsOn tar
outputDir = file("$buildDir/homebrew")
outputDir = file("${buildDir}/homebrew")
template = file('src/main/homebrew/springboot.rb')
archive = tar.archiveFile
}
def homebrewFormulaArtifact = artifacts.add('archives', file("$buildDir/homebrew/springboot.rb")) {
def homebrewFormulaArtifact = artifacts.add('archives', file("${buildDir}/homebrew/springboot.rb")) {
type 'rb'
classifier 'homebrew'
builtBy 'homebrewFormula'

@ -970,7 +970,7 @@ bom {
]
}
}
library('Kotlin', "$kotlinVersion") {
library('Kotlin', "${kotlinVersion}") {
group('org.jetbrains.kotlin') {
imports = [
'kotlin-bom'
@ -1411,7 +1411,7 @@ bom {
]
}
}
library('Spring Boot', "$version") {
library('Spring Boot', "${version}") {
group('org.springframework.boot') {
modules = [
'spring-boot',

@ -75,7 +75,7 @@ dependencies {
}
task copyIntTestDependencies(type: Copy) {
destinationDir = file("$buildDir/dependencies")
destinationDir = file("${buildDir}/dependencies")
from {
configurations.intTestDependencies
}

@ -43,7 +43,7 @@ task javadoc(type: Javadoc) {
dependsOn publishedProjects.javadoc
source publishedProjects.javadoc.source
classpath = project.files(publishedProjects.javadoc.classpath)
destinationDir = project.file "$buildDir/docs/javadoc"
destinationDir = project.file "${buildDir}/docs/javadoc"
options {
author = true
docTitle = "Spring Boot ${project.version} API"
@ -75,27 +75,27 @@ task javadoc(type: Javadoc) {
task documentTestSlices(type: org.springframework.boot.build.test.autoconfigure.DocumentTestSlices) {
testSlices = configurations.testSlices
outputFile = file("$buildDir/docs/generated/test-slice-auto-configuration.adoc")
outputFile = file("${buildDir}/docs/generated/test-slice-auto-configuration.adoc")
}
task documentStarters(type: org.springframework.boot.build.starters.DocumentStarters) {
outputDir = file("$buildDir/docs/generated/starters/")
outputDir = file("${buildDir}/docs/generated/starters/")
}
task documentAutoConfigurationClasses(type: org.springframework.boot.build.autoconfigure.DocumentAutoConfigurationClasses) {
autoConfiguration = configurations.autoConfiguration
outputDir = file("$buildDir/docs/generated/auto-configuration-classes/")
outputDir = file("${buildDir}/docs/generated/auto-configuration-classes/")
}
task documentDependencyVersions(type: org.springframework.boot.build.constraints.DocumentConstrainedVersions) {
dependsOn dependencyVersions
constrainedVersions.set(providers.provider { dependencyVersions.constrainedVersions })
outputFile = file("$buildDir/docs/generated/dependency-versions.adoc")
outputFile = file("${buildDir}/docs/generated/dependency-versions.adoc")
}
task documentConfigurationProperties(type: org.springframework.boot.build.context.properties.DocumentConfigurationProperties) {
configurationPropertyMetadata = configurations.configurationProperties
outputDir = file("$buildDir/docs/generated/config-docs/")
outputDir = file("${buildDir}/docs/generated/config-docs/")
}
tasks.withType(org.asciidoctor.gradle.jvm.AbstractAsciidoctorTask) {
@ -148,7 +148,7 @@ syncDocumentationSourceForAsciidoctor {
dependsOn documentAutoConfigurationClasses
dependsOn documentDependencyVersions
dependsOn documentConfigurationProperties
from("$buildDir/docs/generated") {
from("${buildDir}/docs/generated") {
into 'asciidoc'
}
from ("src/main/java") {
@ -165,7 +165,7 @@ syncDocumentationSourceForAsciidoctorMultipage {
dependsOn documentAutoConfigurationClasses
dependsOn documentDependencyVersions
dependsOn documentConfigurationProperties
from("$buildDir/docs/generated") {
from("${buildDir}/docs/generated") {
into 'asciidoc'
}
from ("src/main/java") {
@ -182,7 +182,7 @@ syncDocumentationSourceForAsciidoctorPdf {
dependsOn documentAutoConfigurationClasses
dependsOn documentDependencyVersions
dependsOn documentConfigurationProperties
from("$buildDir/docs/generated") {
from("${buildDir}/docs/generated") {
into 'asciidoc'
}
from ("src/main/java") {

@ -93,5 +93,5 @@ test {
task testSliceMetadata(type: org.springframework.boot.build.test.autoconfigure.TestSliceMetadata) {
sourceSet = sourceSets.main
outputFile = file("$buildDir/test-slice-metadata.properties")
outputFile = file("${buildDir}/test-slice-metadata.properties")
}

@ -8,7 +8,7 @@ plugins {
description = 'Spring Boot Antlib'
ext {
antVersion = "1.9.3"
antVersion = '1.9.3'
}
configurations {
@ -17,12 +17,12 @@ configurations {
}
dependencies {
antUnit "org.apache.ant:ant-antunit:1.3"
antIvy "org.apache.ivy:ivy:2.4.0"
antUnit 'org.apache.ant:ant-antunit:1.3'
antIvy 'org.apache.ivy:ivy:2.4.0'
api platform(project(":spring-boot-project:spring-boot-dependencies"))
api platform(project(':spring-boot-project:spring-boot-dependencies'))
compileOnly project(":spring-boot-project:spring-boot-tools:spring-boot-loader")
compileOnly project(':spring-boot-project:spring-boot-tools:spring-boot-loader')
compileOnly "org.apache.ant:ant:${antVersion}"
implementation project(":spring-boot-project:spring-boot-tools:spring-boot-loader-tools")

@ -9,7 +9,7 @@ if (project.hasProperty('applyApplicationPlugin')) {
task('taskExists') {
doFirst {
println "$taskName exists = ${tasks.findByName(taskName) != null}"
println "${taskName} exists = ${tasks.findByName(taskName) != null}"
}
}
@ -17,14 +17,14 @@ task('distributionExists') {
doFirst {
boolean found = project.hasProperty('distributions') &&
distributions.findByName(distributionName) != null
println "$distributionName exists = $found"
println "${distributionName} exists = ${found}"
}
}
task('javaCompileEncoding') {
doFirst {
tasks.withType(JavaCompile) {
println "$name = ${options.encoding}"
println "${name} = ${options.encoding}"
}
}
}
@ -32,7 +32,7 @@ task('javaCompileEncoding') {
task('startScriptsDefaultJvmOpts') {
doFirst {
tasks.withType(org.springframework.boot.gradle.tasks.application.CreateBootStartScripts) {
println "$name defaultJvmOpts = $defaultJvmOpts"
println "${name} defaultJvmOpts = ${defaultJvmOpts}"
}
}
}

@ -14,6 +14,6 @@ dependencies {
compileJava {
doLast {
println "$name compiler args: ${options.compilerArgs}"
println "${name} compiler args: ${options.compilerArgs}"
}
}

@ -5,6 +5,6 @@ plugins {
compileJava {
doLast {
println "$name compiler args: ${options.compilerArgs}"
println "${name} compiler args: ${options.compilerArgs}"
}
}

@ -11,7 +11,7 @@ tasks.withType(JavaCompile) {
task('javaCompileTasksCompilerArgs') {
doFirst {
tasks.withType(JavaCompile) {
println "$name compiler args: ${options.compilerArgs}"
println "${name} compiler args: ${options.compilerArgs}"
}
}
}

@ -10,7 +10,7 @@ tasks.withType(JavaCompile) {
task('javaCompileTasksCompilerArgs') {
doFirst {
tasks.withType(JavaCompile) {
println "$name compiler args: ${options.compilerArgs}"
println "${name} compiler args: ${options.compilerArgs}"
}
}
}

@ -6,7 +6,7 @@ plugins {
task('javaCompileTasksCompilerArgs') {
doFirst {
tasks.withType(JavaCompile) {
println "$name compiler args: ${options.compilerArgs}"
println "${name} compiler args: ${options.compilerArgs}"
}
}
}

@ -8,14 +8,14 @@ if (project.hasProperty('applyJavaPlugin')) {
task('taskExists') {
doFirst {
println "$taskName exists = ${tasks.findByName(taskName) != null}"
println "${taskName} exists = ${tasks.findByName(taskName) != null}"
}
}
task('javaCompileEncoding') {
doFirst {
tasks.withType(JavaCompile) {
println "$name = ${options.encoding}"
println "${name} = ${options.encoding}"
}
}
}

@ -13,7 +13,7 @@ tasks.withType(KotlinCompile) {
task('kotlinCompileTasksJavaParameters') {
doFirst {
tasks.withType(KotlinCompile) {
println "$name java parameters: ${kotlinOptions.javaParameters}"
println "${name} java parameters: ${kotlinOptions.javaParameters}"
}
}
}

@ -9,7 +9,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
task('kotlinCompileTasksJavaParameters') {
doFirst {
tasks.withType(KotlinCompile) {
println "$name java parameters: ${kotlinOptions.javaParameters}"
println "${name} java parameters: ${kotlinOptions.javaParameters}"
}
}
}

@ -8,6 +8,6 @@ if (project.hasProperty('applyWarPlugin')) {
task('taskExists') {
doFirst {
println "$taskName exists = ${tasks.findByName(taskName) != null}"
println "${taskName} exists = ${tasks.findByName(taskName) != null}"
}
}

@ -14,7 +14,7 @@ version = '1.0'
uploadBootArchives {
repositories {
mavenDeployer {
repository(url: "file:$buildDir/repo")
repository(url: "file:${buildDir}/repo")
}
}
}

@ -14,7 +14,7 @@ version = '1.0'
uploadBootArchives {
repositories {
mavenDeployer {
repository(url: "file:$buildDir/repo")
repository(url: "file:${buildDir}/repo")
}
}
}

@ -6,7 +6,7 @@ plugins {
apply plugin: 'io.spring.dependency-management'
repositories {
maven { url "file:$rootDir/../int-test-maven-repository"}
maven { url "file:${rootDir}/../int-test-maven-repository"}
mavenCentral()
maven { url 'https://repo.spring.io/snapshot' }
maven { url 'https://repo.spring.io/milestone' }

@ -1,6 +1,6 @@
pluginManagement {
repositories {
maven { url "file:$rootDir/../int-test-maven-repository"}
maven { url "file:${rootDir}/../int-test-maven-repository"}
mavenCentral()
maven { url 'https://repo.spring.io/snapshot' }
maven { url 'https://repo.spring.io/milestone' }

@ -22,12 +22,12 @@ dependencies {
task syncMavenRepository(type: Sync) {
from configurations.app
into "$buildDir/int-test-maven-repository"
into "${buildDir}/int-test-maven-repository"
}
task syncAppSource(type: Sync) {
from 'app'
into "$buildDir/app"
into "${buildDir}/app"
filter { line ->
line.replace("id 'org.springframework.boot'", "id 'org.springframework.boot' version '${project.version}'")
}
@ -35,7 +35,7 @@ task syncAppSource(type: Sync) {
task buildApp(type: GradleBuild) {
dependsOn syncAppSource, syncMavenRepository
dir = "$buildDir/app"
dir = "${buildDir}/app"
startParameter.buildCacheEnabled = false
tasks = ['build']
}

@ -35,7 +35,7 @@ dependencies {
}
task prepareMavenBinaries(type: org.springframework.boot.build.mavenplugin.PrepareMavenBinaries) {
outputDir = file("$buildDir/maven-binaries")
outputDir = file("${buildDir}/maven-binaries")
versions '3.6.2'
}

Loading…
Cancel
Save