Skip to content

Commit 0fda630

Browse files
committed
build.gradle updated
1 parent 97f6ab3 commit 0fda630

File tree

38 files changed

+230
-409
lines changed

38 files changed

+230
-409
lines changed

build.gradle

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,29 @@
1+
buildscript {
2+
dependencies {
3+
classpath "com.diffplug.spotless:spotless-plugin-gradle:6.19.0"
4+
}
5+
}
6+
7+
plugins {
8+
id "jacoco"
9+
id "org.sonarqube" version "4.2.1.3168"
10+
}
11+
112
group = groupId
213
version = artifactVersion
314

15+
sonarqube {
16+
properties {
17+
property "sonar.host.url", "https://sonarcloud.io"
18+
property "sonar.organization", "goodforgod"
19+
property "sonar.projectKey", "GoodforGod_$artifactRootId"
20+
property "sonar.coverage.jacoco.xmlReportPaths", "build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml"
21+
}
22+
}
23+
424
subprojects {
25+
apply plugin: "com.diffplug.spotless"
26+
527
group = groupId
628
version = artifactVersion
729

@@ -12,4 +34,13 @@ subprojects {
1234
}
1335
}
1436
}
37+
38+
spotless {
39+
java {
40+
encoding("UTF-8")
41+
importOrder()
42+
removeUnusedImports()
43+
eclipse("4.21").configFile("${rootDir}/config/codestyle.xml")
44+
}
45+
}
1546
}

gradle/wrapper/gradle-wrapper.jar

3.47 KB
Binary file not shown.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

gradlew

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +80,10 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
86+
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
9087

9188
# Use the maximum available, or set MAX_FD != -1 to use that value.
9289
MAX_FD=maximum
@@ -133,22 +130,29 @@ location of your Java installation."
133130
fi
134131
else
135132
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
133+
if ! command -v java >/dev/null 2>&1
134+
then
135+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137136
138137
Please set the JAVA_HOME variable in your environment to match the
139138
location of your Java installation."
139+
fi
140140
fi
141141

142142
# Increase the maximum file descriptors if we can.
143143
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144144
case $MAX_FD in #(
145145
max*)
146+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147+
# shellcheck disable=SC3045
146148
MAX_FD=$( ulimit -H -n ) ||
147149
warn "Could not query maximum file descriptor limit"
148150
esac
149151
case $MAX_FD in #(
150152
'' | soft) :;; #(
151153
*)
154+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155+
# shellcheck disable=SC3045
152156
ulimit -n "$MAX_FD" ||
153157
warn "Could not set maximum file descriptor limit to $MAX_FD"
154158
esac
@@ -193,6 +197,10 @@ if "$cygwin" || "$msys" ; then
193197
done
194198
fi
195199

200+
201+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203+
196204
# Collect all arguments for the java command;
197205
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198206
# shell script including quotes and variable substitutions, so put them in
@@ -205,6 +213,12 @@ set -- \
205213
org.gradle.wrapper.GradleWrapperMain \
206214
"$@"
207215

216+
# Stop when "xargs" is not available.
217+
if ! command -v xargs >/dev/null 2>&1
218+
then
219+
die "xargs is not available"
220+
fi
221+
208222
# Use "xargs" to parse quoted args.
209223
#
210224
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.

gradlew.bat

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@rem limitations under the License.
1515
@rem
1616

17-
@if "%DEBUG%" == "" @echo off
17+
@if "%DEBUG%"=="" @echo off
1818
@rem ##########################################################################
1919
@rem
2020
@rem Gradle startup script for Windows
@@ -25,7 +25,8 @@
2525
if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
28-
if "%DIRNAME%" == "" set DIRNAME=.
28+
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
2930
set APP_BASE_NAME=%~n0
3031
set APP_HOME=%DIRNAME%
3132

@@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome
4041

4142
set JAVA_EXE=java.exe
4243
%JAVA_EXE% -version >NUL 2>&1
43-
if "%ERRORLEVEL%" == "0" goto execute
44+
if %ERRORLEVEL% equ 0 goto execute
4445

4546
echo.
4647
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
@@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
7576

7677
:end
7778
@rem End local scope for the variables with windows NT shell
78-
if "%ERRORLEVEL%"=="0" goto mainEnd
79+
if %ERRORLEVEL% equ 0 goto mainEnd
7980

8081
:fail
8182
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
8283
rem the _cmd.exe /c_ return code!
83-
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84-
exit /b 1
84+
set EXIT_CODE=%ERRORLEVEL%
85+
if %EXIT_CODE% equ 0 set EXIT_CODE=1
86+
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
87+
exit /b %EXIT_CODE%
8588

8689
:mainEnd
8790
if "%OS%"=="Windows_NT" endlocal

micronaut-gradle-application-dynamodb/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM goodforgod/amazonlinux-graalvm:22.0.0.2-java17-amd64
1+
FROM goodforgod/amazonlinux-graalvm:22.3.1-java17-amd64
22

33
ADD build/libs/*all.jar build/libs/application.jar
44

micronaut-gradle-application-dynamodb/build.gradle

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
plugins {
22
id "java"
33
id "jacoco"
4-
5-
id "org.sonarqube" version "3.3"
6-
id "com.diffplug.spotless" version "6.1.0"
74
id "com.github.johnrengelman.shadow" version "7.1.2"
8-
id "io.micronaut.application" version "3.3.0"
5+
id "io.micronaut.application" version "4.0.2"
96
}
107

118
repositories {
@@ -18,23 +15,13 @@ mainClassName = "io.micronaut.function.aws.runtime.MicronautLambdaRuntime"
1815
sourceCompatibility = JavaVersion.VERSION_17
1916
targetCompatibility = JavaVersion.VERSION_17
2017

21-
spotless {
22-
java {
23-
encoding("UTF-8")
24-
importOrder()
25-
removeUnusedImports()
26-
eclipse("4.21.0").configFile("${rootDir}/config/codestyle.xml")
27-
}
28-
}
29-
3018
micronaut {
31-
version("3.3.4")
19+
version("4.0.2")
3220
processing {
3321
incremental(true)
3422
module(project.name)
3523
group(project.group)
3624
annotations("io.goodforgod.micronaut.*")
37-
runtime("lambda")
3825
}
3926
}
4027

@@ -52,7 +39,7 @@ configurations {
5239
}
5340

5441
dependencies {
55-
awssdkBom enforcedPlatform("software.amazon.awssdk:bom:2.17.118")
42+
awssdkBom enforcedPlatform("software.amazon.awssdk:bom:2.20.116")
5643

5744
annotationProcessor "io.micronaut:micronaut-inject-java"
5845
annotationProcessor "io.micronaut:micronaut-graal"
@@ -88,8 +75,8 @@ test {
8875
}
8976

9077
reports {
91-
html.enabled(false)
92-
junitXml.enabled(false)
78+
html.required = false
79+
junitXml.required = false
9380
}
9481
}
9582

@@ -118,7 +105,7 @@ javadoc {
118105
check.dependsOn jacocoTestReport
119106
jacocoTestReport {
120107
reports {
121-
xml.enabled(true)
108+
xml.required = true
122109
html.destination file("${buildDir}/jacocoHtml")
123110
}
124111
}

micronaut-gradle-application-helloworld/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM goodforgod/amazonlinux-graalvm:22.0.0.2-java17-amd64
1+
FROM goodforgod/amazonlinux-graalvm:22.3.1-java17-amd64
22

33
ADD build/libs/*all.jar build/libs/application.jar
44

micronaut-gradle-application-helloworld/build.gradle

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
plugins {
22
id "java"
33
id "jacoco"
4-
5-
id "org.sonarqube" version "3.3"
6-
id "com.diffplug.spotless" version "6.1.0"
74
id "com.github.johnrengelman.shadow" version "7.1.2"
8-
id "io.micronaut.application" version "3.3.0"
5+
id "io.micronaut.application" version "4.0.2"
96
}
107

118
repositories {
@@ -18,23 +15,13 @@ mainClassName = "io.micronaut.function.aws.runtime.MicronautLambdaRuntime"
1815
sourceCompatibility = JavaVersion.VERSION_17
1916
targetCompatibility = JavaVersion.VERSION_17
2017

21-
spotless {
22-
java {
23-
encoding("UTF-8")
24-
importOrder()
25-
removeUnusedImports()
26-
eclipse("4.21.0").configFile("${rootDir}/config/codestyle.xml")
27-
}
28-
}
29-
3018
micronaut {
31-
version("3.3.4")
19+
version("4.0.2")
3220
processing {
3321
incremental(true)
3422
module(project.name)
3523
group(project.group)
3624
annotations("io.goodforgod.micronaut.*")
37-
runtime("lambda")
3825
}
3926
}
4027

@@ -66,8 +53,8 @@ test {
6653
}
6754

6855
reports {
69-
html.enabled(false)
70-
junitXml.enabled(false)
56+
html.required = false
57+
junitXml.required = false
7158
}
7259
}
7360

@@ -96,7 +83,7 @@ javadoc {
9683
check.dependsOn jacocoTestReport
9784
jacocoTestReport {
9885
reports {
99-
xml.enabled(true)
86+
xml.required = true
10087
html.destination file("${buildDir}/jacocoHtml")
10188
}
10289
}

micronaut-gradle-application-http/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM goodforgod/amazonlinux-graalvm:22.0.0.2-java17-amd64
1+
FROM goodforgod/amazonlinux-graalvm:22.3.1-java17-amd64
22

33
ADD build/libs/*all.jar build/libs/application.jar
44

0 commit comments

Comments
 (0)