135 lines
3.6 KiB
Groovy
135 lines
3.6 KiB
Groovy
|
|
buildscript {
|
|
repositories {
|
|
maven {
|
|
name 'JFrog OSS snapshot repo'
|
|
url 'https://oss.jfrog.org/oss-snapshot-local/'
|
|
}
|
|
jcenter()
|
|
}
|
|
dependencies {
|
|
classpath 'me.champeau.gradle:antlr4-gradle-plugin:0.1'
|
|
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:3.0.1'
|
|
}
|
|
}
|
|
|
|
plugins {
|
|
id 'application'
|
|
id 'jacoco'
|
|
//id 'com.github.johnrengelman.shadow' version '1.2.0'
|
|
id 'me.champeau.gradle.antlr4' version '0.1'
|
|
id 'com.github.kt3k.coveralls' version '2.0.1x'
|
|
id 'com.jfrog.bintray' version '1.0'
|
|
}
|
|
|
|
sourceCompatibility = 1.7
|
|
mainClassName = 'org.ethereum.Start'
|
|
|
|
configurations {
|
|
compile.extendsFrom antlr4
|
|
provided
|
|
|
|
}
|
|
|
|
repositories {
|
|
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
|
|
mavenCentral()
|
|
|
|
flatDir {
|
|
dirs "libs"
|
|
}
|
|
}
|
|
|
|
ext.generatedSrcDir = file('src/gen/java')
|
|
|
|
|
|
antlr4 {
|
|
extraArgs = ['-package', 'org.ethereum.serpent']
|
|
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 {
|
|
slf4jVersion = '1.7.7'
|
|
leveldbVersion = '0.7'
|
|
scastleVersion = '1.51.0.0'
|
|
log4jVersion = '1.2.17'
|
|
hibernateVersion = '4.3.10.Final'
|
|
junitVersion = '4.11'
|
|
}
|
|
|
|
sourceSets {
|
|
main {
|
|
java {
|
|
exclude '**/BlockStoreImpl.java'
|
|
exclude '**/CommonConfig.java'
|
|
exclude '**/DefaultConfig.java'
|
|
exclude '**/RemoteConfig.java'
|
|
exclude '**/EthereumFactory.java'
|
|
exclude '**/Start.java'
|
|
srcDirs += generatedSrcDir
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
compile 'com.google.dagger:dagger-compiler:2.0'
|
|
compile 'com.google.dagger:dagger:2.0'
|
|
compile fileTree(include: ['*.jar'], dir: 'libs')
|
|
|
|
compile('io.netty:netty-all:4.0.28.Final') {
|
|
exclude group: 'commons-logging', module: 'commons-logging'
|
|
}
|
|
compile "com.madgag.spongycastle:core:${scastleVersion}"
|
|
// for SHA3 and SECP256K1
|
|
compile "com.madgag.spongycastle:prov:${scastleVersion}"
|
|
// for SHA3 and SECP256K1
|
|
|
|
compile "org.iq80.leveldb:leveldb:${leveldbVersion}"
|
|
|
|
compile('com.cedarsoftware:java-util:1.8.0') {
|
|
exclude group: 'commons-logging', module: 'commons-logging'
|
|
} // for deep equals
|
|
|
|
//compile 'org.antlr:antlr4-runtime:4.5' // for serpent compilation
|
|
|
|
compile 'com.yuvalshavit:antlr-denter:1.1'
|
|
|
|
compile "org.slf4j:slf4j-log4j12:${slf4jVersion}"
|
|
|
|
compile 'org.codehaus.jackson:jackson-mapper-asl:1.9.13'
|
|
compile 'com.google.code.findbugs:jsr305:3.0.0'
|
|
compile 'com.fasterxml.jackson.core:jackson-databind:2.2.0'
|
|
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}"
|
|
compile "org.hibernate:hibernate-entitymanager:${hibernateVersion}"
|
|
|
|
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'
|
|
}
|
|
|
|
testCompile "junit:junit:${junitVersion}"
|
|
|
|
}
|