mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-24 14:50:57 +01:00
Use the Gradle java-library plugin to make Guava an `api` dependency since Guava types are used in the bitcoinj public API. This allows us to remove explicit dependencies on Guava in the other modules.
71 lines
1.9 KiB
Groovy
71 lines
1.9 KiB
Groovy
plugins {
|
|
id 'java-library'
|
|
id 'com.google.protobuf'
|
|
id 'maven'
|
|
id 'eclipse'
|
|
}
|
|
|
|
version = '0.16-SNAPSHOT'
|
|
|
|
dependencies {
|
|
compile 'org.bouncycastle:bcprov-jdk15to18:1.64'
|
|
api 'com.google.guava:guava:28.2-android'
|
|
compile 'com.google.protobuf:protobuf-java:3.9.2'
|
|
implementation 'com.squareup.okhttp3:okhttp:3.12.8'
|
|
implementation 'org.slf4j:slf4j-api:1.7.30'
|
|
implementation 'net.jcip:jcip-annotations:1.0'
|
|
compileOnly 'org.fusesource.leveldbjni:leveldbjni-all:1.8'
|
|
testImplementation 'junit:junit:4.13'
|
|
testImplementation 'org.easymock:easymock:3.2'
|
|
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.5.2'
|
|
testImplementation 'org.slf4j:slf4j-jdk14:1.7.30'
|
|
testImplementation 'com.h2database:h2:1.3.167'
|
|
testImplementation 'org.fusesource.leveldbjni:leveldbjni-all:1.8'
|
|
testImplementation 'nl.jqno.equalsverifier:equalsverifier:2.5.2'
|
|
}
|
|
|
|
sourceCompatibility = 1.7
|
|
compileJava.options.encoding = 'UTF-8'
|
|
compileTestJava.options.encoding = 'UTF-8'
|
|
javadoc.options.encoding = 'UTF-8'
|
|
|
|
protobuf {
|
|
protoc {
|
|
artifact = 'com.google.protobuf:protoc:3.9.2'
|
|
}
|
|
generatedFilesBaseDir = new File(projectDir, '/src') // workaround for '$projectDir/src'
|
|
}
|
|
|
|
test {
|
|
exclude 'org/bitcoinj/core/PeerTest*'
|
|
exclude 'org/bitcoinj/core/TransactionBroadcastTest*'
|
|
exclude 'org/bitcoinj/net/discovery/DnsDiscoveryTest*'
|
|
testLogging {
|
|
events "failed"
|
|
exceptionFormat "full"
|
|
}
|
|
}
|
|
|
|
ext.moduleName = 'org.bitcoinj.core'
|
|
|
|
jar {
|
|
inputs.property("moduleName", moduleName)
|
|
manifest {
|
|
attributes 'Automatic-Module-Name': moduleName
|
|
}
|
|
}
|
|
|
|
task javadocJar(type: Jar, dependsOn: javadoc) {
|
|
classifier = 'javadoc'
|
|
from javadoc.destinationDir
|
|
}
|
|
|
|
task sourcesJar(type: Jar, dependsOn: classes) {
|
|
classifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
artifacts {
|
|
archives sourcesJar
|
|
archives javadocJar
|
|
}
|