Skip to content

Commit 219e4ba

Browse files
authored
Merge pull request #146 from iExecBlockchainComputing/release/8.5.0
Release/8.5.0
2 parents 5a1b3e7 + fd2cdc9 commit 219e4ba

File tree

19 files changed

+253
-142
lines changed

19 files changed

+253
-142
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,26 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [[8.5.0]](https://github.com/iExecBlockchainComputing/iexec-blockchain-adapter-api/releases/tag/v8.5.0) 2024-06-18
6+
7+
### New Features
8+
9+
- Replace `CredentialsService` with `SignerService`. (#143)
10+
- Allow up to 4 blockchain transactions at the same time. (#144)
11+
12+
### Quality
13+
14+
- Use `Instant` instead of `DateTimeUtils`. (#138)
15+
- Configure Gradle JVM Test Suite Plugin. (#139)
16+
17+
### Dependency Upgrades
18+
19+
- Upgrade to Gradle 8.7. (#140)
20+
- Upgrade to `eclipse-temurin:11.0.22_7-jre-focal`. (#141)
21+
- Upgrade to Spring Boot 2.7.18. (#142)
22+
- Upgrade to `iexec-commons-poco` 4.1.0. (#145)
23+
- Upgrade to `iexce-common` 8.5.0. (#145)
24+
525
## [[8.4.0]](https://github.com/iExecBlockchainComputing/iexec-blockchain-adapter-api/releases/tag/v8.4.0) 2024-02-29
626

727
### New Features

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build app container
2-
FROM eclipse-temurin:11.0.21_9-jre-focal
2+
FROM eclipse-temurin:11.0.22_7-jre-focal
33

44
ARG jar
55

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ To run properly, the iExec Blockchain Adapter API requires:
3333
| `IEXEC_BLOCKCHAIN_ADAPTER_API_HUB_ADDRESS` | Proxy contract address to interact with the iExec on-chain protocol. | Ethereum Address | `0x3eca1B216A7DF1C7689aEb259fFB83ADFB894E7f` |
3434
| `IEXEC_BLOCKCHAIN_ADAPTER_API_GAS_PRICE_MULTIPLIER` | Transactions will be sent with `networkGasPrice * gasPriceMultiplier`. | Float | `1.0` |
3535
| `IEXEC_BLOCKCHAIN_ADAPTER_API_GAS_PRICE_CAP` | In Wei, will be used for transactions if `networkGasPrice * gasPriceMultiplier > gasPriceCap`. | Positive integer | `22000000000` |
36-
| `IEXEC_BLOCKCHAIN_ADAPTER_API_MAX_ALLOWED_TX_PER_BLOCK` | Max number of transactions per block, it can either be `1` or `2`. | Positive integer | `1` |
36+
| `IEXEC_BLOCKCHAIN_ADAPTER_API_MAX_ALLOWED_TX_PER_BLOCK` | Max number of transactions per block, between `1` and `4`. | Positive integer | `1` |
3737
| `IEXEC_BLOCKCHAIN_ADAPTER_API_WALLET_PATH` | Path to the wallet of the server. | String | `src/main/resources/wallet.json` |
3838
| `IEXEC_BLOCKCHAIN_ADAPTER_API_WALLET_PASSWORD` | Password to unlock the wallet of the server. | String | `whatever` |
3939

build.gradle

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
plugins {
22
id 'java'
3-
id 'io.freefair.lombok' version '8.2.2'
4-
id 'org.springframework.boot' version '2.7.17'
3+
id 'io.freefair.lombok' version '8.6'
4+
id 'org.springframework.boot' version '2.7.18'
55
id 'io.spring.dependency-management' version '1.1.4'
66
id 'jacoco'
7-
id 'org.sonarqube' version '4.2.1.3168'
7+
id 'org.sonarqube' version '5.0.0.4638'
88
id 'maven-publish'
99
}
1010

@@ -46,20 +46,6 @@ allprojects {
4646
}
4747
}
4848

49-
sourceSets {
50-
itest {
51-
java {
52-
compileClasspath += main.output + test.output
53-
runtimeClasspath += main.output + test.output
54-
}
55-
}
56-
}
57-
58-
configurations {
59-
itestRuntime.extendsFrom testRuntime
60-
itestImplementation.extendsFrom testImplementation
61-
}
62-
6349
dependencies {
6450
// Spring framework
6551
implementation 'org.springframework.boot:spring-boot-starter-actuator'
@@ -84,12 +70,6 @@ dependencies {
8470

8571
// integration tests
8672
implementation project(':iexec-blockchain-adapter-api-library')
87-
88-
testImplementation 'org.springframework.boot:spring-boot-starter-test'
89-
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
90-
testImplementation 'org.awaitility:awaitility'
91-
92-
itestImplementation "org.testcontainers:junit-jupiter:$testContainersVersion"
9373
}
9474

9575
springBoot {
@@ -103,16 +83,34 @@ tasks.named("bootJar") {
10383
}
10484
}
10585

106-
tasks.register("itest", Test) {
107-
doFirst {
108-
exec {
109-
commandLine 'docker', 'compose', 'pull', '-q'
86+
testing {
87+
suites {
88+
configureEach {
89+
dependencies {
90+
implementation 'org.springframework.boot:spring-boot-starter-test'
91+
implementation 'org.awaitility:awaitility'
92+
}
93+
}
94+
test {
95+
useJUnitJupiter()
96+
}
97+
itest(JvmTestSuite) {
98+
sources {
99+
java {
100+
srcDirs = ['src/itest/java']
101+
}
102+
}
103+
dependencies {
104+
implementation project()
105+
implementation project(':iexec-blockchain-adapter-api-library')
106+
implementation "com.iexec.commons:iexec-commons-poco:$iexecCommonsPocoVersion"
107+
implementation "com.iexec.common:iexec-common:$iexecCommonVersion"
108+
implementation 'org.apache.commons:commons-lang3'
109+
implementation 'org.hibernate.validator:hibernate-validator'
110+
implementation "org.testcontainers:junit-jupiter:$testContainersVersion"
111+
}
110112
}
111113
}
112-
group 'Verification'
113-
description 'Runs the integration tests.'
114-
setTestClassesDirs(sourceSets.itest.output)
115-
classpath = sourceSets.itest.runtimeClasspath
116114
}
117115

118116
publishing {
@@ -135,7 +133,6 @@ publishing {
135133

136134
tasks.withType(Test).configureEach {
137135
finalizedBy jacocoTestReport
138-
useJUnitPlatform()
139136
}
140137

141138
// sonarqube code coverage requires jacoco XML report

gradle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
version=8.4.0
2-
iexecCommonVersion=8.4.0
3-
iexecCommonsPocoVersion=3.2.0
1+
version=8.5.0
2+
iexecCommonVersion=8.5.0
3+
iexecCommonsPocoVersion=4.1.0
44

55
nexusUser
66
nexusPassword

gradle/wrapper/gradle-wrapper.jar

-19.5 KB
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ done
8383
# This is normally unused
8484
# shellcheck disable=SC2034
8585
APP_BASE_NAME=${0##*/}
86-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
8788

8889
# Use the maximum available, or set MAX_FD != -1 to use that value.
8990
MAX_FD=maximum
@@ -144,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
146147
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
147-
# shellcheck disable=SC3045
148+
# shellcheck disable=SC2039,SC3045
148149
MAX_FD=$( ulimit -H -n ) ||
149150
warn "Could not query maximum file descriptor limit"
150151
esac
151152
case $MAX_FD in #(
152153
'' | soft) :;; #(
153154
*)
154155
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
155-
# shellcheck disable=SC3045
156+
# shellcheck disable=SC2039,SC3045
156157
ulimit -n "$MAX_FD" ||
157158
warn "Could not set maximum file descriptor limit to $MAX_FD"
158159
esac
@@ -201,11 +202,11 @@ fi
201202
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
202203
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
203204

204-
# Collect all arguments for the java command;
205-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
206-
# shell script including quotes and variable substitutions, so put them in
207-
# double quotes to make sure that they get re-expanded; and
208-
# * put everything else in single quotes, so that it's not re-expanded.
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
209210

210211
set -- \
211212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

gradlew.bat

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
4343
%JAVA_EXE% -version >NUL 2>&1
4444
if %ERRORLEVEL% equ 0 goto execute
4545

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
46+
echo. 1>&2
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
48+
echo. 1>&2
49+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
50+
echo location of your Java installation. 1>&2
5151

5252
goto fail
5353

@@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5757

5858
if exist "%JAVA_EXE%" goto execute
5959

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
60+
echo. 1>&2
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
62+
echo. 1>&2
63+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
64+
echo location of your Java installation. 1>&2
6565

6666
goto fail
6767

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

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ dependencies {
99
implementation "com.iexec.commons:iexec-commons-poco:$iexecCommonsPocoVersion"
1010
implementation "com.iexec.common:iexec-common:$iexecCommonVersion"
1111
implementation 'org.apache.commons:commons-lang3:3.12.0'
12-
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
13-
testImplementation 'org.mockito:mockito-junit-jupiter:4.5.1'
14-
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
1512
}
1613

1714
java {
@@ -21,8 +18,20 @@ java {
2118
withSourcesJar()
2219
}
2320

24-
test {
25-
useJUnitPlatform()
21+
testing {
22+
suites {
23+
test {
24+
useJUnitJupiter()
25+
dependencies {
26+
implementation 'org.junit.jupiter:junit-jupiter:5.8.2'
27+
implementation 'org.mockito:mockito-junit-jupiter:4.5.1'
28+
}
29+
}
30+
}
31+
}
32+
33+
tasks.withType(Test).configureEach {
34+
finalizedBy jacocoTestReport
2635
}
2736

2837
// sonarqube code coverage requires jacoco XML report
@@ -31,7 +40,6 @@ jacocoTestReport {
3140
xml.required = true
3241
}
3342
}
34-
tasks.test.finalizedBy tasks.jacocoTestReport
3543

3644
publishing {
3745
publications {

0 commit comments

Comments
 (0)