Skip to content

Commit 3405883

Browse files
committed
[2.1.0-SNAPSHOT]
build.gradle updated for new CI CONTRIBUTING.md added README.md updated
1 parent 3a87ca8 commit 3405883

File tree

8 files changed

+92
-23
lines changed

8 files changed

+92
-23
lines changed

β€ŽCONTRIBUTING.mdβ€Ž

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Contributing Code or Documentation Guide
2+
3+
## Running Tests
4+
5+
The new code should contain tests that check new behavior.
6+
7+
Run tests `./gradlew test` to check that code works as behavior.
8+
9+
## Code Style
10+
11+
The code base should remain clean, following industry best practices for organization, javadoc and style, as much as possible.
12+
13+
To run the Code Style check use `./gradlew spotlessCheck`.
14+
15+
If check found any errors, you can apply Code Style by running `./gradlew spotlessApply`
16+
17+
## Creating a pull request
18+
19+
Once you are satisfied with your changes:
20+
21+
- Commit changes to the local branch you created.
22+
- Push that branch with changes to the corresponding remote branch on GitHub
23+
- Submit a [pull request](https://help.github.com/articles/creating-a-pull-request) to `dev` branch.

β€ŽREADME.mdβ€Ž

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Java EtherScan API
22

33
[![Minimum required Java version](https://img.shields.io/badge/Java-1.8%2B-blue?logo=openjdk)](https://openjdk.org/projects/jdk8/)
4-
[![GitHub Action](https://github.com/goodforgod/java-etherscan-api/workflows/Java%20CI/badge.svg)](https://github.com/GoodforGod/java-etherscan-api/actions?query=workflow%3A%22Java+CI%22)
4+
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.goodforgod/java-etherscan-api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.goodforgod/java-etherscan-api)
5+
[![Java CI](https://github.com/GoodforGod/java-etherscan-api/workflows/CI%20Master/badge.svg)](https://github.com/GoodforGod/java-etherscan-api/actions?query=workflow%3ACI+Master)
56
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=GoodforGod_java-etherscan-api&metric=coverage)](https://sonarcloud.io/dashboard?id=GoodforGod_java-etherscan-api)
67
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=GoodforGod_java-etherscan-api&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=GoodforGod_java-etherscan-api)
78
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=GoodforGod_java-etherscan-api&metric=ncloc)](https://sonarcloud.io/dashboard?id=GoodforGod_java-etherscan-api)
@@ -14,15 +15,15 @@ Library supports EtherScan *API* for all available *Ethereum Networks* for *ethe
1415

1516
**Gradle**
1617
```groovy
17-
implementation "com.github.goodforgod:java-etherscan-api:2.0.0"
18+
implementation "com.github.goodforgod:java-etherscan-api:2.1.0"
1819
```
1920

2021
**Maven**
2122
```xml
2223
<dependency>
2324
<groupId>com.github.goodforgod</groupId>
2425
<artifactId>java-etherscan-api</artifactId>
25-
<version>2.0.0</version>
26+
<version>2.1.0</version>
2627
</dependency>
2728
```
2829

β€Ž_config.ymlβ€Ž

Lines changed: 0 additions & 1 deletion
This file was deleted.

β€Žbuild.gradleβ€Ž

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ plugins {
33
id "java-library"
44
id "maven-publish"
55

6-
id "org.sonarqube" version "3.3"
7-
id "com.diffplug.spotless" version "6.12.0"
6+
id "org.sonarqube" version "4.3.0.3225"
7+
id "com.diffplug.spotless" version "6.19.0"
8+
id "io.github.gradle-nexus.publish-plugin" version "1.3.0"
89
}
910

1011
repositories {
@@ -13,7 +14,8 @@ repositories {
1314
}
1415

1516
group = groupId
16-
version = artifactVersion
17+
var ver = System.getenv().getOrDefault("RELEASE_VERSION", artifactVersion)
18+
version = ver.startsWith("v") ? ver.substring(1) : ver
1719

1820
sourceCompatibility = JavaVersion.VERSION_1_8
1921
targetCompatibility = JavaVersion.VERSION_1_8
@@ -28,6 +30,7 @@ dependencies {
2830
}
2931

3032
test {
33+
failFast(false)
3134
useJUnitPlatform()
3235
testLogging {
3336
events("passed", "skipped", "failed")
@@ -36,17 +39,21 @@ test {
3639
}
3740

3841
reports {
39-
html.enabled(false)
40-
junitXml.enabled(false)
42+
html.required = false
43+
junitXml.required = false
4144
}
45+
46+
environment([
47+
"": "",
48+
])
4249
}
4350

4451
spotless {
4552
java {
4653
encoding("UTF-8")
4754
importOrder()
4855
removeUnusedImports()
49-
eclipse("4.21.0").configFile("${rootDir}/config/codestyle.xml")
56+
eclipse("4.21").configFile("${rootDir}/config/codestyle.xml")
5057
}
5158
}
5259

@@ -58,6 +65,18 @@ sonarqube {
5865
}
5966
}
6067

68+
nexusPublishing {
69+
packageGroup = groupId
70+
repositories {
71+
sonatype {
72+
username = System.getenv("OSS_USERNAME")
73+
password = System.getenv("OSS_PASSWORD")
74+
nexusUrl.set(uri("https://oss.sonatype.org/service/local/"))
75+
snapshotRepositoryUrl.set(uri("https://oss.sonatype.org/content/repositories/snapshots/"))
76+
}
77+
}
78+
}
79+
6180
publishing {
6281
publications {
6382
mavenJava(MavenPublication) {
@@ -99,6 +118,16 @@ publishing {
99118
password System.getenv("OSS_PASSWORD")
100119
}
101120
}
121+
if (!version.endsWith("SNAPSHOT")) {
122+
maven {
123+
name = "GitHubPackages"
124+
url = "https://maven.pkg.github.com/GoodforGod/$artifactId"
125+
credentials {
126+
username = System.getenv("GITHUB_ACTOR")
127+
password = System.getenv("GITHUB_TOKEN")
128+
}
129+
}
130+
}
102131
}
103132
}
104133

@@ -116,7 +145,7 @@ tasks.withType(JavaCompile) {
116145
check.dependsOn jacocoTestReport
117146
jacocoTestReport {
118147
reports {
119-
xml.enabled true
148+
xml.required = true
120149
html.destination file("${buildDir}/jacocoHtml")
121150
}
122151
}
@@ -128,9 +157,12 @@ javadoc {
128157
}
129158
}
130159

131-
if (project.hasProperty("signing.keyId")) {
160+
if (project.hasProperty("signingKey")) {
132161
apply plugin: "signing"
133162
signing {
163+
def signingKey = findProperty("signingKey")
164+
def signingPassword = findProperty("signingPassword")
165+
useInMemoryPgpKeys(signingKey, signingPassword)
134166
sign publishing.publications.mavenJava
135167
}
136168
}
1.99 KB
Binary file not shown.
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
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-bin.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

β€Žgradlewβ€Ž

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

β€Žgradlew.batβ€Ž

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

0 commit comments

Comments
Β (0)