Permalink
Browse files

1. Merged master into web3j-modular.

2. Added Jacoco task for aggregating module coverage reports.
  • Loading branch information...
conor10 committed Sep 12, 2017
1 parent 362b032 commit 1c5de6cbdebd7bec8ed03713098b99ab21212966
@@ -16,7 +16,7 @@ cache:
# Don't run integrationTests as they require a live Ethereum client to be running
# Add --info to view details of test failures
script: ./gradlew --info check jacocoTestReport
script: ./gradlew --info check jacocoRootTestReport
# Upload code coverage metrics
after_success:
@@ -6,7 +6,6 @@ buildscript {
ext.jnr_unixsocketVersion = '0.15'
ext.okhttpVersion = '3.8.1'
ext.rxjavaVersion = '1.2.4'
ext.scryptVersion = '1.4.0'
ext.slf4jVersion = '1.7.25'
// test dependencies
@@ -30,22 +29,23 @@ plugins {
}
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'signing'
apply plugin: 'idea'
// should only be applied to the root project, see
// https://github.com/Codearte/gradle-nexus-staging-plugin#multi-project-build
apply plugin: 'io.codearte.nexus-staging'
apply plugin: 'jacoco'
allprojects {
sourceCompatibility = 1.8
targetCompatibility = 1.8
group 'org.web3j'
version '3.0.0-test'
version '3.0.0'
apply plugin: 'java'
apply plugin: 'jacoco'
apply plugin: 'checkstyle'
repositories {
@@ -68,13 +68,10 @@ allprojects {
reports {
xml.enabled true
}
}
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it,
exclude: ['org/web3j/abi/datatypes/generated/**'])
})
}
tasks.withType(Test) {
reports.html.destination = file("${reporting.baseDir}/${name}")
}
checkstyle {
@@ -212,8 +209,33 @@ configure(subprojects.findAll {it.name != 'integration-tests'}) {
}
}
tasks.withType(Test) {
reports.html.destination = file("${reporting.baseDir}/${name}")
task jacocoRootTestReport(type: org.gradle.testing.jacoco.tasks.JacocoReport) {
dependsOn = subprojects.test
additionalSourceDirs = files(subprojects.sourceSets.main.allSource.srcDirs)
sourceDirectories = files(subprojects.sourceSets.main.allSource.srcDirs)
classDirectories = files(subprojects.sourceSets.main.output)
executionData = files(subprojects.jacocoTestReport.executionData)
reports {
xml.enabled = true
}
onlyIf = {
true
}
doFirst {
executionData = files(executionData.findAll {
it.exists()
})
}
afterEvaluate {
classDirectories = files(classDirectories.files.collect {
fileTree(dir: it,
exclude: ['org/web3j/abi/datatypes/generated/**'])
})
}
}
signing {
@@ -3,7 +3,6 @@ import java.text.SimpleDateFormat
dependencies {
compile "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion",
"com.github.jnr:jnr-unixsocket:$jnr_unixsocketVersion",
"com.lambdaworks:scrypt:$scryptVersion",
"com.squareup:javapoet:$javapoetVersion",
"com.squareup.okhttp3:okhttp:$okhttpVersion",
"com.squareup.okhttp3:logging-interceptor:$okhttpVersion",
@@ -1,6 +1,5 @@
package org.web3j.crypto;
import java.security.GeneralSecurityException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
@@ -30,9 +29,9 @@
* <a href="https://github.com/ethereum/go-ethereum/blob/master/accounts/key_store_passphrase.go">
* Go Ethereum client implementation</a>.</p>
*
* <p><strong>Note:</strong> we don't use the Bouncy Castle Scrypt implementation
* {@link org.bouncycastle.crypto.generators.SCrypt}, as the following parameter assertion results
* in failure of the Ethereum reference
* <p><strong>Note:</strong> the Bouncy Castle Scrypt implementation
* {@link org.bouncycastle.crypto.generators.SCrypt}, fails to comply with the following
* Ethereum reference
* <a href="https://github.com/ethereum/wiki/wiki/Web3-Secret-Storage-Definition#scrypt">
* Scrypt test vector</a>:</p>
*
@@ -1,9 +1,12 @@
package org.web3j.protocol.core.filters;
import java.io.IOException;
import java.math.BigInteger;
import java.util.List;
import java.util.Optional;
import org.web3j.protocol.Web3j;
import org.web3j.protocol.core.Request;
import org.web3j.protocol.core.methods.response.EthFilter;
import org.web3j.protocol.core.methods.response.EthLog;
@@ -33,5 +36,18 @@ void process(List<EthLog.LogResult> logResults) {
}
}
}
/**
* Since the block filter does not support historic filters, the filterId is ignored
* and an empty optional is returned
* @param filterId
* Id of the filter for which the historic log should be retrieved
* @return
* Optional.empty()
*/
@Override
protected Optional<Request<?, EthLog>> getFilterLogs(BigInteger filterId) {
return Optional.empty();
}
}
@@ -1,9 +1,12 @@
package org.web3j.protocol.core.filters;
import java.io.IOException;
import java.math.BigInteger;
import java.util.List;
import java.util.Optional;
import org.web3j.protocol.Web3j;
import org.web3j.protocol.core.Request;
import org.web3j.protocol.core.methods.response.EthFilter;
import org.web3j.protocol.core.methods.response.EthLog;
import org.web3j.protocol.core.methods.response.Log;
@@ -22,6 +25,7 @@ public LogFilter(
this.ethFilter = ethFilter;
}
@Override
EthFilter sendRequest() throws IOException {
return web3j.ethNewFilter(ethFilter).send();
@@ -39,4 +43,9 @@ void process(List<EthLog.LogResult> logResults) {
}
}
}
@Override
protected Optional<Request<?, EthLog>> getFilterLogs(BigInteger filterId) {
return Optional.empty();
}
}
@@ -1,9 +1,12 @@
package org.web3j.protocol.core.filters;
import java.io.IOException;
import java.math.BigInteger;
import java.util.List;
import java.util.Optional;
import org.web3j.protocol.Web3j;
import org.web3j.protocol.core.Request;
import org.web3j.protocol.core.methods.response.EthFilter;
import org.web3j.protocol.core.methods.response.EthLog;
@@ -33,5 +36,18 @@ void process(List<EthLog.LogResult> logResults) {
}
}
}
/**
* Since the pending transaction filter does not support historic filters,
* the filterId is ignored and an empty optional is returned
* @param filterId
* Id of the filter for which the historic log should be retrieved
* @return
* Optional.empty()
*/
@Override
protected Optional<Request<?, EthLog>> getFilterLogs(BigInteger filterId) {
return Optional.empty();
}
}
@@ -54,9 +54,9 @@
# built documents.
#
# The short X.Y version.
version = u'2.3'
version = u'3.0'
# The full version, including alpha/beta/rc tags.
release = u'2.3.1'
release = u'3.0.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -13,7 +13,7 @@ Java 8:
<dependency>
<groupId>org.web3j</groupId>
<artifactId>core</artifactId>
<version>2.3.1</version>
<version>3.0.0</version>
</dependency>
Android:
@@ -23,7 +23,7 @@ Android:
<dependency>
<groupId>org.web3j</groupId>
<artifactId>core-android</artifactId>
<version>2.2.1</version>
<version>3.0.0</version>
</dependency>
Gradle
@@ -33,13 +33,13 @@ Java 8:
.. code-block:: groovy
compile ('org.web3j:core:2.3.1')
compile ('org.web3j:core:3.0.0')
Android:
.. code-block:: groovy
compile ('org.web3j:core-android:2.2.1')
compile ('org.web3j:core-android:3.0.0')
Start a client

0 comments on commit 1c5de6c

Please sign in to comment.