Android build fixes.

This commit is contained in:
Adrian Tiberius 2015-06-03 14:18:55 +02:00
parent 99b55f3353
commit ed94ea9914
3 changed files with 25 additions and 14 deletions

View File

@ -38,7 +38,14 @@ android {
dependencies {
apt 'com.google.dagger:dagger-compiler:2.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':ethereumj-core')
compile (project(':ethereumj-core')) {
exclude group: "org.apache.commons", module: "commons-pool2"
exclude group: "org.slf4j", module: "slf4j-log4j12"
exclude group: "org.hibernate", module: "hibernate-core"
exclude group: "org.hibernate", module: "hibernate-entitymanager"
exclude group: "redis.clients", module: "jedis"
}
compile "com.google.dagger:dagger:2.1-SNAPSHOT"
compile "com.j256.ormlite:ormlite-android:4.48"

View File

@ -1,5 +1,3 @@
//apply plugin: 'com.android.library'
//apply plugin: 'com.neenbedankt.android-apt'
buildscript {
repositories {
@ -12,7 +10,6 @@ buildscript {
dependencies {
classpath 'me.champeau.gradle:antlr4-gradle-plugin:0.1'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:3.0.1'
// classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
}
}
@ -51,7 +48,21 @@ antlr4 {
output = file("${generatedSrcDir}/org/ethereum/serpent")
}
if (isJavaProject(project)) {
compileJava.dependsOn antlr4
} else if (isAndroidProject(project)) {
preBuild.dependsOn antlr4
} else {
throw new GradleException('unknown plugin type')
}
public static boolean isJavaProject(Project project) {
project.plugins.findPlugin('java')
}
public static boolean isAndroidProject(Project project) {
project.plugins.findPlugin('com.android.application') || project.plugins.findPlugin('com.android.library')
}
ext {
@ -82,7 +93,6 @@ dependencies {
compile 'com.google.dagger:dagger-compiler:2.0'
compile 'com.google.dagger:dagger:2.0'
compile fileTree(include: ['*.jar'], dir: 'libs')
//provided 'javax.annotation:javax.annotation-api:1.2'
compile('io.netty:netty-all:4.0.28.Final') {
exclude group: 'commons-logging', module: 'commons-logging'
@ -110,15 +120,10 @@ dependencies {
compile 'org.apache.commons:commons-collections4:4.0'
compile "commons-codec:commons-codec:1.10"
compile 'org.hsqldb:hsqldb:1.8.0.10' // best performance - do not upgrade!
compile ("org.hibernate:hibernate-core:${hibernateVersion}") {
exclude group: 'commons-logging', module: 'commons-logging'
}
compile "org.hibernate:hibernate-core:${hibernateVersion}"
compile "org.hibernate:hibernate-entitymanager:${hibernateVersion}"
compile('redis.clients:jedis:2.6.0') {
exclude group: 'org.apache.commons', module: 'commons-pool2'
}
compile "redis.clients:jedis:2.6.0"
compile('com.googlecode.json-simple:json-simple:1.1.1') {
exclude group: 'junit', module: 'junit'
exclude group: 'xml-apis', module: 'xml-apis'

View File

@ -59,7 +59,6 @@ public class RedisConnectionImpl implements RedisConnection {
redisUri.getHost(),
redisUri.getPort(),
Protocol.DEFAULT_TIMEOUT);
return null;
}
@PreDestroy