-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from GoodforGod/dev
[1.1.1]
- Loading branch information
Showing
24 changed files
with
217 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,57 @@ | ||
plugins { | ||
id 'jacoco' | ||
id 'java-library' | ||
id 'maven-publish' | ||
id "jacoco" | ||
id "java-library" | ||
id "maven-publish" | ||
|
||
id 'org.sonarqube' version '3.1.1' | ||
id 'com.diffplug.spotless' version '5.11.0' | ||
id "org.sonarqube" version "3.3" | ||
id "com.diffplug.spotless" version "5.14.3" | ||
} | ||
|
||
repositories { | ||
mavenLocal() | ||
mavenCentral() | ||
jcenter() | ||
} | ||
|
||
group = groupId | ||
version = artifactVersion | ||
|
||
sourceCompatibility = 1.8 | ||
targetCompatibility = 1.8 | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
|
||
spotless { | ||
java { | ||
encoding 'UTF-8' | ||
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' | ||
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' | ||
implementation "org.jetbrains:annotations:22.0.0" | ||
implementation "com.google.code.gson:gson:2.8.8" | ||
|
||
testImplementation 'junit:junit:4.13.1' | ||
testImplementation "junit:junit:4.13.1" | ||
} | ||
|
||
test { | ||
failFast = true | ||
|
||
useJUnit() | ||
testLogging { | ||
events "passed", "skipped", "failed" | ||
exceptionFormat "full" | ||
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() | ||
reports { | ||
html.enabled(false) | ||
junitXml.enabled(false) | ||
} | ||
} | ||
|
||
publishing { | ||
|
@@ -74,27 +60,27 @@ publishing { | |
from components.java | ||
|
||
pom { | ||
name = 'Java Etherscan API' | ||
url = 'https://github.com/GoodforGod/java-etherscan-api' | ||
description = 'Library is a wrapper for EtherScan API.' | ||
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' | ||
name = "MIT License" | ||
url = "https://github.com/GoodforGod/java-etherscan-api/blob/master/LICENSE" | ||
distribution = "repo" | ||
} | ||
|
||
developer { | ||
id = 'GoodforGod' | ||
name = 'Anton Kurako' | ||
email = '[email protected]' | ||
url = 'https://github.com/GoodforGod' | ||
id = "GoodforGod" | ||
name = "Anton Kurako" | ||
email = "[email protected]" | ||
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' | ||
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" | ||
} | ||
} | ||
} | ||
|
@@ -103,7 +89,7 @@ publishing { | |
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 | ||
url = version.endsWith("SNAPSHOT") ? snapshotsRepoUrl : releasesRepoUrl | ||
credentials { | ||
username System.getenv("OSS_USERNAME") | ||
password System.getenv("OSS_PASSWORD") | ||
|
@@ -112,6 +98,17 @@ publishing { | |
} | ||
} | ||
|
||
java { | ||
withJavadocJar() | ||
withSourcesJar() | ||
} | ||
|
||
tasks.withType(JavaCompile) { | ||
options.encoding("UTF-8") | ||
options.incremental(true) | ||
options.fork = true | ||
} | ||
|
||
check.dependsOn jacocoTestReport | ||
jacocoTestReport { | ||
reports { | ||
|
@@ -120,16 +117,16 @@ jacocoTestReport { | |
} | ||
} | ||
|
||
javadoc { | ||
options.encoding = "UTF-8" | ||
if (JavaVersion.current().isJava9Compatible()) { | ||
options.addBooleanOption("html5", true) | ||
} | ||
} | ||
|
||
if (project.hasProperty("signing.keyId")) { | ||
apply plugin: 'signing' | ||
apply plugin: "signing" | ||
signing { | ||
sign publishing.publications.mavenJava | ||
} | ||
} | ||
|
||
javadoc { | ||
options.encoding = "UTF-8" | ||
if (JavaVersion.current().isJava9Compatible()) { | ||
options.addBooleanOption('html5', true) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Oops, something went wrong.