corda/core/build.gradle

175 lines
5.2 KiB
Groovy
Raw Normal View History

apply plugin: 'kotlin'
Vault Query Service JPA implementation (#840) * Vault Query Service API implementation using JPA Hibernate Added queryBy(QueryCriteria) Vault API and Junit tests. Minor cosmetic API changes following rebase. Fixes following rebase from master Upgraded to requery 1.3.1 WIP - removed 'latestOnly' from LinearStateQueryCriteria WIP - CommercialSchemas V2, V3, V4 testing WIP - sort out generics handling. WIP - most general queries completed. WIP - join queries, contractStateType derivation WIP - refactoring Requery WIP - refactored VaultService to extract a VaultQueryService interface (and associated Requery implementation). WIP - HibernateVaultQuery implementation WIP - Re-structured all Schema definitions (requery/jpa) and make Hibernate Config reusable. WIP - Multi-version schema testing, hibernate query testing. WIP - Custom Criteria and Fungible Criteria impl & testing. WIP - Kotlin Comparable Generics error WIP - Party queries all working now WIP - All VaultQueryTests now working (refactored for AND / OR composition) WIP - added schema registration in CordaPluginRegistry to enable custom vault queries on arbitrary schemas. WIP - added new default Sort NULL order to be NONE + added lots more tests for Logical Operator testing. Mostly identity fixes following rebase from master. Exception handling and public API cleanup in prep for PR. Additional tests for Logical Operators; additional tests for NULLS sort ordering; additional logging; Additional parser to handle Nullable attribute values; added Unary and Collection logical expression handlers Lots of cleanup: participants; trackBy interfaces; additional fungible tests; parser cleanup and improved support for Java Removed all traces of Requery implementation. Further minor cleanup and Junit test fix. Final identity and schema related identity clean-up. Revert unrelated changes. PR review updates: blank lines, isRelevant. Fixed wiring of updatesPublisher for dynamic trackBy queries. PR review changes: multi-versioned schema samples and associated dummy contracts moved to test packages. Fixed problem with sorted queries (not specifying any filterable criteria). PR review: minor updates to address RP comments. Typesafe custom query criteria Cleanup: remove redundant tests. Further clean-up and make all Java test work successfully. Remove debugging print statements. Rebased from master - changes required due to DealState module change. fixed broken assertion caused by DealState ordering change (different package) Fixed transaction demarcation issue causing "java.lang.IllegalStateException: Was not expecting to find existing database transaction on current strand" trackBy() now filters on ContractType and StateStatus (CONSUMED, UNCONSUMED, ALL) Added tests to exercise RPCOps trackBy and queryBy (RPC smoke test and CordaRPCOps) Added additional @CordaSerializable annotations. Updated documentation and referenced sample code. Added deprecation annotations. Re-added missing deprecation annotation. Hibernate debug logging is now configurable and disabled by default. Introduced common Sort attributes based on the node schemas. Completely removed NULL_HANDLING sort parameter as this is not supported in JPA. Revisited and fixed usage of @CordaSerializable. * Minor fix following rebase from master. * Remove blank line as per RP PR feedback request. * Minor Java documentation and example clean-up. * Disable BFT Notary Service tests.
2017-06-22 09:35:49 +00:00
apply plugin: 'kotlin-jpa'
apply plugin: 'net.corda.plugins.quasar-utils'
apply plugin: 'net.corda.plugins.publish-utils'
apply plugin: 'net.corda.plugins.api-scanner'
apply plugin: 'com.jfrog.artifactory'
description 'Corda core'
evaluationDependsOn(':node:capsule')
configurations {
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
smokeTestCompile.extendsFrom compile
smokeTestRuntime.extendsFrom runtime
}
sourceSets {
integrationTest {
kotlin {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integration-test/kotlin')
}
java {
compileClasspath += main.output + test.output
runtimeClasspath += main.output + test.output
srcDir file('src/integration-test/java')
}
}
smokeTest {
kotlin {
// We must NOT have any Node code on the classpath, so do NOT
// include the test or integrationTest dependencies here.
compileClasspath += main.output
runtimeClasspath += main.output
srcDir file('src/smoke-test/kotlin')
}
java {
compileClasspath += main.output
runtimeClasspath += main.output
srcDir file('src/smoke-test/java')
}
}
}
processSmokeTestResources {
// Bring in the fully built corda.jar for use by NodeFactory in the smoke tests
from(project(':node:capsule').tasks['buildCordaJAR']) {
rename 'corda-(.*)', 'corda.jar'
}
}
buildscript {
repositories {
mavenCentral()
}
}
dependencies {
testCompile "junit:junit:$junit_version"
testCompile "commons-fileupload:commons-fileupload:$fileupload_version"
// Guava: Google test library (collections test suite)
testCompile "com.google.guava:guava-testlib:$guava_version"
// Bring in the MockNode infrastructure for writing protocol unit tests.
testCompile project(":node")
testCompile project(":node-driver")
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version"
// Quasar, for suspendable fibres.
compileOnly "$quasar_group:quasar-core:$quasar_version:jdk8"
// Thread safety annotations
compile "com.google.code.findbugs:jsr305:$jsr305_version"
// Log4J: logging framework (ONLY explicitly referenced by net.corda.core.utilities.Logging.kt)
compile "org.apache.logging.log4j:log4j-core:${log4j_version}"
// SLF4J: commons-logging bindings for a SLF4J back end
compile "org.slf4j:jcl-over-slf4j:$slf4j_version"
compile "org.slf4j:slf4j-api:$slf4j_version"
// AssertJ: for fluent assertions for testing
2016-07-04 14:34:45 +00:00
testCompile "org.assertj:assertj-core:${assertj_version}"
// Guava: Google utilities library.
testCompile "com.google.guava:guava:$guava_version"
// Smoke tests do NOT have any Node code on the classpath!
smokeTestCompile project(':smoke-test-utils')
smokeTestCompile "org.assertj:assertj-core:${assertj_version}"
smokeTestCompile "junit:junit:$junit_version"
// RxJava: observable streams of events.
compile "io.reactivex:rxjava:$rxjava_version"
// Apache JEXL: An embeddable expression evaluation library.
// This may be temporary until we experiment with other ways to do on-the-fly contract specialisation via an API.
compile "org.apache.commons:commons-jexl3:3.0"
compile 'commons-lang:commons-lang:2.6'
// Java ed25519 implementation. See https://github.com/str4d/ed25519-java/
compile "net.i2p.crypto:eddsa:$eddsa_version"
// Bouncy castle support needed for X509 certificate manipulation
compile "org.bouncycastle:bcprov-jdk15on:${bouncycastle_version}"
compile "org.bouncycastle:bcpkix-jdk15on:${bouncycastle_version}"
// JPA 2.1 annotations.
compile "org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final"
// required to use @Type annotation
compile "org.hibernate:hibernate-core:$hibernate_version"
}
// TODO Consider moving it to quasar-utils in the future (introduced with PR-1388)
task copyQuasarJar(type: Copy) {
from configurations.quasar
into "$project.rootProject.projectDir/lib"
rename { filename -> "quasar.jar"}
}
jar.finalizedBy(copyQuasarJar)
configurations {
testArtifacts.extendsFrom testRuntime
}
task testJar(type: Jar) {
classifier "tests"
from sourceSets.test.output
}
task integrationTest(type: Test) {
testClassesDirs = sourceSets.integrationTest.output.classesDirs
classpath = sourceSets.integrationTest.runtimeClasspath
}
task smokeTestJar(type: Jar) {
classifier 'smokeTests'
from sourceSets.smokeTest.output
}
task smokeTest(type: Test) {
dependsOn smokeTestJar
testClassesDirs = sourceSets.smokeTest.output.classesDirs
classpath = sourceSets.smokeTest.runtimeClasspath
}
artifacts {
testArtifacts testJar
}
jar {
baseName 'corda-core'
}
scanApi {
excludeClasses = [
// Kotlin should probably have declared this class as "synthetic".
"net.corda.core.Utils\$toFuture\$1\$subscription\$1"
]
}
publish {
name jar.baseName
}