mirror of
https://github.com/status-im/ethereumj-personal.git
synced 2025-02-17 14:16:23 +00:00
Fix last unit test error.
Fix dagger2 gradle for java app. Deleted extra files.
This commit is contained in:
parent
ed94ea9914
commit
01ad7b12e8
@ -10,13 +10,16 @@ buildscript {
|
|||||||
dependencies {
|
dependencies {
|
||||||
classpath 'me.champeau.gradle:antlr4-gradle-plugin:0.1'
|
classpath 'me.champeau.gradle:antlr4-gradle-plugin:0.1'
|
||||||
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:3.0.1'
|
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:3.0.1'
|
||||||
|
classpath "gradle.plugin.com.ewerk.gradle.plugins:dagger-plugin:1.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
|
id 'java'
|
||||||
|
id "com.ewerk.gradle.plugins.dagger" version "1.0.0"
|
||||||
id 'application'
|
id 'application'
|
||||||
id 'jacoco'
|
id 'jacoco'
|
||||||
//id 'com.github.johnrengelman.shadow' version '1.2.0'
|
id 'com.github.johnrengelman.shadow' version '1.2.1'
|
||||||
id 'me.champeau.gradle.antlr4' version '0.1'
|
id 'me.champeau.gradle.antlr4' version '0.1'
|
||||||
id 'com.github.kt3k.coveralls' version '2.0.1x'
|
id 'com.github.kt3k.coveralls' version '2.0.1x'
|
||||||
id 'com.jfrog.bintray' version '1.0'
|
id 'com.jfrog.bintray' version '1.0'
|
||||||
@ -28,11 +31,10 @@ mainClassName = 'org.ethereum.Start'
|
|||||||
configurations {
|
configurations {
|
||||||
compile.extendsFrom antlr4
|
compile.extendsFrom antlr4
|
||||||
provided
|
provided
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
|
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
|
||||||
flatDir {
|
flatDir {
|
||||||
@ -84,14 +86,14 @@ sourceSets {
|
|||||||
exclude '**/EthereumFactory.java'
|
exclude '**/EthereumFactory.java'
|
||||||
exclude '**/Start.java'
|
exclude '**/Start.java'
|
||||||
srcDirs += generatedSrcDir
|
srcDirs += generatedSrcDir
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'com.google.dagger:dagger-compiler:2.0'
|
|
||||||
compile 'com.google.dagger:dagger:2.0'
|
compile 'com.google.dagger:dagger:2.0'
|
||||||
|
compile 'com.google.dagger:dagger-compiler:2.0'
|
||||||
|
|
||||||
compile fileTree(include: ['*.jar'], dir: 'libs')
|
compile fileTree(include: ['*.jar'], dir: 'libs')
|
||||||
|
|
||||||
compile('io.netty:netty-all:4.0.28.Final') {
|
compile('io.netty:netty-all:4.0.28.Final') {
|
||||||
@ -130,5 +132,6 @@ dependencies {
|
|||||||
}
|
}
|
||||||
|
|
||||||
testCompile "junit:junit:${junitVersion}"
|
testCompile "junit:junit:${junitVersion}"
|
||||||
|
testCompile 'com.google.dagger:dagger:2.0'
|
||||||
|
testCompile 'com.google.dagger:dagger-compiler:2.0'
|
||||||
}
|
}
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
package="org.ethereum" >
|
|
||||||
|
|
||||||
<application android:allowBackup="true" android:label="@string/app_name">
|
|
||||||
|
|
||||||
</application>
|
|
||||||
|
|
||||||
</manifest>
|
|
@ -1,3 +0,0 @@
|
|||||||
<resources>
|
|
||||||
<string name="app_name">ethereum-core</string>
|
|
||||||
</resources>
|
|
@ -1,133 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xmlns:context="http://www.springframework.org/schema/context"
|
|
||||||
xmlns:p="http://www.springframework.org/schema/p"
|
|
||||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
|
||||||
xmlns:util="http://www.springframework.org/schema/util"
|
|
||||||
xsi:schemaLocation="
|
|
||||||
http://www.springframework.org/schema/beans
|
|
||||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
|
||||||
http://www.springframework.org/schema/util
|
|
||||||
http://www.springframework.org/schema/util/spring-util.xsd
|
|
||||||
http://www.springframework.org/schema/aop
|
|
||||||
http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
|
|
||||||
http://www.springframework.org/schema/context
|
|
||||||
http://www.springframework.org/schema/context/spring-context-3.1.xsd">
|
|
||||||
|
|
||||||
|
|
||||||
<context:annotation-config />
|
|
||||||
|
|
||||||
<bean id="adminInfo" class="org.ethereum.manager.AdminInfo" init-method="init">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="detailsDS" class="org.ethereum.datasource.LevelDbDataSource">
|
|
||||||
<property name="context" ref="androidContext" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="stateDS" class="org.ethereum.datasource.LevelDbDataSource">
|
|
||||||
<property name="context" ref="androidContext" />
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="repository" class="org.ethereum.db.RepositoryImpl">
|
|
||||||
<constructor-arg>
|
|
||||||
<ref bean="detailsDS" />
|
|
||||||
</constructor-arg>
|
|
||||||
<constructor-arg>
|
|
||||||
<ref bean="stateDS" />
|
|
||||||
</constructor-arg>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="wallet" class="org.ethereum.core.Wallet" depends-on="worldManager">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="PeerClient" class="org.ethereum.net.client.PeerClient" scope="prototype">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="peerDiscovery" class="org.ethereum.net.peerdiscovery.PeerDiscovery">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="channelManager" class="org.ethereum.net.server.ChannelManager" init-method="init">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="cliInterface" class="org.ethereum.cli.CLIInterface">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="account" class="org.ethereum.core.Account" scope="prototype">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="blockchain" class="org.ethereum.core.BlockchainImpl">
|
|
||||||
<constructor-arg>
|
|
||||||
<set value-type="org.ethereum.core.Transaction">
|
|
||||||
</set>
|
|
||||||
</constructor-arg>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="redisConnectionImpl" class="org.ethereum.datasource.redis.RedisConnectionImpl" init-method="tryConnect" destroy-method="destroy">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="worldManager" class="org.ethereum.manager.WorldManager" init-method="init" destroy-method="close">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="ethereumImpl" class="org.ethereum.facade.EthereumImpl" init-method="init">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="blockQueue" class="org.ethereum.net.BlockQueue">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="messageQueue" class="org.ethereum.net.MessageQueue" scope="prototype">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="ethHandler" class="org.ethereum.net.eth.EthHandler" scope="prototype">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="p2pHandler" class="org.ethereum.net.p2p.P2pHandler" scope="prototype">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="discoveryChannel" class="org.ethereum.net.peerdiscovery.DiscoveryChannel" scope="prototype">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="workerThread" class="org.ethereum.net.peerdiscovery.WorkerThread" scope="prototype">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="channel" class="org.ethereum.net.server.Channel" scope="prototype">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="ethereumChannelInitializer" class="org.ethereum.net.server.EthereumChannelInitializer" scope="prototype">
|
|
||||||
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="peerServer" class="org.ethereum.net.server.PeerServer">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="shhHandler" class="org.ethereum.net.shh.ShhHandler" scope="prototype">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="messageCodec" class="org.ethereum.net.wire.MessageCodec" scope="prototype">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="programInvokeFactory" class="org.ethereum.vm.ProgramInvokeFactoryImpl">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="listener" class="org.ethereum.listener.CompositeEthereumListener">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="blockLoader" class="org.ethereum.manager.BlockLoader">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="blockStore" class="org.ethereum.db.InMemoryBlockStore">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="dataSource" class="org.robospring.ormlite.ios.IosJdbcSqliteDatabaseType">
|
|
||||||
<!--
|
|
||||||
<property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
|
|
||||||
<property name="url" value="jdbc:hsqldb:file:./${database.dir}/blockchain/blockchain.db;create=${database.reset};hsqldb.default_table_type=cached"/>
|
|
||||||
<property name="username" value="sa"/>
|
|
||||||
-->
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- define your beans here, use 'androidContext' to get a reference to your app's application context -->
|
|
||||||
|
|
||||||
</beans>
|
|
@ -4,6 +4,7 @@ package org.ethereum.core;
|
|||||||
import org.ethereum.config.SystemProperties;
|
import org.ethereum.config.SystemProperties;
|
||||||
import org.ethereum.db.BlockStore;
|
import org.ethereum.db.BlockStore;
|
||||||
import org.ethereum.db.InMemoryBlockStore;
|
import org.ethereum.db.InMemoryBlockStore;
|
||||||
|
import org.ethereum.di.components.TestEthereumComponent;
|
||||||
import org.ethereum.di.modules.TestEthereumModule;
|
import org.ethereum.di.modules.TestEthereumModule;
|
||||||
import org.ethereum.di.components.DaggerTestEthereumComponent;
|
import org.ethereum.di.components.DaggerTestEthereumComponent;
|
||||||
import org.ethereum.facade.Ethereum;
|
import org.ethereum.facade.Ethereum;
|
||||||
@ -55,9 +56,12 @@ public class ImportTest {
|
|||||||
|
|
||||||
@Before
|
@Before
|
||||||
public void setup() {
|
public void setup() {
|
||||||
worldManager = DaggerTestEthereumComponent.builder()
|
TestEthereumComponent component = DaggerTestEthereumComponent.builder()
|
||||||
.testEthereumModule(new TestEthereumModule())
|
.testEthereumModule(new TestEthereumModule())
|
||||||
.build().worldManager();
|
.build();
|
||||||
|
worldManager = component.worldManager();
|
||||||
|
// TODO: load blockchain, otherwise bestblock error occurs (why error does not occur in develop branch without this ??)
|
||||||
|
worldManager.loadBlockchain();
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
|
Loading…
x
Reference in New Issue
Block a user