Skip to content

Commit 75c6a8f

Browse files
Upgrade to Gradle 7.2. (#218)
* Upgrade to Gradle 7.2. * Gradle upgrade.
1 parent 64ed7bd commit 75c6a8f

File tree

24 files changed

+160
-249
lines changed

24 files changed

+160
-249
lines changed

.travis.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

action/api/build.gradle.kts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,6 @@ dependencies {
3838
implementation(group = "org.apache.commons", name = "commons-lang3")
3939
}
4040

41-
tasks {
42-
named<RatTask>("rat") {
43-
excludes.addAll(listOf("*.md", "**/build/*", "**/generated/*", "**/*.adoc"))
44-
}
45-
getByName("build").dependsOn("rat")
46-
}
47-
4841
publishing {
4942
publications {
5043
withType(MavenPublication::class) {

action/core/build.gradle.kts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,6 @@ dependencies {
4242
testImplementation(group = "org.mockito", name = "mockito-junit-jupiter")
4343
}
4444

45-
tasks {
46-
named<RatTask>("rat") {
47-
excludes.addAll(listOf("*.md", "**/build/*", "**/generated/*", "**/*.adoc"))
48-
}
49-
getByName("build").dependsOn("rat")
50-
}
51-
5245
publishing {
5346
publications {
5447
withType(MavenPublication::class) {

action/library/build.gradle.kts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,6 @@ dependencies {
5252
testImplementation(group = "com.github.tomakehurst", name = "wiremock")
5353
}
5454

55-
tasks {
56-
named<RatTask>("rat") {
57-
excludes.addAll(listOf("*.yml", "*.md", "**/*.md", "**/build/*", "**/out/*", "**/generated/*", "**/*.adoc"))
58-
}
59-
getByName("build").dependsOn("rat")
60-
}
61-
6255
publishing {
6356
publications {
6457
withType(MavenPublication::class) {

action/library/docs/asciidoc/dataobjects.adoc

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -114,30 +114,72 @@ Sets the request body schema to be sent to the endpoint. The body may contain <a
114114
href="https://github.com/Knotx/knotx-server-http/tree/master/common/placeholders">Knot.x Server
115115
Common Placeholders</a> referencing ClientRequest, Fragment's configuration or Fragment's
116116
payload, which will be interpolated if link flag is set.
117-
117+
<p>
118118
Please note that request body is sent only in case of using PUT, POST or PATCH HTTP method.
119-
119+
<p>
120120
This field is mutually exclusive with link.
121121
+++
122122
|[[bodyJson]]`@bodyJson`|`Json object`|+++
123123
Sets the request body schema to be sent to the endpoint. The body may contain <a
124124
href="https://github.com/Knotx/knotx-server-http/tree/master/common/placeholders">Knot.x Server
125125
Common Placeholders</a> referencing ClientRequest, Fragment's configuration or Fragment's
126126
payload, which will be interpolated if link flag is set.
127-
127+
<p>
128128
Please note that request body is sent only in case of using PUT, POST or PATCH HTTP method.
129-
129+
<p>
130130
This field is mutually exclusive with link.
131131
+++
132-
|[[clearUnmatchedPlaceholdersInBodyJson]]`@clearUnmatchedPlaceholdersInBodyJson`|`Boolean`|-
133-
|[[clearUnmatchedPlaceholdersInBodyString]]`@clearUnmatchedPlaceholdersInBodyString`|`Boolean`|-
134-
|[[clearUnmatchedPlaceholdersInPath]]`@clearUnmatchedPlaceholdersInPath`|`Boolean`|-
132+
|[[clearUnmatchedPlaceholdersInBodyJson]]`@clearUnmatchedPlaceholdersInBodyJson`|`Boolean`|+++
133+
Configures interpolation of link parameter. When JSON body
134+
interpolation is enabled and this flag is set, placeholders not matched to a source will be
135+
replaced with an empty string.
136+
<p>
137+
Please note that absent placeholders that are matched to a source (e.g. {payload.not-existent})
138+
will always be replaced with an empty string.
139+
+++
140+
|[[clearUnmatchedPlaceholdersInBodyString]]`@clearUnmatchedPlaceholdersInBodyString`|`Boolean`|+++
141+
Configures interpolation of link parameter. When body interpolation is
142+
enabled and this flag is set, placeholders not matched to a source will be replaced with an
143+
empty string.
144+
<p>
145+
Please note that absent placeholders that are matched to a source (e.g. {payload.not-existent})
146+
will always be replaced with an empty string.
147+
+++
148+
|[[clearUnmatchedPlaceholdersInPath]]`@clearUnmatchedPlaceholdersInPath`|`Boolean`|+++
149+
Configures interpolation of link parameter. When path interpolation is
150+
enabled and this flag is set, placeholders not matched to a source will be replaced with an
151+
empty string.
152+
<p>
153+
Please note that absent placeholders that are matched to a source (e.g. {payload.not-existent})
154+
will always be replaced with an empty string.
155+
+++
135156
|[[domain]]`@domain`|`String`|+++
136157
Sets the <code>domain</code> of the external service
137158
+++
138-
|[[encodePlaceholdersInBodyJson]]`@encodePlaceholdersInBodyJson`|`Boolean`|-
139-
|[[encodePlaceholdersInBodyString]]`@encodePlaceholdersInBodyString`|`Boolean`|-
140-
|[[encodePlaceholdersInPath]]`@encodePlaceholdersInPath`|`Boolean`|-
159+
|[[encodePlaceholdersInBodyJson]]`@encodePlaceholdersInBodyJson`|`Boolean`|+++
160+
Configures interpolation of link parameter. When JSON body
161+
interpolation is enabled and this flag is set, values of matched placeholders will be encoded
162+
before interpolating.
163+
<p>
164+
For details, see <a href="https://github.com/Knotx/knotx-server-http/tree/master/common/placeholders">Knot.x
165+
Server Common Placeholders</a>
166+
+++
167+
|[[encodePlaceholdersInBodyString]]`@encodePlaceholdersInBodyString`|`Boolean`|+++
168+
Configures interpolation of link parameter. When body interpolation is
169+
enabled and this flag is set, values of matched placeholders will be encoded before
170+
interpolating.
171+
<p>
172+
For details, see <a href="https://github.com/Knotx/knotx-server-http/tree/master/common/placeholders">Knot.x
173+
Server Common Placeholders</a>
174+
+++
175+
|[[encodePlaceholdersInPath]]`@encodePlaceholdersInPath`|`Boolean`|+++
176+
Configures interpolation of link parameter. When path interpolation is
177+
enabled and this flag is set, values of matched placeholders will be encoded before
178+
interpolating.
179+
<p>
180+
For details, see <a href="https://github.com/Knotx/knotx-server-http/tree/master/common/placeholders">Knot.x
181+
Server Common Placeholders</a>
182+
+++
141183
|[[interpolateBody]]`@interpolateBody`|`Boolean`|+++
142184
Configures interpolation of link parameter. When set, the body will be
143185
interpolated using <a href="https://github.com/Knotx/knotx-server-http/tree/master/common/placeholders">Knot.x

api/build.gradle.kts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,6 @@ dependencies {
3939
testImplementation("io.knotx:knotx-junit5:${project.version}")
4040
}
4141

42-
tasks {
43-
named<RatTask>("rat") {
44-
excludes.addAll(listOf("*.yml", "*.md", "**/*.md", "**/build/*", "**/out/*", "**/generated/*", "**/*.adoc"))
45-
}
46-
getByName("build").dependsOn("rat")
47-
}
48-
4942
publishing {
5043
publications {
5144
withType(MavenPublication::class) {

assembler/build.gradle.kts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ dependencies {
4141
testImplementation(group = "org.mockito", name = "mockito-junit-jupiter")
4242
}
4343

44-
tasks {
45-
named<RatTask>("rat") {
46-
excludes.addAll(listOf("*.md", "**/*.md", "**/build/*", "**/out/*", "**/generated/*", "**/*.adoc"))
47-
}
48-
getByName("build").dependsOn("rat")
49-
}
50-
5144
publishing {
5245
publications {
5346
withType(MavenPublication::class) {

build.gradle.kts

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,30 @@ plugins {
1717
java
1818
id("io.knotx.release-java")
1919
id("io.knotx.composite-build-support")
20+
id("org.nosphere.apache.rat")
2021
}
2122

22-
subprojects {
23+
allprojects {
2324
group = "io.knotx"
2425
repositories {
2526
mavenLocal()
26-
jcenter()
27+
mavenCentral()
2728
gradlePluginPortal()
2829
}
29-
pluginManager.withPlugin("java") {
30-
java {
31-
toolchain {
32-
languageVersion.set(JavaLanguageVersion.of(8))
30+
pluginManager.withPlugin("org.nosphere.apache.rat") {
31+
tasks {
32+
named<org.nosphere.apache.rat.RatTask>("rat") {
33+
verbose.set(true)
34+
excludes.addAll(listOf(
35+
"**/*.md", // docs
36+
"gradle/wrapper/**", "gradle*", "**/build/**", // Gradle
37+
"*.iml", "*.ipr", "*.iws", "*.idea/**", // IDEs
38+
"**/generated/*", "**/*.adoc", "**/resources/**", // assets
39+
".github/*"
40+
))
3341
}
42+
getByName("check").dependsOn("rat")
43+
getByName("rat").dependsOn("compileJava")
3444
}
3545
}
3646
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew.bat

Lines changed: 89 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,89 @@
1-
@rem
2-
@rem Copyright 2015 the original author or authors.
3-
@rem
4-
@rem Licensed under the Apache License, Version 2.0 (the "License");
5-
@rem you may not use this file except in compliance with the License.
6-
@rem You may obtain a copy of the License at
7-
@rem
8-
@rem https://www.apache.org/licenses/LICENSE-2.0
9-
@rem
10-
@rem Unless required by applicable law or agreed to in writing, software
11-
@rem distributed under the License is distributed on an "AS IS" BASIS,
12-
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
@rem See the License for the specific language governing permissions and
14-
@rem limitations under the License.
15-
@rem
16-
17-
@if "%DEBUG%" == "" @echo off
18-
@rem ##########################################################################
19-
@rem
20-
@rem Gradle startup script for Windows
21-
@rem
22-
@rem ##########################################################################
23-
24-
@rem Set local scope for the variables with windows NT shell
25-
if "%OS%"=="Windows_NT" setlocal
26-
27-
set DIRNAME=%~dp0
28-
if "%DIRNAME%" == "" set DIRNAME=.
29-
set APP_BASE_NAME=%~n0
30-
set APP_HOME=%DIRNAME%
31-
32-
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33-
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34-
35-
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36-
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37-
38-
@rem Find java.exe
39-
if defined JAVA_HOME goto findJavaFromJavaHome
40-
41-
set JAVA_EXE=java.exe
42-
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto execute
44-
45-
echo.
46-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47-
echo.
48-
echo Please set the JAVA_HOME variable in your environment to match the
49-
echo location of your Java installation.
50-
51-
goto fail
52-
53-
:findJavaFromJavaHome
54-
set JAVA_HOME=%JAVA_HOME:"=%
55-
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56-
57-
if exist "%JAVA_EXE%" goto execute
58-
59-
echo.
60-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61-
echo.
62-
echo Please set the JAVA_HOME variable in your environment to match the
63-
echo location of your Java installation.
64-
65-
goto fail
66-
67-
:execute
68-
@rem Setup the command line
69-
70-
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71-
72-
73-
@rem Execute Gradle
74-
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75-
76-
:end
77-
@rem End local scope for the variables with windows NT shell
78-
if "%ERRORLEVEL%"=="0" goto mainEnd
79-
80-
:fail
81-
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82-
rem the _cmd.exe /c_ return code!
83-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84-
exit /b 1
85-
86-
:mainEnd
87-
if "%OS%"=="Windows_NT" endlocal
88-
89-
:omega
1+
@rem
2+
@rem Copyright 2015 the original author or authors.
3+
@rem
4+
@rem Licensed under the Apache License, Version 2.0 (the "License");
5+
@rem you may not use this file except in compliance with the License.
6+
@rem You may obtain a copy of the License at
7+
@rem
8+
@rem https://www.apache.org/licenses/LICENSE-2.0
9+
@rem
10+
@rem Unless required by applicable law or agreed to in writing, software
11+
@rem distributed under the License is distributed on an "AS IS" BASIS,
12+
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
@rem See the License for the specific language governing permissions and
14+
@rem limitations under the License.
15+
@rem
16+
17+
@if "%DEBUG%" == "" @echo off
18+
@rem ##########################################################################
19+
@rem
20+
@rem Gradle startup script for Windows
21+
@rem
22+
@rem ##########################################################################
23+
24+
@rem Set local scope for the variables with windows NT shell
25+
if "%OS%"=="Windows_NT" setlocal
26+
27+
set DIRNAME=%~dp0
28+
if "%DIRNAME%" == "" set DIRNAME=.
29+
set APP_BASE_NAME=%~n0
30+
set APP_HOME=%DIRNAME%
31+
32+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34+
35+
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36+
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37+
38+
@rem Find java.exe
39+
if defined JAVA_HOME goto findJavaFromJavaHome
40+
41+
set JAVA_EXE=java.exe
42+
%JAVA_EXE% -version >NUL 2>&1
43+
if "%ERRORLEVEL%" == "0" goto execute
44+
45+
echo.
46+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47+
echo.
48+
echo Please set the JAVA_HOME variable in your environment to match the
49+
echo location of your Java installation.
50+
51+
goto fail
52+
53+
:findJavaFromJavaHome
54+
set JAVA_HOME=%JAVA_HOME:"=%
55+
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56+
57+
if exist "%JAVA_EXE%" goto execute
58+
59+
echo.
60+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61+
echo.
62+
echo Please set the JAVA_HOME variable in your environment to match the
63+
echo location of your Java installation.
64+
65+
goto fail
66+
67+
:execute
68+
@rem Setup the command line
69+
70+
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71+
72+
73+
@rem Execute Gradle
74+
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75+
76+
:end
77+
@rem End local scope for the variables with windows NT shell
78+
if "%ERRORLEVEL%"=="0" goto mainEnd
79+
80+
:fail
81+
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82+
rem the _cmd.exe /c_ return code!
83+
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84+
exit /b 1
85+
86+
:mainEnd
87+
if "%OS%"=="Windows_NT" endlocal
88+
89+
:omega

0 commit comments

Comments
 (0)