test-support: add new module for test data and utilities

This commit is contained in:
Sean Gilligan 2024-09-01 10:19:44 -07:00 committed by Andreas Schildbach
parent 29b1f1a341
commit 5a852df6cc
4 changed files with 30 additions and 0 deletions

View File

@ -14,6 +14,8 @@ dependencies {
api 'com.google.protobuf:protobuf-javalite:4.27.3'
implementation 'org.slf4j:slf4j-api:2.0.13'
implementation 'net.jcip:jcip-annotations:1.0'
testImplementation project(':bitcoinj-test-support')
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.easymock:easymock:5.4.0'
testImplementation 'com.fasterxml.jackson.core:jackson-databind:2.17.2'

View File

@ -19,6 +19,9 @@ if (!JavaVersion.current().isJava11Compatible()) {
rootProject.name = 'bitcoinj-parent'
include 'test-support'
project(':test-support').name = 'bitcoinj-test-support'
include 'core'
project(':core').name = 'bitcoinj-core'

View File

@ -17,6 +17,9 @@ if (!JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
throw new GradleScriptException("bitcoinj build requires Java 17 or later", null)
}
include 'test-support'
project(':test-support').name = 'bitcoinj-test-support'
include 'core'
project(':core').name = 'bitcoinj-core'

22
test-support/build.gradle Normal file
View File

@ -0,0 +1,22 @@
plugins {
id 'java-library'
}
dependencies {
api project(':bitcoinj-core')
}
tasks.withType(JavaCompile) {
options.compilerArgs.addAll(['--release', '8'])
options.compilerArgs << '-Xlint:deprecation'
options.encoding = 'UTF-8'
}
ext.moduleName = 'org.bitcoinj.test-support'
jar {
inputs.property("moduleName", moduleName)
manifest {
attributes 'Automatic-Module-Name': moduleName
}
}