@@ -3,14 +3,11 @@ plugins {
33 id ' maven-publish'
44 id ' signing'
55 id ' jacoco'
6- id ' com.diffplug.spotless' version ' 5.6.1 '
6+ id ' com.diffplug.spotless' version ' 6.25.0 '
77}
88
99group = ' org.arkecosystem'
10- version = ' 2.0.0'
11-
12- sourceCompatibility = 1.8
13- targetCompatibility = 1.8
10+ version = ' 2.0.0-mainsail'
1411
1512repositories {
1613 mavenLocal()
@@ -30,9 +27,9 @@ configurations {
3027}
3128
3229dependencies {
33- implementation group : ' com.squareup.okhttp3' , name : ' okhttp' , version : ' 4.8.1'
34- implementation group : ' com.squareup.okhttp3' , name : ' mockwebserver' , version : ' 4.9.0'
35- implementation group : ' com.google.code.gson' , name : ' gson' , version : ' 2.8.6'
30+ implementation ' com.squareup.okhttp3: okhttp: 4.8.1'
31+ implementation ' com.squareup.okhttp3: mockwebserver: 4.9.0'
32+ implementation ' com.google.code.gson: gson: 2.8.6'
3633
3734 testImplementation ' org.junit.jupiter:junit-jupiter-api:5.7.2'
3835 testImplementation ' org.hamcrest:hamcrest-library:2.2'
@@ -41,14 +38,16 @@ dependencies {
4138 integrationImplementation ' org.junit.jupiter:junit-jupiter-api:5.7.2'
4239 integrationImplementation ' org.junit.jupiter:junit-jupiter-engine:5.7.2'
4340 integrationImplementation ' org.hamcrest:hamcrest-library:2.2'
44- integrationImplementation ' org.arkecosystem:crypto:2.0.0'
4541 integrationCompileOnly ' org.slf4j:slf4j-api:1.7.32'
4642 integrationRuntimeOnly ' org.slf4j:slf4j-simple:1.7.32'
4743 integrationImplementation ' com.github.rholder:guava-retrying:2.0.0'
48- integrationImplementation " cash.z.ecc.android:kotlin-bip39:1.0.2"
44+ integrationImplementation ' cash.z.ecc.android:kotlin-bip39:1.0.2'
4945}
5046
5147java {
48+ toolchain {
49+ languageVersion = JavaLanguageVersion . of(17 )
50+ }
5251 withJavadocJar()
5352 withSourcesJar()
5453}
@@ -74,25 +73,13 @@ spotless {
7473 include ' src/test/**/*.java'
7574 exclude ' **/build/**'
7675 }
77- googleJavaFormat(' 1.1 ' ). aosp()
76+ googleJavaFormat(' 1.17.0 ' ). aosp()
7877 removeUnusedImports()
7978 }
8079}
8180
8281task formatCode (dependsOn : [' spotlessApply' ])
8382
84- task fatJar (type : Jar ) {
85- manifest. from jar. manifest
86- from {
87- configurations. runtimeClasspath. collect { it. isDirectory() ? it : zipTree(it) }
88- } {
89- exclude " META-INF/*.SF"
90- exclude " META-INF/*.DSA"
91- exclude " META-INF/*.RSA"
92- }
93- with jar
94- }
95-
9683build. dependsOn ' spotlessApply'
9784
9885tasks. register(' integrationTest' , Test ) {
@@ -107,18 +94,16 @@ tasks.register('integrationTest', Test) {
10794}
10895
10996wrapper {
110- gradleVersion = ' 7.2 '
97+ gradleVersion = ' 8.4.1 '
11198}
11299
113100publishing {
114101 publications {
115102 mavenJava(MavenPublication ) {
116103 from components. java
117- pom {
118- groupId = project. group
119- version = project. version
120- artifactId = ' client'
104+ artifactId = ' client'
121105
106+ pom {
122107 name = ' java-client'
123108 description = ' A Simple REST API Client Implementation in Java for the ARK CORE Blockchain Framework.'
124109 url = ' https://sdk.ark.dev/java/client'
@@ -181,8 +166,14 @@ publishing {
181166}
182167
183168signing {
169+ // Only sign when publishing to remote repository
170+ required { gradle. taskGraph. hasTask(" publish" ) && ! gradle. taskGraph. hasTask(" publishToMavenLocal" ) }
171+
184172 def signingKey = findProperty(" signingKey" )
185173 def signingPassword = findProperty(" signingPassword" )
186- useInMemoryPgpKeys(signingKey as String , signingPassword as String )
187- sign publishing. publications. mavenJava
174+
175+ if (signingKey && signingPassword) {
176+ useInMemoryPgpKeys(signingKey as String , signingPassword as String )
177+ sign publishing. publications. mavenJava
178+ }
188179}
0 commit comments