Skip to content

Release 1.1.0 #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Oct 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# all-encompassing default settings unless otherwise specified
[*]
end_of_line = lf
charset = utf-8

# Yaml
[{*.yml, *.yaml}]
indent_size = 2
indent_style = space

# Property files
[*.properties]
indent_size = 2
indent_style = space


41 changes: 41 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Handle line endings automatically for files detected as text
# and leave all files detected as binary untouched.
* text=auto

#
# The above will handle all files NOT found below
#
# These files are text and should be normalized (Convert crlf => lf)
*.bash text eol=lf
*.css text diff=css
*.df text
*.htm text diff=html
*.html text diff=html eol=lf
*.java text diff=java eol=lf
*.js text
*.json text eol=lf
*.jsp text eol=lf
*.jspf text eol=lf
*.jspx text eol=lf
*.properties text eol=lf
*.sh text eol=lf
*.tld text
*.txt text eol=lf
*.tag text
*.tagx text
*.xml text
*.yml text eol=lf

# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.class binary
*.dll binary
*.ear binary
*.gif binary
*.ico binary
*.jar binary
*.jpg binary
*.jpeg binary
*.png binary
*.so binary
*.war binary
37 changes: 37 additions & 0 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Java CI

on:
schedule:
- cron: "0 12 1 * *"
pull_request:
branches:
- master
- dev

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '11' ]
name: Java ${{ matrix.java }} setup

steps:
- uses: actions/checkout@v1
- name: Set up JDK
uses: actions/setup-java@v1

with:
java-version: ${{ matrix.java }}

- name: Build with Gradle
run: ./gradlew build jacocoTestReport
env:
API_KEY: ${{ secrets.API_KEY }}

- name: Analyze with SonarQube
run: ./gradlew sonarqube
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
API_KEY: ${{ secrets.API_KEY }}
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
.idea/
/.settings/
.idea
.idea/httpRequests
*.iml
.gradle
build
target/
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# java-etherscan-api

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

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

Expand All @@ -14,14 +12,14 @@ Library supports all available EtherScan *API* calls for all available *Ethereum
<dependency>
<groupId>com.github.goodforgod</groupId>
<artifactId>java-etherscan-api</artifactId>
<version>1.0.2</version>
<version>1.1.0</version>
</dependency>
```

**Gradle**
```groovy
dependencies {
compile 'com.github.goodforgod:java-etherscan-api:1.0.2'
compile 'com.github.goodforgod:java-etherscan-api:1.1.0'
}
```

Expand Down
135 changes: 135 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
plugins {
id 'jacoco'
id 'java-library'
id 'maven-publish'

id 'org.sonarqube' version '3.0'
id 'com.diffplug.gradle.spotless' version '4.4.0'
}

repositories {
mavenLocal()
mavenCentral()
jcenter()
}

group = groupId
version = artifactVersion

sourceCompatibility = 1.8
targetCompatibility = 1.8

spotless {
java {
encoding 'UTF-8'
removeUnusedImports()
eclipse().configFile "${projectDir}/config/codestyle.xml"
}
}

sonarqube {
properties {
property 'sonar.host.url', 'https://sonarcloud.io'
property 'sonar.organization', 'goodforgod'
property 'sonar.projectKey', 'GoodforGod_java-etherscan-api'
}
}

dependencies {
implementation 'org.jetbrains:annotations:20.1.0'
implementation 'com.google.code.gson:gson:2.8.6'

testImplementation 'junit:junit:4.13.1'
}

test {
failFast = true

useJUnit()
testLogging {
events "passed", "skipped", "failed"
exceptionFormat "full"
}
}

tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
options.incremental = true
options.fork = true
}

tasks.withType(Test) {
reports.html.enabled = false
reports.junitXml.enabled = false
}

java {
withJavadocJar()
withSourcesJar()
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java

pom {
name = 'Java Etherscan API'
url = 'https://github.com/GoodforGod/java-etherscan-api'
description = 'Library is a wrapper for EtherScan API.'

license {
name = 'MIT License'
url = 'https://github.com/GoodforGod/java-etherscan-api/blob/master/LICENSE'
distribution = 'repo'
}

developer {
id = 'GoodforGod'
name = 'Anton Kurako'
email = 'goodforgod.dev@gmail.com'
url = 'https://github.com/GoodforGod'
}

scm {
connection = 'scm:git:git://github.com/GoodforGod/java-etherscan-api.git'
developerConnection = 'scm:git:ssh://GoodforGod/java-etherscan-api.git'
url = 'https://github.com/GoodforGod/java-etherscan-api/tree/master'
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots/"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username System.getenv("OSS_USERNAME")
password System.getenv("OSS_PASSWORD")
}
}
}
}

check.dependsOn jacocoTestReport
jacocoTestReport {
reports {
xml.enabled true
html.destination file("${buildDir}/jacocoHtml")
}
}

if (project.hasProperty("signing.keyId")) {
apply plugin: 'signing'
signing {
sign publishing.publications.mavenJava
}
}

javadoc {
options.encoding = "UTF-8"
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
Loading