Skip to content

Commit 78d2a30

Browse files
Merge pull request #466 from iExecBlockchainComputing/release/6.4.0
Release/6.4.0
2 parents 621135c + e07636a commit 78d2a30

File tree

54 files changed

+279
-260
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+279
-260
lines changed

Jenkinsfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ pipeline {
1111
sh './gradlew clean test sonarqube -Dsonar.projectKey=iexec-core -Dsonar.host.url=$address_sonar -Dsonar.login=$core_token --refresh-dependencies --no-daemon'
1212
}
1313
junit 'build/test-results/**/*.xml'
14+
jacoco()
1415
}
1516
}
1617

@@ -29,7 +30,7 @@ pipeline {
2930
}
3031
steps {
3132
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'nexus', usernameVariable: 'NEXUS_USER', passwordVariable: 'NEXUS_PASSWORD']]) {
32-
sh './gradlew -PnexusUser=$NEXUS_USER -PnexusPassword=$NEXUS_PASSWORD uploadArchives --no-daemon'
33+
sh './gradlew -PnexusUser=$NEXUS_USER -PnexusPassword=$NEXUS_PASSWORD publish --no-daemon'
3334
}
3435
}
3536
}

build.gradle

Lines changed: 42 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ apply plugin: 'java'
1919
apply plugin: 'eclipse'
2020
apply plugin: 'org.springframework.boot'
2121
apply plugin: 'io.spring.dependency-management'
22-
apply plugin: 'maven'
22+
apply plugin: 'maven-publish'
2323
apply plugin: 'jacoco'
2424

2525
group = 'com.iexec.core'
@@ -28,6 +28,7 @@ targetCompatibility = 11
2828

2929

3030
repositories {
31+
mavenLocal()
3132
mavenCentral()
3233
jcenter()
3334
maven {
@@ -37,23 +38,6 @@ repositories {
3738
maven { url "https://jitpack.io" }
3839
}
3940

40-
configurations {
41-
springBootJar
42-
libraryJar
43-
}
44-
45-
def LIBRARY_JAR_NAME = project.name + "-library"
46-
jar {
47-
enabled = true
48-
baseName = LIBRARY_JAR_NAME
49-
}
50-
51-
// the project will create two artifacts: one spring boot executable and one library
52-
artifacts {
53-
springBootJar file: file('build/libs/' + project.name + '-' + version + '.jar')
54-
libraryJar file: file('build/libs/' + LIBRARY_JAR_NAME + '-' + version + '.jar')
55-
}
56-
5741
ext {
5842
//https://github.com/spring-cloud/spring-cloud-openfeign/issues/171
5943
//Greenwich.SR2 is a patch for Greenwich.RELEASE
@@ -69,55 +53,50 @@ dependencyManagement {
6953

7054
dependencies {
7155
// iexec
72-
compile "com.iexec.common:iexec-common:$iexecCommonVersion"
73-
//compile files("../iexec-common/build/libs/iexec-common-${iexecCommonVersion}.jar")
56+
implementation "com.iexec.common:iexec-common:$iexecCommonVersion"
7457

7558
// spring
76-
compile("org.springframework.boot:spring-boot-starter") {
59+
implementation ("org.springframework.boot:spring-boot-starter") {
7760
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging' //required for Graylog
7861
}
79-
compile "org.springframework.boot:spring-boot-starter-web"
80-
compile "org.springframework.boot:spring-boot-starter-data-mongodb"
81-
compile "org.springframework.boot:spring-boot-starter-websocket"
82-
compile "org.springframework.retry:spring-retry"
83-
compile "org.springframework.boot:spring-boot-starter-aop"
84-
compile "org.springframework.boot:spring-boot-starter-security"
85-
compile "org.springframework.boot:spring-boot-starter-actuator"
86-
compile "org.springframework.cloud:spring-cloud-starter-openfeign"
62+
implementation "org.springframework.boot:spring-boot-starter-web"
63+
implementation "org.springframework.boot:spring-boot-starter-data-mongodb"
64+
implementation "org.springframework.boot:spring-boot-starter-websocket"
65+
implementation "org.springframework.retry:spring-retry"
66+
implementation "org.springframework.boot:spring-boot-starter-aop"
67+
implementation "org.springframework.boot:spring-boot-starter-security"
68+
implementation "org.springframework.boot:spring-boot-starter-actuator"
69+
implementation "org.springframework.cloud:spring-cloud-starter-openfeign"
8770

8871
// NoSuchMethodError: 'okhttp3.RequestBody okhttp3.RequestBody.create(java.lang.String, okhttp3.MediaType)'
8972
implementation 'com.squareup.okhttp3:okhttp:4.3.1' // Web3j issue: https://github.com/web3j/web3j/issues/1180
9073
// NoSuchMethodError: 'byte[] kotlin.collections.ArraysKt.copyInto(byte[], byte[], int, int, int)'
9174
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.3.50' // https://stackoverflow.com/a/57907899
9275

93-
testCompile "org.springframework.boot:spring-boot-starter-test"
76+
testImplementation "org.springframework.boot:spring-boot-starter-test"
9477

9578
// swagger
96-
compile "io.springfox:springfox-swagger2:2.9.2"
97-
compile "io.springfox:springfox-swagger-ui:2.9.2"
79+
implementation "io.springfox:springfox-swagger2:2.9.2"
80+
implementation "io.springfox:springfox-swagger-ui:2.9.2"
9881

9982
// jason web token
100-
compile "io.jsonwebtoken:jjwt:0.7.0"
83+
implementation "io.jsonwebtoken:jjwt:0.7.0"
10184

10285
// expiring map
103-
compile "net.jodah:expiringmap:0.5.8"
86+
implementation "net.jodah:expiringmap:0.5.8"
10487

10588
// ipfs
106-
compile "com.github.ipfs:java-ipfs-http-client:1.2.3"
89+
implementation "com.github.ipfs:java-ipfs-http-client:1.2.3"
10790

108-
//graylog
109-
compile 'biz.paluch.logging:logstash-gelf:1.5.1'
91+
// graylog
92+
implementation 'biz.paluch.logging:logstash-gelf:1.5.1'
11093

111-
compile 'io.micrometer:micrometer-registry-prometheus:1.1.5'
94+
implementation 'io.micrometer:micrometer-registry-prometheus:1.1.5'
11295

11396
// lombok
11497
compileOnly "org.projectlombok:lombok:1.18.2"
11598
annotationProcessor "org.projectlombok:lombok:1.18.2"
11699

117-
// package cloud
118-
springBootJar "io.packagecloud.maven.wagon:maven-packagecloud-wagon:0.0.6"
119-
libraryJar "io.packagecloud.maven.wagon:maven-packagecloud-wagon:0.0.6"
120-
121100
// mongock
122101
implementation "com.github.cloudyrock.mongock:mongock-spring-v5:${mongockVersion}"
123102
implementation "com.github.cloudyrock.mongock:mongodb-springdata-v2-driver:${mongockVersion}"
@@ -129,16 +108,18 @@ dependencies {
129108
testImplementation 'org.awaitility:awaitility:4.0.1'
130109
}
131110

132-
jacoco {
133-
toolVersion = "0.8.3"
111+
jar {
112+
enabled = true
113+
archiveClassifier.set('library')
134114
}
135115

136-
jacocoTestReport {
137-
reports.xml.enabled true
138-
reports.xml.destination file("${jacoco.reportsDir}/test/cov.xml")
116+
test {
117+
useJUnitPlatform()
139118
}
140119

141-
// the test coverage report will be created just before the build
120+
jacoco {
121+
toolVersion = "0.8.3"
122+
}
142123
build.dependsOn jacocoTestReport
143124

144125
def gitBranch = 'git name-rev --name-only HEAD'.execute().text.trim()
@@ -157,39 +138,25 @@ project.ext.getNexusMaven = {
157138
}
158139
}
159140

160-
uploadSpringBootJar {
161-
description 'Upload the executable jar version of the core'
162-
repositories.mavenDeployer {
163-
pom.groupId = project.group
164-
pom.artifactId = project.name
165-
pom.version = version
166-
configuration = configurations.springBootJar
167-
repository(url: getNexusMaven()) {
168-
authentication(userName: project.nexusUser, password: project.nexusPassword)
141+
publishing {
142+
publications {
143+
maven(MavenPublication) {
144+
artifact bootJar
145+
from components.java
169146
}
170147
}
171-
}
172-
173-
uploadLibraryJar {
174-
description 'Upload the library jar version of the core'
175-
repositories.mavenDeployer {
176-
pom.groupId = project.group
177-
pom.artifactId = LIBRARY_JAR_NAME
178-
pom.version = version
179-
configuration = configurations.libraryJar
180-
repository(url: getNexusMaven()) {
181-
authentication(userName: project.nexusUser, password: project.nexusPassword)
148+
repositories {
149+
maven {
150+
credentials {
151+
username nexusUser
152+
password nexusPassword
153+
}
154+
url getNexusMaven
182155
}
183156
}
184157
}
185158

186-
uploadLibraryJar.enabled = canUploadArchives
187-
uploadSpringBootJar.enabled = canUploadArchives
188-
uploadArchives.enabled = canUploadArchives
189-
190-
uploadArchives.dependsOn uploadLibraryJar
191-
uploadArchives.dependsOn uploadSpringBootJar
192-
159+
publish.enabled canUploadArchives
193160

194161
import org.apache.tools.ant.filters.ReplaceTokens
195162

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version=6.3.0
2-
iexecCommonVersion=5.7.0
1+
version=6.4.0
2+
iexecCommonVersion=5.8.0
33
nexusUser=fake
44
nexusPassword=fake

gradle/wrapper/gradle-wrapper.jar

3.5 KB
Binary file not shown.
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-5.5-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

gradlew

Lines changed: 16 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gradlew.bat

Lines changed: 7 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/java/com/iexec/core/chain/ChainConfig.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,16 @@
2828
@NoArgsConstructor
2929
public class ChainConfig {
3030

31-
@Value("${chain.id}")
31+
@Value("#{blockchainAdapterService.publicChainConfig.chainId}")
3232
private Integer chainId;
3333

34-
@Value("${chain.sidechain}")
34+
@Value("#{blockchainAdapterService.publicChainConfig.isSidechain()}")
3535
private boolean isSidechain;
3636

3737
@Value("${chain.privateAddress}")
3838
private String privateChainAddress;
3939

40-
@Value("${chain.publicAddress}")
41-
private String publicChainAddress;
42-
43-
@Value("${chain.hubAddress}")
40+
@Value("#{blockchainAdapterService.publicChainConfig.iexecHubContractAddress}")
4441
private String hubAddress;
4542

4643
@Value("${chain.poolAddress}")

src/main/java/com/iexec/core/chain/IexecHubService.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,10 @@ public class IexecHubService extends IexecHubAbstractService {
5858
public IexecHubService(CredentialsService credentialsService,
5959
Web3jService web3jService,
6060
ChainConfig chainConfig) {
61-
super(credentialsService.getCredentials(), web3jService, chainConfig.getHubAddress());
61+
super(
62+
credentialsService.getCredentials(),
63+
web3jService,
64+
chainConfig.getHubAddress());
6265
this.credentialsService = credentialsService;
6366
this.web3jService = web3jService;
6467
this.executor = (ThreadPoolExecutor) Executors.newFixedThreadPool(1);

0 commit comments

Comments
 (0)