Skip to content

Commit 6348a4b

Browse files
authored
Merge pull request #9 from GoodforGod/dev
Release 1.1.0
2 parents 63beec4 + ea512d1 commit 6348a4b

File tree

103 files changed

+1669
-938
lines changed

Some content is hidden

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

103 files changed

+1669
-938
lines changed

.editorconfig

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# all-encompassing default settings unless otherwise specified
7+
[*]
8+
end_of_line = lf
9+
charset = utf-8
10+
11+
# Yaml
12+
[{*.yml, *.yaml}]
13+
indent_size = 2
14+
indent_style = space
15+
16+
# Property files
17+
[*.properties]
18+
indent_size = 2
19+
indent_style = space
20+
21+

.gitattributes

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Handle line endings automatically for files detected as text
2+
# and leave all files detected as binary untouched.
3+
* text=auto
4+
5+
#
6+
# The above will handle all files NOT found below
7+
#
8+
# These files are text and should be normalized (Convert crlf => lf)
9+
*.bash text eol=lf
10+
*.css text diff=css
11+
*.df text
12+
*.htm text diff=html
13+
*.html text diff=html eol=lf
14+
*.java text diff=java eol=lf
15+
*.js text
16+
*.json text eol=lf
17+
*.jsp text eol=lf
18+
*.jspf text eol=lf
19+
*.jspx text eol=lf
20+
*.properties text eol=lf
21+
*.sh text eol=lf
22+
*.tld text
23+
*.txt text eol=lf
24+
*.tag text
25+
*.tagx text
26+
*.xml text
27+
*.yml text eol=lf
28+
29+
# These files are binary and should be left untouched
30+
# (binary is a macro for -text -diff)
31+
*.class binary
32+
*.dll binary
33+
*.ear binary
34+
*.gif binary
35+
*.ico binary
36+
*.jar binary
37+
*.jpg binary
38+
*.jpeg binary
39+
*.png binary
40+
*.so binary
41+
*.war binary

.github/workflows/gradle.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Java CI
2+
3+
on:
4+
schedule:
5+
- cron: "0 12 1 * *"
6+
pull_request:
7+
branches:
8+
- master
9+
- dev
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
java: [ '11' ]
17+
name: Java ${{ matrix.java }} setup
18+
19+
steps:
20+
- uses: actions/checkout@v1
21+
- name: Set up JDK
22+
uses: actions/setup-java@v1
23+
24+
with:
25+
java-version: ${{ matrix.java }}
26+
27+
- name: Build with Gradle
28+
run: ./gradlew build jacocoTestReport
29+
env:
30+
API_KEY: ${{ secrets.API_KEY }}
31+
32+
- name: Analyze with SonarQube
33+
run: ./gradlew sonarqube
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
37+
API_KEY: ${{ secrets.API_KEY }}

.gitignore

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1-
.idea/
1+
/.settings/
2+
.idea
3+
.idea/httpRequests
24
*.iml
5+
.gradle
6+
build
7+
target/

.travis.yml

-14
This file was deleted.

README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# java-etherscan-api
22

3-
![travis](https://travis-ci.org/GoodforGod/java-etherscan-api.svg?branch=master)
4-
[![Maintainability](https://api.codeclimate.com/v1/badges/808997be2e69ff1ae8fe/maintainability)](https://codeclimate.com/github/GoodforGod/java-etherscan-api/maintainability)
5-
[![codecov](https://codecov.io/gh/GoodforGod/java-etherscan-api/branch/master/graph/badge.svg)](https://codecov.io/gh/GoodforGod/java-etherscan-api)
3+
[![Jitpack](https://jitpack.io/v/iSnow/java-etherscan-api.svg)](https://jitpack.io/#GoodforGod/java-etherscan-api)
64

75
[Etherscan](https://etherscan.io/apis) Java API implementation.
86

@@ -14,14 +12,14 @@ Library supports all available EtherScan *API* calls for all available *Ethereum
1412
<dependency>
1513
<groupId>com.github.goodforgod</groupId>
1614
<artifactId>java-etherscan-api</artifactId>
17-
<version>1.0.2</version>
15+
<version>1.1.0</version>
1816
</dependency>
1917
```
2018

2119
**Gradle**
2220
```groovy
2321
dependencies {
24-
compile 'com.github.goodforgod:java-etherscan-api:1.0.2'
22+
compile 'com.github.goodforgod:java-etherscan-api:1.1.0'
2523
}
2624
```
2725

build.gradle

+135
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
plugins {
2+
id 'jacoco'
3+
id 'java-library'
4+
id 'maven-publish'
5+
6+
id 'org.sonarqube' version '3.0'
7+
id 'com.diffplug.gradle.spotless' version '4.4.0'
8+
}
9+
10+
repositories {
11+
mavenLocal()
12+
mavenCentral()
13+
jcenter()
14+
}
15+
16+
group = groupId
17+
version = artifactVersion
18+
19+
sourceCompatibility = 1.8
20+
targetCompatibility = 1.8
21+
22+
spotless {
23+
java {
24+
encoding 'UTF-8'
25+
removeUnusedImports()
26+
eclipse().configFile "${projectDir}/config/codestyle.xml"
27+
}
28+
}
29+
30+
sonarqube {
31+
properties {
32+
property 'sonar.host.url', 'https://sonarcloud.io'
33+
property 'sonar.organization', 'goodforgod'
34+
property 'sonar.projectKey', 'GoodforGod_java-etherscan-api'
35+
}
36+
}
37+
38+
dependencies {
39+
implementation 'org.jetbrains:annotations:20.1.0'
40+
implementation 'com.google.code.gson:gson:2.8.6'
41+
42+
testImplementation 'junit:junit:4.13.1'
43+
}
44+
45+
test {
46+
failFast = true
47+
48+
useJUnit()
49+
testLogging {
50+
events "passed", "skipped", "failed"
51+
exceptionFormat "full"
52+
}
53+
}
54+
55+
tasks.withType(JavaCompile) {
56+
options.encoding = 'UTF-8'
57+
options.incremental = true
58+
options.fork = true
59+
}
60+
61+
tasks.withType(Test) {
62+
reports.html.enabled = false
63+
reports.junitXml.enabled = false
64+
}
65+
66+
java {
67+
withJavadocJar()
68+
withSourcesJar()
69+
}
70+
71+
publishing {
72+
publications {
73+
mavenJava(MavenPublication) {
74+
from components.java
75+
76+
pom {
77+
name = 'Java Etherscan API'
78+
url = 'https://github.com/GoodforGod/java-etherscan-api'
79+
description = 'Library is a wrapper for EtherScan API.'
80+
81+
license {
82+
name = 'MIT License'
83+
url = 'https://github.com/GoodforGod/java-etherscan-api/blob/master/LICENSE'
84+
distribution = 'repo'
85+
}
86+
87+
developer {
88+
id = 'GoodforGod'
89+
name = 'Anton Kurako'
90+
91+
url = 'https://github.com/GoodforGod'
92+
}
93+
94+
scm {
95+
connection = 'scm:git:git://github.com/GoodforGod/java-etherscan-api.git'
96+
developerConnection = 'scm:git:ssh://GoodforGod/java-etherscan-api.git'
97+
url = 'https://github.com/GoodforGod/java-etherscan-api/tree/master'
98+
}
99+
}
100+
}
101+
}
102+
repositories {
103+
maven {
104+
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
105+
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
106+
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
107+
credentials {
108+
username System.getenv("OSS_USERNAME")
109+
password System.getenv("OSS_PASSWORD")
110+
}
111+
}
112+
}
113+
}
114+
115+
check.dependsOn jacocoTestReport
116+
jacocoTestReport {
117+
reports {
118+
xml.enabled true
119+
html.destination file("${buildDir}/jacocoHtml")
120+
}
121+
}
122+
123+
if (project.hasProperty("signing.keyId")) {
124+
apply plugin: 'signing'
125+
signing {
126+
sign publishing.publications.mavenJava
127+
}
128+
}
129+
130+
javadoc {
131+
options.encoding = "UTF-8"
132+
if (JavaVersion.current().isJava9Compatible()) {
133+
options.addBooleanOption('html5', true)
134+
}
135+
}

0 commit comments

Comments
 (0)