Skip to content

Commit 6946aeb

Browse files
authored
Merge pull request #100 from iExecBlockchainComputing/feature/gradle-8.2.1
Feature/gradle 8.2.1
2 parents ee7b765 + a87e6bc commit 6946aeb

File tree

6 files changed

+28
-32
lines changed

6 files changed

+28
-32
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file.
66

77
### New Features
88
- Remove `nexus.intra.iex.ec` repository. (#96)
9+
### Quality
10+
- Upgrade to Gradle 8.2.1 with up-to-date plugins. (#100)
911
### Dependency Upgrades
1012
- Upgrade to `eclipse-temurin` 11.0.20. (#98)
1113
- Upgrade to Spring Boot 2.7.14. (#99)

build.gradle

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
plugins {
22
id 'java'
3-
id 'io.freefair.lombok' version '6.6.1'
3+
id 'io.freefair.lombok' version '8.2.2'
44
id 'org.springframework.boot' version '2.7.14'
55
id 'io.spring.dependency-management' version '1.1.3'
66
id 'jacoco'
7-
id 'org.sonarqube' version '3.3'
7+
id 'org.sonarqube' version '4.2.1.3168'
88
id 'maven-publish'
99
}
1010

@@ -43,6 +43,15 @@ allprojects {
4343
}
4444
}
4545

46+
sourceSets {
47+
itest {
48+
java {
49+
compileClasspath += main.output + test.output
50+
runtimeClasspath += main.output + test.output
51+
}
52+
}
53+
}
54+
4655
configurations {
4756
itestRuntime.extendsFrom testRuntime
4857
itestImplementation.extendsFrom testImplementation
@@ -74,6 +83,7 @@ dependencies {
7483
implementation project(':iexec-blockchain-adapter-api-library')
7584

7685
testImplementation 'org.springframework.boot:spring-boot-starter-test'
86+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
7787
testImplementation 'org.awaitility:awaitility'
7888

7989
itestImplementation 'org.testcontainers:junit-jupiter:1.18.1'
@@ -90,15 +100,6 @@ tasks.named("bootJar") {
90100
}
91101
}
92102

93-
sourceSets {
94-
itest {
95-
java {
96-
compileClasspath += main.output + test.output
97-
runtimeClasspath += main.output + test.output
98-
}
99-
}
100-
}
101-
102103
tasks.register("itest", Test) {
103104
doFirst {
104105
exec {
@@ -111,13 +112,6 @@ tasks.register("itest", Test) {
111112
classpath = sourceSets.itest.runtimeClasspath
112113
}
113114

114-
jar {
115-
enabled = true
116-
archiveClassifier.set('library')
117-
from sourceSets.main.allSource
118-
duplicatesStrategy = 'exclude'
119-
}
120-
121115
publishing {
122116
publications {
123117
maven(MavenPublication) {
@@ -141,9 +135,6 @@ tasks.withType(Test).configureEach {
141135
useJUnitPlatform()
142136
}
143137

144-
jacoco {
145-
toolVersion = "0.8.7"
146-
}
147138
// sonarqube code coverage requires jacoco XML report
148139
jacocoTestReport {
149140
reports {
@@ -156,7 +147,7 @@ ext.jarPathForOCI = relativePath(tasks.bootJar.outputs.files.singleFile)
156147
ext.gitShortCommit = 'git rev-parse --short=8 HEAD'.execute().text.trim()
157148
ext.ociImageName = 'local/' + ['bash', '-c', 'basename $(git config --get remote.origin.url) .git'].execute().text.trim()
158149

159-
task buildImage(type: Exec) {
150+
tasks.register('buildImage', Exec) {
160151
group 'Build'
161152
description 'Builds an OCI image from a Dockerfile.'
162153
dependsOn bootJar

gradle/wrapper/gradle-wrapper.jar

1.76 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
44
networkTimeout=10000
5+
validateDistributionUrl=true
56
zipStoreBase=GRADLE_USER_HOME
67
zipStorePath=wrapper/dists

gradlew

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@ done
8585
APP_BASE_NAME=${0##*/}
8686
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
8787

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"'
90-
9188
# Use the maximum available, or set MAX_FD != -1 to use that value.
9289
MAX_FD=maximum
9390

@@ -133,26 +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*)
146146
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
147+
# shellcheck disable=SC3045
148148
MAX_FD=$( ulimit -H -n ) ||
149149
warn "Could not query maximum file descriptor limit"
150150
esac
151151
case $MAX_FD in #(
152152
'' | soft) :;; #(
153153
*)
154154
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
155+
# shellcheck disable=SC3045
156156
ulimit -n "$MAX_FD" ||
157157
warn "Could not set maximum file descriptor limit to $MAX_FD"
158158
esac
@@ -197,6 +197,10 @@ if "$cygwin" || "$msys" ; then
197197
done
198198
fi
199199

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+
200204
# Collect all arguments for the java command;
201205
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
202206
# shell script including quotes and variable substitutions, so put them in

iexec-blockchain-adapter-api-library/build.gradle

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ dependencies {
99
implementation "com.iexec.commons:iexec-commons-poco:$iexecCommonsPocoVersion"
1010
implementation "com.iexec.common:iexec-common:$iexecCommonVersion"
1111
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
12+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
1213
}
1314

1415
java {
@@ -20,9 +21,6 @@ test {
2021
useJUnitPlatform()
2122
}
2223

23-
jacoco {
24-
toolVersion = "0.8.7"
25-
}
2624
// sonarqube code coverage requires jacoco XML report
2725
jacocoTestReport {
2826
reports {

0 commit comments

Comments
 (0)