corda/serialization-djvm/build.gradle

78 lines
2.4 KiB
Groovy
Raw Normal View History

import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import static org.gradle.api.JavaVersion.VERSION_1_8
CORDA-2876: Integrate the DJVM with the Corda Node. (#5633) * * CORDA-2876: Migrate DJVM serialization modules into Corda. * Pre-generate Corda classes for DJVM sandbox when node boots in production mode. * Ensure that all DJVM test contract CorDapps are signed. * Test examining attachments within DJVM sandbox. * Test Contract.verify() using cryptographic verify function. * Add test cases for more non-determinism in Contract.verify(). * Update node-driver to support testing nodes with DJVM support. * Modify Node to allow alternative DJVM configurations for testing. * Refactor DeterministicVerifierFactoryService for default use-case. * Small whitespace and code-style refactors. * Create and activate a DJVM execution profile for the Node. * Revert making Verifier implement AutoCloseable. * Allow the node to cache sandboxed Corda byte-code for reuse. * Use updated Quasar agent that knows not to touch DJVM classloaders. * Fix Quasar's package exclusions globs for DJVM. * Deserialise LedgerTransaction into the sandbox for Contract.verify(). * Add the DJVM's serialisation modules to the Corda node. * Update the node for the latest DJVM API, and preserve the ConstructorForDeserialization annotation on user contract classes. * Add corda-dev to repositories while DJVM is SNAPSHOT. * Migrate DJVM specialisation into AbstractNode's ServiceHubInternalImpl. * Exclude sandbox.** and shaded djvm.** classes from Quasar agent. * Add the corda-dev repository to :node for the deterministic runtime. * Turn Verifier into an abstract base class that is specialised by BasicVerifier and DeterministicVerifier. * Add the Corda deterministic libraries to the Node, and split the DJVM sandbox across two SandboxClassLoader instances. * Add DJVM to contract verification path inside Corda Node. * Minor lambda simplifications and removing unused import. * CORDA-2871: Remove @CordaSerializable from LedgerTransaction. * CORDA-2871: Add a callback to ServicesForResolution to allow the Node to modify a LedgerTransaction object. * CORDA-2871: Refactor the contract verification code into a separate class, and allow LedgerTransaction to choose different Verifier objects. * Update DJVM to use Corda 4.4-SNAPSHOT. (#95) * CORDA-3330: Allow DJVM to preload / pregenerate classes from selected jars. (#92) * Add support for SourceClassLoader.getResources() to DJVM. * Allow a SandboxConfiguration to preload sandbox byte-code for all classes inside jars containing META-INF/DJVM-preload. * CORDA-3309: Remove explicit try-catch in favour of UncaughtExceptionHandler. (#91) * CORDA-3309: Install UncaughtExceptionHandler for DJVM tasks. (#88) * Fix tests broken by Windows line endings. (#82) * CORDA-3292: Reimplement ExecutionProfile as a data class. (#80) * CORDA-2877: Refactor how we create child SandboxConfiguration objects. (#76) * CORDA-2877: Load bytecode from a persistent cache to prevent repeated rewriting. (#75) * Refactor byte-code cache to SandboxConfiguration instead of AnalysisConfiguration. We cannot "mix and match" byte-code generated by different sets of rules. * CORDA-3137: Enhance annotation handling so that we can allow some annotations to be mapped into the sandbox without also needing to be stitched. (#72) * CORDA-2871: Minor cosmetic fixes. (#69) * CORDA-3218: Align DJVM with internal Corda Serialisation API. (#68) * Ensure we get the latest SNAPSHOT of the serialisation code. * CORDA-2871: Refactor SourceClassLoader to define source classes. (#66) * Rewrite SourceClassLoader to support parent/child relationships. * Revert catching TypNotPresebtException - it was a symptom of a bigger problem. * Remove AutoCloseable from AnalysisConfiguration and SourceClassLoader. * SourceClassLoader.getResource() must delegate to its parent first. * CORDA-2871: Ensure ClassLoader.loadClass() throws ClassNotFoundException for all cases where the class cannot be found. (#64) * CORDA-2871: Modify sandbox tasks to implement both java.Function and sandbox.Function (#62) * Make TaskExecutors implement BiFunction to make them composable. * Create ImportTask to wrap a java.Function inside a sandbox.Function. * Add createExecutor() and createRawExecutor() APIs to SandboxClassLoader. * Update serialization to use SandboxClassLoader.toSandboxClass(). * Remove a layer of lambdas from the serialisation code. * Update SandboxExecutor and SandboxRawExecutor. * Rename Executor to TaskFactory. * Rename dangling executor -> taskFactory. * CORDA-2871: Sanity fixes! (#63) * Improve message for SandboxClassLoadingException. * Fix serialisation API for using sandboxed environment. * CORDA-3174: Extend serialisation to include InputStream and OpaqueBytesSubSequence. (#60) * Update DJVM Example project for serialisation. * Add serializers for InputStream and OpaqueBytesSubSequence. * Support ZIP Inflater and CRC32 inside the sandbox. * Allow the DJVM to wrap java.io.InputStream as sandbox.java.io.InputStream. * Configure tests also to preserve @DeprecatedConstructorForDeserialization. * CORDA-3174: Implement Corda serialization modules. (#59) * Create DJVM serialization modules. * Create test cases for Array<T>, List<T> and List<Array<T>>. * Refactor SandboxPrimiveSerializer for all primitive types. * Implement SandboxCollectionSerializer to support Collection types. * Implement SandboxMapSerializer to support Map types. * Attempt to fix infinite loop when computing Collection and Map fingerprints. * Apply special handling when deserialising sandbox.java.lang.Character. * Remap Java primitive types to sandbox Java object types to deter evolution. * Use Class.getPackage().getName() to determine sandbox package name. * Implement SandboxEnumSerializer to support Enum types. * Implement SandboxPublicKeySerializer to support Java security keys. * Add serialization projects to the composite example project. * Implement serializers for BigInteger, BigDecimal, Currency and StringBuffer. * Test that deserialising does not instantiate the untrusted user classes. * Implement serializers for java.time.* types. * Add serialiser for BitSet - currently disabled until BitSet itself is supported. * Add serialisers for EnumSet and Class. * Include support for EnumMap in the SandboxMapSerializer. * Ensure the DJVM Example project's tests preserve @CordaSerializable. * Add support for UUID as a primitive type. * Use common abortReadOnly() method for declaring serialization as unsupported. * Streamline the API for deserialising into the sandbox. * Add preliminary support for deserialising X.509 certificates. * Implement serializer for java.util.Optional. * Refactor configuration of the sandbox serialization scheme. * Add tests for deserialising arrays of basic types. * Include method annotations in annotation stitching. This ensures that `@ConstructorForDeserialization` is not dropped. * Enable test for SandboxBitSetSerializer. * Enable tests for X.509 serializers. * Implement serializers for ProtonJ primitive types. * Serialize java.util.Date as a primitive type. * Add the bintray Gradle plugin to the serialisation modules. * Do not publish serialisation modules - they will become part of Corda itself. * CORDA-2876: Only apply DJVM sources to Node Driver when devMode=true. * Resolve DeteKT warnings. * Require Node's JVM to set -Dnet.corda.djvm=true in order to enable DJVM. * Enable DJVM for DemoBench nodes. * Disable Quasar instrumentation verification for DemoBench nodes. * Upgrade to DJVM 1.0-RC01. * Try to modify DriverParameters in a more "ABI friendly" way. * Refactor and simplify sandbox deserialisation of primitive objects. * Review fixes. * Update EvolutionSerializerFactory to handle sandboxed primitive boxed types.
2019-11-05 13:44:18 +00:00
plugins {
id 'org.jetbrains.kotlin.jvm'
id 'net.corda.plugins.publish-utils'
id 'com.jfrog.artifactory'
id 'java-library'
id 'idea'
}
// The DJVM only supports Java 8 byte-code, so the tests must
// be compiled for Java 8. The main artifact is only compiled
// for Java 8 because it belongs to "Open Core".
apply from: "${rootProject.projectDir}/java8.gradle"
CORDA-2876: Integrate the DJVM with the Corda Node. (#5633) * * CORDA-2876: Migrate DJVM serialization modules into Corda. * Pre-generate Corda classes for DJVM sandbox when node boots in production mode. * Ensure that all DJVM test contract CorDapps are signed. * Test examining attachments within DJVM sandbox. * Test Contract.verify() using cryptographic verify function. * Add test cases for more non-determinism in Contract.verify(). * Update node-driver to support testing nodes with DJVM support. * Modify Node to allow alternative DJVM configurations for testing. * Refactor DeterministicVerifierFactoryService for default use-case. * Small whitespace and code-style refactors. * Create and activate a DJVM execution profile for the Node. * Revert making Verifier implement AutoCloseable. * Allow the node to cache sandboxed Corda byte-code for reuse. * Use updated Quasar agent that knows not to touch DJVM classloaders. * Fix Quasar's package exclusions globs for DJVM. * Deserialise LedgerTransaction into the sandbox for Contract.verify(). * Add the DJVM's serialisation modules to the Corda node. * Update the node for the latest DJVM API, and preserve the ConstructorForDeserialization annotation on user contract classes. * Add corda-dev to repositories while DJVM is SNAPSHOT. * Migrate DJVM specialisation into AbstractNode's ServiceHubInternalImpl. * Exclude sandbox.** and shaded djvm.** classes from Quasar agent. * Add the corda-dev repository to :node for the deterministic runtime. * Turn Verifier into an abstract base class that is specialised by BasicVerifier and DeterministicVerifier. * Add the Corda deterministic libraries to the Node, and split the DJVM sandbox across two SandboxClassLoader instances. * Add DJVM to contract verification path inside Corda Node. * Minor lambda simplifications and removing unused import. * CORDA-2871: Remove @CordaSerializable from LedgerTransaction. * CORDA-2871: Add a callback to ServicesForResolution to allow the Node to modify a LedgerTransaction object. * CORDA-2871: Refactor the contract verification code into a separate class, and allow LedgerTransaction to choose different Verifier objects. * Update DJVM to use Corda 4.4-SNAPSHOT. (#95) * CORDA-3330: Allow DJVM to preload / pregenerate classes from selected jars. (#92) * Add support for SourceClassLoader.getResources() to DJVM. * Allow a SandboxConfiguration to preload sandbox byte-code for all classes inside jars containing META-INF/DJVM-preload. * CORDA-3309: Remove explicit try-catch in favour of UncaughtExceptionHandler. (#91) * CORDA-3309: Install UncaughtExceptionHandler for DJVM tasks. (#88) * Fix tests broken by Windows line endings. (#82) * CORDA-3292: Reimplement ExecutionProfile as a data class. (#80) * CORDA-2877: Refactor how we create child SandboxConfiguration objects. (#76) * CORDA-2877: Load bytecode from a persistent cache to prevent repeated rewriting. (#75) * Refactor byte-code cache to SandboxConfiguration instead of AnalysisConfiguration. We cannot "mix and match" byte-code generated by different sets of rules. * CORDA-3137: Enhance annotation handling so that we can allow some annotations to be mapped into the sandbox without also needing to be stitched. (#72) * CORDA-2871: Minor cosmetic fixes. (#69) * CORDA-3218: Align DJVM with internal Corda Serialisation API. (#68) * Ensure we get the latest SNAPSHOT of the serialisation code. * CORDA-2871: Refactor SourceClassLoader to define source classes. (#66) * Rewrite SourceClassLoader to support parent/child relationships. * Revert catching TypNotPresebtException - it was a symptom of a bigger problem. * Remove AutoCloseable from AnalysisConfiguration and SourceClassLoader. * SourceClassLoader.getResource() must delegate to its parent first. * CORDA-2871: Ensure ClassLoader.loadClass() throws ClassNotFoundException for all cases where the class cannot be found. (#64) * CORDA-2871: Modify sandbox tasks to implement both java.Function and sandbox.Function (#62) * Make TaskExecutors implement BiFunction to make them composable. * Create ImportTask to wrap a java.Function inside a sandbox.Function. * Add createExecutor() and createRawExecutor() APIs to SandboxClassLoader. * Update serialization to use SandboxClassLoader.toSandboxClass(). * Remove a layer of lambdas from the serialisation code. * Update SandboxExecutor and SandboxRawExecutor. * Rename Executor to TaskFactory. * Rename dangling executor -> taskFactory. * CORDA-2871: Sanity fixes! (#63) * Improve message for SandboxClassLoadingException. * Fix serialisation API for using sandboxed environment. * CORDA-3174: Extend serialisation to include InputStream and OpaqueBytesSubSequence. (#60) * Update DJVM Example project for serialisation. * Add serializers for InputStream and OpaqueBytesSubSequence. * Support ZIP Inflater and CRC32 inside the sandbox. * Allow the DJVM to wrap java.io.InputStream as sandbox.java.io.InputStream. * Configure tests also to preserve @DeprecatedConstructorForDeserialization. * CORDA-3174: Implement Corda serialization modules. (#59) * Create DJVM serialization modules. * Create test cases for Array<T>, List<T> and List<Array<T>>. * Refactor SandboxPrimiveSerializer for all primitive types. * Implement SandboxCollectionSerializer to support Collection types. * Implement SandboxMapSerializer to support Map types. * Attempt to fix infinite loop when computing Collection and Map fingerprints. * Apply special handling when deserialising sandbox.java.lang.Character. * Remap Java primitive types to sandbox Java object types to deter evolution. * Use Class.getPackage().getName() to determine sandbox package name. * Implement SandboxEnumSerializer to support Enum types. * Implement SandboxPublicKeySerializer to support Java security keys. * Add serialization projects to the composite example project. * Implement serializers for BigInteger, BigDecimal, Currency and StringBuffer. * Test that deserialising does not instantiate the untrusted user classes. * Implement serializers for java.time.* types. * Add serialiser for BitSet - currently disabled until BitSet itself is supported. * Add serialisers for EnumSet and Class. * Include support for EnumMap in the SandboxMapSerializer. * Ensure the DJVM Example project's tests preserve @CordaSerializable. * Add support for UUID as a primitive type. * Use common abortReadOnly() method for declaring serialization as unsupported. * Streamline the API for deserialising into the sandbox. * Add preliminary support for deserialising X.509 certificates. * Implement serializer for java.util.Optional. * Refactor configuration of the sandbox serialization scheme. * Add tests for deserialising arrays of basic types. * Include method annotations in annotation stitching. This ensures that `@ConstructorForDeserialization` is not dropped. * Enable test for SandboxBitSetSerializer. * Enable tests for X.509 serializers. * Implement serializers for ProtonJ primitive types. * Serialize java.util.Date as a primitive type. * Add the bintray Gradle plugin to the serialisation modules. * Do not publish serialisation modules - they will become part of Corda itself. * CORDA-2876: Only apply DJVM sources to Node Driver when devMode=true. * Resolve DeteKT warnings. * Require Node's JVM to set -Dnet.corda.djvm=true in order to enable DJVM. * Enable DJVM for DemoBench nodes. * Disable Quasar instrumentation verification for DemoBench nodes. * Upgrade to DJVM 1.0-RC01. * Try to modify DriverParameters in a more "ABI friendly" way. * Refactor and simplify sandbox deserialisation of primitive objects. * Review fixes. * Update EvolutionSerializerFactory to handle sandboxed primitive boxed types.
2019-11-05 13:44:18 +00:00
description 'Serialization support for the DJVM'
configurations {
sandboxTesting
jdkRt
CORDA-2876: Integrate the DJVM with the Corda Node. (#5633) * * CORDA-2876: Migrate DJVM serialization modules into Corda. * Pre-generate Corda classes for DJVM sandbox when node boots in production mode. * Ensure that all DJVM test contract CorDapps are signed. * Test examining attachments within DJVM sandbox. * Test Contract.verify() using cryptographic verify function. * Add test cases for more non-determinism in Contract.verify(). * Update node-driver to support testing nodes with DJVM support. * Modify Node to allow alternative DJVM configurations for testing. * Refactor DeterministicVerifierFactoryService for default use-case. * Small whitespace and code-style refactors. * Create and activate a DJVM execution profile for the Node. * Revert making Verifier implement AutoCloseable. * Allow the node to cache sandboxed Corda byte-code for reuse. * Use updated Quasar agent that knows not to touch DJVM classloaders. * Fix Quasar's package exclusions globs for DJVM. * Deserialise LedgerTransaction into the sandbox for Contract.verify(). * Add the DJVM's serialisation modules to the Corda node. * Update the node for the latest DJVM API, and preserve the ConstructorForDeserialization annotation on user contract classes. * Add corda-dev to repositories while DJVM is SNAPSHOT. * Migrate DJVM specialisation into AbstractNode's ServiceHubInternalImpl. * Exclude sandbox.** and shaded djvm.** classes from Quasar agent. * Add the corda-dev repository to :node for the deterministic runtime. * Turn Verifier into an abstract base class that is specialised by BasicVerifier and DeterministicVerifier. * Add the Corda deterministic libraries to the Node, and split the DJVM sandbox across two SandboxClassLoader instances. * Add DJVM to contract verification path inside Corda Node. * Minor lambda simplifications and removing unused import. * CORDA-2871: Remove @CordaSerializable from LedgerTransaction. * CORDA-2871: Add a callback to ServicesForResolution to allow the Node to modify a LedgerTransaction object. * CORDA-2871: Refactor the contract verification code into a separate class, and allow LedgerTransaction to choose different Verifier objects. * Update DJVM to use Corda 4.4-SNAPSHOT. (#95) * CORDA-3330: Allow DJVM to preload / pregenerate classes from selected jars. (#92) * Add support for SourceClassLoader.getResources() to DJVM. * Allow a SandboxConfiguration to preload sandbox byte-code for all classes inside jars containing META-INF/DJVM-preload. * CORDA-3309: Remove explicit try-catch in favour of UncaughtExceptionHandler. (#91) * CORDA-3309: Install UncaughtExceptionHandler for DJVM tasks. (#88) * Fix tests broken by Windows line endings. (#82) * CORDA-3292: Reimplement ExecutionProfile as a data class. (#80) * CORDA-2877: Refactor how we create child SandboxConfiguration objects. (#76) * CORDA-2877: Load bytecode from a persistent cache to prevent repeated rewriting. (#75) * Refactor byte-code cache to SandboxConfiguration instead of AnalysisConfiguration. We cannot "mix and match" byte-code generated by different sets of rules. * CORDA-3137: Enhance annotation handling so that we can allow some annotations to be mapped into the sandbox without also needing to be stitched. (#72) * CORDA-2871: Minor cosmetic fixes. (#69) * CORDA-3218: Align DJVM with internal Corda Serialisation API. (#68) * Ensure we get the latest SNAPSHOT of the serialisation code. * CORDA-2871: Refactor SourceClassLoader to define source classes. (#66) * Rewrite SourceClassLoader to support parent/child relationships. * Revert catching TypNotPresebtException - it was a symptom of a bigger problem. * Remove AutoCloseable from AnalysisConfiguration and SourceClassLoader. * SourceClassLoader.getResource() must delegate to its parent first. * CORDA-2871: Ensure ClassLoader.loadClass() throws ClassNotFoundException for all cases where the class cannot be found. (#64) * CORDA-2871: Modify sandbox tasks to implement both java.Function and sandbox.Function (#62) * Make TaskExecutors implement BiFunction to make them composable. * Create ImportTask to wrap a java.Function inside a sandbox.Function. * Add createExecutor() and createRawExecutor() APIs to SandboxClassLoader. * Update serialization to use SandboxClassLoader.toSandboxClass(). * Remove a layer of lambdas from the serialisation code. * Update SandboxExecutor and SandboxRawExecutor. * Rename Executor to TaskFactory. * Rename dangling executor -> taskFactory. * CORDA-2871: Sanity fixes! (#63) * Improve message for SandboxClassLoadingException. * Fix serialisation API for using sandboxed environment. * CORDA-3174: Extend serialisation to include InputStream and OpaqueBytesSubSequence. (#60) * Update DJVM Example project for serialisation. * Add serializers for InputStream and OpaqueBytesSubSequence. * Support ZIP Inflater and CRC32 inside the sandbox. * Allow the DJVM to wrap java.io.InputStream as sandbox.java.io.InputStream. * Configure tests also to preserve @DeprecatedConstructorForDeserialization. * CORDA-3174: Implement Corda serialization modules. (#59) * Create DJVM serialization modules. * Create test cases for Array<T>, List<T> and List<Array<T>>. * Refactor SandboxPrimiveSerializer for all primitive types. * Implement SandboxCollectionSerializer to support Collection types. * Implement SandboxMapSerializer to support Map types. * Attempt to fix infinite loop when computing Collection and Map fingerprints. * Apply special handling when deserialising sandbox.java.lang.Character. * Remap Java primitive types to sandbox Java object types to deter evolution. * Use Class.getPackage().getName() to determine sandbox package name. * Implement SandboxEnumSerializer to support Enum types. * Implement SandboxPublicKeySerializer to support Java security keys. * Add serialization projects to the composite example project. * Implement serializers for BigInteger, BigDecimal, Currency and StringBuffer. * Test that deserialising does not instantiate the untrusted user classes. * Implement serializers for java.time.* types. * Add serialiser for BitSet - currently disabled until BitSet itself is supported. * Add serialisers for EnumSet and Class. * Include support for EnumMap in the SandboxMapSerializer. * Ensure the DJVM Example project's tests preserve @CordaSerializable. * Add support for UUID as a primitive type. * Use common abortReadOnly() method for declaring serialization as unsupported. * Streamline the API for deserialising into the sandbox. * Add preliminary support for deserialising X.509 certificates. * Implement serializer for java.util.Optional. * Refactor configuration of the sandbox serialization scheme. * Add tests for deserialising arrays of basic types. * Include method annotations in annotation stitching. This ensures that `@ConstructorForDeserialization` is not dropped. * Enable test for SandboxBitSetSerializer. * Enable tests for X.509 serializers. * Implement serializers for ProtonJ primitive types. * Serialize java.util.Date as a primitive type. * Add the bintray Gradle plugin to the serialisation modules. * Do not publish serialisation modules - they will become part of Corda itself. * CORDA-2876: Only apply DJVM sources to Node Driver when devMode=true. * Resolve DeteKT warnings. * Require Node's JVM to set -Dnet.corda.djvm=true in order to enable DJVM. * Enable DJVM for DemoBench nodes. * Disable Quasar instrumentation verification for DemoBench nodes. * Upgrade to DJVM 1.0-RC01. * Try to modify DriverParameters in a more "ABI friendly" way. * Refactor and simplify sandbox deserialisation of primitive objects. * Review fixes. * Update EvolutionSerializerFactory to handle sandboxed primitive boxed types.
2019-11-05 13:44:18 +00:00
}
dependencies {
api project(':core')
api project(':serialization')
api "net.corda.djvm:corda-djvm:$djvm_version"
api 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
implementation 'org.jetbrains.kotlin:kotlin-reflect'
CORDA-2876: Integrate the DJVM with the Corda Node. (#5633) * * CORDA-2876: Migrate DJVM serialization modules into Corda. * Pre-generate Corda classes for DJVM sandbox when node boots in production mode. * Ensure that all DJVM test contract CorDapps are signed. * Test examining attachments within DJVM sandbox. * Test Contract.verify() using cryptographic verify function. * Add test cases for more non-determinism in Contract.verify(). * Update node-driver to support testing nodes with DJVM support. * Modify Node to allow alternative DJVM configurations for testing. * Refactor DeterministicVerifierFactoryService for default use-case. * Small whitespace and code-style refactors. * Create and activate a DJVM execution profile for the Node. * Revert making Verifier implement AutoCloseable. * Allow the node to cache sandboxed Corda byte-code for reuse. * Use updated Quasar agent that knows not to touch DJVM classloaders. * Fix Quasar's package exclusions globs for DJVM. * Deserialise LedgerTransaction into the sandbox for Contract.verify(). * Add the DJVM's serialisation modules to the Corda node. * Update the node for the latest DJVM API, and preserve the ConstructorForDeserialization annotation on user contract classes. * Add corda-dev to repositories while DJVM is SNAPSHOT. * Migrate DJVM specialisation into AbstractNode's ServiceHubInternalImpl. * Exclude sandbox.** and shaded djvm.** classes from Quasar agent. * Add the corda-dev repository to :node for the deterministic runtime. * Turn Verifier into an abstract base class that is specialised by BasicVerifier and DeterministicVerifier. * Add the Corda deterministic libraries to the Node, and split the DJVM sandbox across two SandboxClassLoader instances. * Add DJVM to contract verification path inside Corda Node. * Minor lambda simplifications and removing unused import. * CORDA-2871: Remove @CordaSerializable from LedgerTransaction. * CORDA-2871: Add a callback to ServicesForResolution to allow the Node to modify a LedgerTransaction object. * CORDA-2871: Refactor the contract verification code into a separate class, and allow LedgerTransaction to choose different Verifier objects. * Update DJVM to use Corda 4.4-SNAPSHOT. (#95) * CORDA-3330: Allow DJVM to preload / pregenerate classes from selected jars. (#92) * Add support for SourceClassLoader.getResources() to DJVM. * Allow a SandboxConfiguration to preload sandbox byte-code for all classes inside jars containing META-INF/DJVM-preload. * CORDA-3309: Remove explicit try-catch in favour of UncaughtExceptionHandler. (#91) * CORDA-3309: Install UncaughtExceptionHandler for DJVM tasks. (#88) * Fix tests broken by Windows line endings. (#82) * CORDA-3292: Reimplement ExecutionProfile as a data class. (#80) * CORDA-2877: Refactor how we create child SandboxConfiguration objects. (#76) * CORDA-2877: Load bytecode from a persistent cache to prevent repeated rewriting. (#75) * Refactor byte-code cache to SandboxConfiguration instead of AnalysisConfiguration. We cannot "mix and match" byte-code generated by different sets of rules. * CORDA-3137: Enhance annotation handling so that we can allow some annotations to be mapped into the sandbox without also needing to be stitched. (#72) * CORDA-2871: Minor cosmetic fixes. (#69) * CORDA-3218: Align DJVM with internal Corda Serialisation API. (#68) * Ensure we get the latest SNAPSHOT of the serialisation code. * CORDA-2871: Refactor SourceClassLoader to define source classes. (#66) * Rewrite SourceClassLoader to support parent/child relationships. * Revert catching TypNotPresebtException - it was a symptom of a bigger problem. * Remove AutoCloseable from AnalysisConfiguration and SourceClassLoader. * SourceClassLoader.getResource() must delegate to its parent first. * CORDA-2871: Ensure ClassLoader.loadClass() throws ClassNotFoundException for all cases where the class cannot be found. (#64) * CORDA-2871: Modify sandbox tasks to implement both java.Function and sandbox.Function (#62) * Make TaskExecutors implement BiFunction to make them composable. * Create ImportTask to wrap a java.Function inside a sandbox.Function. * Add createExecutor() and createRawExecutor() APIs to SandboxClassLoader. * Update serialization to use SandboxClassLoader.toSandboxClass(). * Remove a layer of lambdas from the serialisation code. * Update SandboxExecutor and SandboxRawExecutor. * Rename Executor to TaskFactory. * Rename dangling executor -> taskFactory. * CORDA-2871: Sanity fixes! (#63) * Improve message for SandboxClassLoadingException. * Fix serialisation API for using sandboxed environment. * CORDA-3174: Extend serialisation to include InputStream and OpaqueBytesSubSequence. (#60) * Update DJVM Example project for serialisation. * Add serializers for InputStream and OpaqueBytesSubSequence. * Support ZIP Inflater and CRC32 inside the sandbox. * Allow the DJVM to wrap java.io.InputStream as sandbox.java.io.InputStream. * Configure tests also to preserve @DeprecatedConstructorForDeserialization. * CORDA-3174: Implement Corda serialization modules. (#59) * Create DJVM serialization modules. * Create test cases for Array<T>, List<T> and List<Array<T>>. * Refactor SandboxPrimiveSerializer for all primitive types. * Implement SandboxCollectionSerializer to support Collection types. * Implement SandboxMapSerializer to support Map types. * Attempt to fix infinite loop when computing Collection and Map fingerprints. * Apply special handling when deserialising sandbox.java.lang.Character. * Remap Java primitive types to sandbox Java object types to deter evolution. * Use Class.getPackage().getName() to determine sandbox package name. * Implement SandboxEnumSerializer to support Enum types. * Implement SandboxPublicKeySerializer to support Java security keys. * Add serialization projects to the composite example project. * Implement serializers for BigInteger, BigDecimal, Currency and StringBuffer. * Test that deserialising does not instantiate the untrusted user classes. * Implement serializers for java.time.* types. * Add serialiser for BitSet - currently disabled until BitSet itself is supported. * Add serialisers for EnumSet and Class. * Include support for EnumMap in the SandboxMapSerializer. * Ensure the DJVM Example project's tests preserve @CordaSerializable. * Add support for UUID as a primitive type. * Use common abortReadOnly() method for declaring serialization as unsupported. * Streamline the API for deserialising into the sandbox. * Add preliminary support for deserialising X.509 certificates. * Implement serializer for java.util.Optional. * Refactor configuration of the sandbox serialization scheme. * Add tests for deserialising arrays of basic types. * Include method annotations in annotation stitching. This ensures that `@ConstructorForDeserialization` is not dropped. * Enable test for SandboxBitSetSerializer. * Enable tests for X.509 serializers. * Implement serializers for ProtonJ primitive types. * Serialize java.util.Date as a primitive type. * Add the bintray Gradle plugin to the serialisation modules. * Do not publish serialisation modules - they will become part of Corda itself. * CORDA-2876: Only apply DJVM sources to Node Driver when devMode=true. * Resolve DeteKT warnings. * Require Node's JVM to set -Dnet.corda.djvm=true in order to enable DJVM. * Enable DJVM for DemoBench nodes. * Disable Quasar instrumentation verification for DemoBench nodes. * Upgrade to DJVM 1.0-RC01. * Try to modify DriverParameters in a more "ABI friendly" way. * Refactor and simplify sandbox deserialisation of primitive objects. * Review fixes. * Update EvolutionSerializerFactory to handle sandboxed primitive boxed types.
2019-11-05 13:44:18 +00:00
implementation(project(':serialization-djvm:deserializers')) {
transitive = false
}
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_jupiter_version"
testImplementation "org.junit.jupiter:junit-jupiter-params:$junit_jupiter_version"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_jupiter_version"
// Test utilities
testImplementation "org.assertj:assertj-core:$assertj_version"
testRuntimeOnly "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version"
jdkRt "net.corda:deterministic-rt:$deterministic_rt_version"
CORDA-2876: Integrate the DJVM with the Corda Node. (#5633) * * CORDA-2876: Migrate DJVM serialization modules into Corda. * Pre-generate Corda classes for DJVM sandbox when node boots in production mode. * Ensure that all DJVM test contract CorDapps are signed. * Test examining attachments within DJVM sandbox. * Test Contract.verify() using cryptographic verify function. * Add test cases for more non-determinism in Contract.verify(). * Update node-driver to support testing nodes with DJVM support. * Modify Node to allow alternative DJVM configurations for testing. * Refactor DeterministicVerifierFactoryService for default use-case. * Small whitespace and code-style refactors. * Create and activate a DJVM execution profile for the Node. * Revert making Verifier implement AutoCloseable. * Allow the node to cache sandboxed Corda byte-code for reuse. * Use updated Quasar agent that knows not to touch DJVM classloaders. * Fix Quasar's package exclusions globs for DJVM. * Deserialise LedgerTransaction into the sandbox for Contract.verify(). * Add the DJVM's serialisation modules to the Corda node. * Update the node for the latest DJVM API, and preserve the ConstructorForDeserialization annotation on user contract classes. * Add corda-dev to repositories while DJVM is SNAPSHOT. * Migrate DJVM specialisation into AbstractNode's ServiceHubInternalImpl. * Exclude sandbox.** and shaded djvm.** classes from Quasar agent. * Add the corda-dev repository to :node for the deterministic runtime. * Turn Verifier into an abstract base class that is specialised by BasicVerifier and DeterministicVerifier. * Add the Corda deterministic libraries to the Node, and split the DJVM sandbox across two SandboxClassLoader instances. * Add DJVM to contract verification path inside Corda Node. * Minor lambda simplifications and removing unused import. * CORDA-2871: Remove @CordaSerializable from LedgerTransaction. * CORDA-2871: Add a callback to ServicesForResolution to allow the Node to modify a LedgerTransaction object. * CORDA-2871: Refactor the contract verification code into a separate class, and allow LedgerTransaction to choose different Verifier objects. * Update DJVM to use Corda 4.4-SNAPSHOT. (#95) * CORDA-3330: Allow DJVM to preload / pregenerate classes from selected jars. (#92) * Add support for SourceClassLoader.getResources() to DJVM. * Allow a SandboxConfiguration to preload sandbox byte-code for all classes inside jars containing META-INF/DJVM-preload. * CORDA-3309: Remove explicit try-catch in favour of UncaughtExceptionHandler. (#91) * CORDA-3309: Install UncaughtExceptionHandler for DJVM tasks. (#88) * Fix tests broken by Windows line endings. (#82) * CORDA-3292: Reimplement ExecutionProfile as a data class. (#80) * CORDA-2877: Refactor how we create child SandboxConfiguration objects. (#76) * CORDA-2877: Load bytecode from a persistent cache to prevent repeated rewriting. (#75) * Refactor byte-code cache to SandboxConfiguration instead of AnalysisConfiguration. We cannot "mix and match" byte-code generated by different sets of rules. * CORDA-3137: Enhance annotation handling so that we can allow some annotations to be mapped into the sandbox without also needing to be stitched. (#72) * CORDA-2871: Minor cosmetic fixes. (#69) * CORDA-3218: Align DJVM with internal Corda Serialisation API. (#68) * Ensure we get the latest SNAPSHOT of the serialisation code. * CORDA-2871: Refactor SourceClassLoader to define source classes. (#66) * Rewrite SourceClassLoader to support parent/child relationships. * Revert catching TypNotPresebtException - it was a symptom of a bigger problem. * Remove AutoCloseable from AnalysisConfiguration and SourceClassLoader. * SourceClassLoader.getResource() must delegate to its parent first. * CORDA-2871: Ensure ClassLoader.loadClass() throws ClassNotFoundException for all cases where the class cannot be found. (#64) * CORDA-2871: Modify sandbox tasks to implement both java.Function and sandbox.Function (#62) * Make TaskExecutors implement BiFunction to make them composable. * Create ImportTask to wrap a java.Function inside a sandbox.Function. * Add createExecutor() and createRawExecutor() APIs to SandboxClassLoader. * Update serialization to use SandboxClassLoader.toSandboxClass(). * Remove a layer of lambdas from the serialisation code. * Update SandboxExecutor and SandboxRawExecutor. * Rename Executor to TaskFactory. * Rename dangling executor -> taskFactory. * CORDA-2871: Sanity fixes! (#63) * Improve message for SandboxClassLoadingException. * Fix serialisation API for using sandboxed environment. * CORDA-3174: Extend serialisation to include InputStream and OpaqueBytesSubSequence. (#60) * Update DJVM Example project for serialisation. * Add serializers for InputStream and OpaqueBytesSubSequence. * Support ZIP Inflater and CRC32 inside the sandbox. * Allow the DJVM to wrap java.io.InputStream as sandbox.java.io.InputStream. * Configure tests also to preserve @DeprecatedConstructorForDeserialization. * CORDA-3174: Implement Corda serialization modules. (#59) * Create DJVM serialization modules. * Create test cases for Array<T>, List<T> and List<Array<T>>. * Refactor SandboxPrimiveSerializer for all primitive types. * Implement SandboxCollectionSerializer to support Collection types. * Implement SandboxMapSerializer to support Map types. * Attempt to fix infinite loop when computing Collection and Map fingerprints. * Apply special handling when deserialising sandbox.java.lang.Character. * Remap Java primitive types to sandbox Java object types to deter evolution. * Use Class.getPackage().getName() to determine sandbox package name. * Implement SandboxEnumSerializer to support Enum types. * Implement SandboxPublicKeySerializer to support Java security keys. * Add serialization projects to the composite example project. * Implement serializers for BigInteger, BigDecimal, Currency and StringBuffer. * Test that deserialising does not instantiate the untrusted user classes. * Implement serializers for java.time.* types. * Add serialiser for BitSet - currently disabled until BitSet itself is supported. * Add serialisers for EnumSet and Class. * Include support for EnumMap in the SandboxMapSerializer. * Ensure the DJVM Example project's tests preserve @CordaSerializable. * Add support for UUID as a primitive type. * Use common abortReadOnly() method for declaring serialization as unsupported. * Streamline the API for deserialising into the sandbox. * Add preliminary support for deserialising X.509 certificates. * Implement serializer for java.util.Optional. * Refactor configuration of the sandbox serialization scheme. * Add tests for deserialising arrays of basic types. * Include method annotations in annotation stitching. This ensures that `@ConstructorForDeserialization` is not dropped. * Enable test for SandboxBitSetSerializer. * Enable tests for X.509 serializers. * Implement serializers for ProtonJ primitive types. * Serialize java.util.Date as a primitive type. * Add the bintray Gradle plugin to the serialisation modules. * Do not publish serialisation modules - they will become part of Corda itself. * CORDA-2876: Only apply DJVM sources to Node Driver when devMode=true. * Resolve DeteKT warnings. * Require Node's JVM to set -Dnet.corda.djvm=true in order to enable DJVM. * Enable DJVM for DemoBench nodes. * Disable Quasar instrumentation verification for DemoBench nodes. * Upgrade to DJVM 1.0-RC01. * Try to modify DriverParameters in a more "ABI friendly" way. * Refactor and simplify sandbox deserialisation of primitive objects. * Review fixes. * Update EvolutionSerializerFactory to handle sandboxed primitive boxed types.
2019-11-05 13:44:18 +00:00
// The DJVM will need this classpath to run the unit tests.
sandboxTesting files(sourceSets.getByName("test").output)
sandboxTesting project(':serialization-djvm:deserializers')
sandboxTesting project(path: ':serialization-deterministic', configuration: 'deterministicArtifacts')
sandboxTesting "org.slf4j:slf4j-nop:$slf4j_version"
}
jar {
archiveBaseName = 'corda-serialization-djvm'
archiveClassifier = ''
CORDA-2876: Integrate the DJVM with the Corda Node. (#5633) * * CORDA-2876: Migrate DJVM serialization modules into Corda. * Pre-generate Corda classes for DJVM sandbox when node boots in production mode. * Ensure that all DJVM test contract CorDapps are signed. * Test examining attachments within DJVM sandbox. * Test Contract.verify() using cryptographic verify function. * Add test cases for more non-determinism in Contract.verify(). * Update node-driver to support testing nodes with DJVM support. * Modify Node to allow alternative DJVM configurations for testing. * Refactor DeterministicVerifierFactoryService for default use-case. * Small whitespace and code-style refactors. * Create and activate a DJVM execution profile for the Node. * Revert making Verifier implement AutoCloseable. * Allow the node to cache sandboxed Corda byte-code for reuse. * Use updated Quasar agent that knows not to touch DJVM classloaders. * Fix Quasar's package exclusions globs for DJVM. * Deserialise LedgerTransaction into the sandbox for Contract.verify(). * Add the DJVM's serialisation modules to the Corda node. * Update the node for the latest DJVM API, and preserve the ConstructorForDeserialization annotation on user contract classes. * Add corda-dev to repositories while DJVM is SNAPSHOT. * Migrate DJVM specialisation into AbstractNode's ServiceHubInternalImpl. * Exclude sandbox.** and shaded djvm.** classes from Quasar agent. * Add the corda-dev repository to :node for the deterministic runtime. * Turn Verifier into an abstract base class that is specialised by BasicVerifier and DeterministicVerifier. * Add the Corda deterministic libraries to the Node, and split the DJVM sandbox across two SandboxClassLoader instances. * Add DJVM to contract verification path inside Corda Node. * Minor lambda simplifications and removing unused import. * CORDA-2871: Remove @CordaSerializable from LedgerTransaction. * CORDA-2871: Add a callback to ServicesForResolution to allow the Node to modify a LedgerTransaction object. * CORDA-2871: Refactor the contract verification code into a separate class, and allow LedgerTransaction to choose different Verifier objects. * Update DJVM to use Corda 4.4-SNAPSHOT. (#95) * CORDA-3330: Allow DJVM to preload / pregenerate classes from selected jars. (#92) * Add support for SourceClassLoader.getResources() to DJVM. * Allow a SandboxConfiguration to preload sandbox byte-code for all classes inside jars containing META-INF/DJVM-preload. * CORDA-3309: Remove explicit try-catch in favour of UncaughtExceptionHandler. (#91) * CORDA-3309: Install UncaughtExceptionHandler for DJVM tasks. (#88) * Fix tests broken by Windows line endings. (#82) * CORDA-3292: Reimplement ExecutionProfile as a data class. (#80) * CORDA-2877: Refactor how we create child SandboxConfiguration objects. (#76) * CORDA-2877: Load bytecode from a persistent cache to prevent repeated rewriting. (#75) * Refactor byte-code cache to SandboxConfiguration instead of AnalysisConfiguration. We cannot "mix and match" byte-code generated by different sets of rules. * CORDA-3137: Enhance annotation handling so that we can allow some annotations to be mapped into the sandbox without also needing to be stitched. (#72) * CORDA-2871: Minor cosmetic fixes. (#69) * CORDA-3218: Align DJVM with internal Corda Serialisation API. (#68) * Ensure we get the latest SNAPSHOT of the serialisation code. * CORDA-2871: Refactor SourceClassLoader to define source classes. (#66) * Rewrite SourceClassLoader to support parent/child relationships. * Revert catching TypNotPresebtException - it was a symptom of a bigger problem. * Remove AutoCloseable from AnalysisConfiguration and SourceClassLoader. * SourceClassLoader.getResource() must delegate to its parent first. * CORDA-2871: Ensure ClassLoader.loadClass() throws ClassNotFoundException for all cases where the class cannot be found. (#64) * CORDA-2871: Modify sandbox tasks to implement both java.Function and sandbox.Function (#62) * Make TaskExecutors implement BiFunction to make them composable. * Create ImportTask to wrap a java.Function inside a sandbox.Function. * Add createExecutor() and createRawExecutor() APIs to SandboxClassLoader. * Update serialization to use SandboxClassLoader.toSandboxClass(). * Remove a layer of lambdas from the serialisation code. * Update SandboxExecutor and SandboxRawExecutor. * Rename Executor to TaskFactory. * Rename dangling executor -> taskFactory. * CORDA-2871: Sanity fixes! (#63) * Improve message for SandboxClassLoadingException. * Fix serialisation API for using sandboxed environment. * CORDA-3174: Extend serialisation to include InputStream and OpaqueBytesSubSequence. (#60) * Update DJVM Example project for serialisation. * Add serializers for InputStream and OpaqueBytesSubSequence. * Support ZIP Inflater and CRC32 inside the sandbox. * Allow the DJVM to wrap java.io.InputStream as sandbox.java.io.InputStream. * Configure tests also to preserve @DeprecatedConstructorForDeserialization. * CORDA-3174: Implement Corda serialization modules. (#59) * Create DJVM serialization modules. * Create test cases for Array<T>, List<T> and List<Array<T>>. * Refactor SandboxPrimiveSerializer for all primitive types. * Implement SandboxCollectionSerializer to support Collection types. * Implement SandboxMapSerializer to support Map types. * Attempt to fix infinite loop when computing Collection and Map fingerprints. * Apply special handling when deserialising sandbox.java.lang.Character. * Remap Java primitive types to sandbox Java object types to deter evolution. * Use Class.getPackage().getName() to determine sandbox package name. * Implement SandboxEnumSerializer to support Enum types. * Implement SandboxPublicKeySerializer to support Java security keys. * Add serialization projects to the composite example project. * Implement serializers for BigInteger, BigDecimal, Currency and StringBuffer. * Test that deserialising does not instantiate the untrusted user classes. * Implement serializers for java.time.* types. * Add serialiser for BitSet - currently disabled until BitSet itself is supported. * Add serialisers for EnumSet and Class. * Include support for EnumMap in the SandboxMapSerializer. * Ensure the DJVM Example project's tests preserve @CordaSerializable. * Add support for UUID as a primitive type. * Use common abortReadOnly() method for declaring serialization as unsupported. * Streamline the API for deserialising into the sandbox. * Add preliminary support for deserialising X.509 certificates. * Implement serializer for java.util.Optional. * Refactor configuration of the sandbox serialization scheme. * Add tests for deserialising arrays of basic types. * Include method annotations in annotation stitching. This ensures that `@ConstructorForDeserialization` is not dropped. * Enable test for SandboxBitSetSerializer. * Enable tests for X.509 serializers. * Implement serializers for ProtonJ primitive types. * Serialize java.util.Date as a primitive type. * Add the bintray Gradle plugin to the serialisation modules. * Do not publish serialisation modules - they will become part of Corda itself. * CORDA-2876: Only apply DJVM sources to Node Driver when devMode=true. * Resolve DeteKT warnings. * Require Node's JVM to set -Dnet.corda.djvm=true in order to enable DJVM. * Enable DJVM for DemoBench nodes. * Disable Quasar instrumentation verification for DemoBench nodes. * Upgrade to DJVM 1.0-RC01. * Try to modify DriverParameters in a more "ABI friendly" way. * Refactor and simplify sandbox deserialisation of primitive objects. * Review fixes. * Update EvolutionSerializerFactory to handle sandboxed primitive boxed types.
2019-11-05 13:44:18 +00:00
manifest {
attributes('Automatic-Module-Name': 'net.corda.serialization.djvm')
attributes('Sealed': true)
}
}
tasks.withType(Test).configureEach {
CORDA-2876: Integrate the DJVM with the Corda Node. (#5633) * * CORDA-2876: Migrate DJVM serialization modules into Corda. * Pre-generate Corda classes for DJVM sandbox when node boots in production mode. * Ensure that all DJVM test contract CorDapps are signed. * Test examining attachments within DJVM sandbox. * Test Contract.verify() using cryptographic verify function. * Add test cases for more non-determinism in Contract.verify(). * Update node-driver to support testing nodes with DJVM support. * Modify Node to allow alternative DJVM configurations for testing. * Refactor DeterministicVerifierFactoryService for default use-case. * Small whitespace and code-style refactors. * Create and activate a DJVM execution profile for the Node. * Revert making Verifier implement AutoCloseable. * Allow the node to cache sandboxed Corda byte-code for reuse. * Use updated Quasar agent that knows not to touch DJVM classloaders. * Fix Quasar's package exclusions globs for DJVM. * Deserialise LedgerTransaction into the sandbox for Contract.verify(). * Add the DJVM's serialisation modules to the Corda node. * Update the node for the latest DJVM API, and preserve the ConstructorForDeserialization annotation on user contract classes. * Add corda-dev to repositories while DJVM is SNAPSHOT. * Migrate DJVM specialisation into AbstractNode's ServiceHubInternalImpl. * Exclude sandbox.** and shaded djvm.** classes from Quasar agent. * Add the corda-dev repository to :node for the deterministic runtime. * Turn Verifier into an abstract base class that is specialised by BasicVerifier and DeterministicVerifier. * Add the Corda deterministic libraries to the Node, and split the DJVM sandbox across two SandboxClassLoader instances. * Add DJVM to contract verification path inside Corda Node. * Minor lambda simplifications and removing unused import. * CORDA-2871: Remove @CordaSerializable from LedgerTransaction. * CORDA-2871: Add a callback to ServicesForResolution to allow the Node to modify a LedgerTransaction object. * CORDA-2871: Refactor the contract verification code into a separate class, and allow LedgerTransaction to choose different Verifier objects. * Update DJVM to use Corda 4.4-SNAPSHOT. (#95) * CORDA-3330: Allow DJVM to preload / pregenerate classes from selected jars. (#92) * Add support for SourceClassLoader.getResources() to DJVM. * Allow a SandboxConfiguration to preload sandbox byte-code for all classes inside jars containing META-INF/DJVM-preload. * CORDA-3309: Remove explicit try-catch in favour of UncaughtExceptionHandler. (#91) * CORDA-3309: Install UncaughtExceptionHandler for DJVM tasks. (#88) * Fix tests broken by Windows line endings. (#82) * CORDA-3292: Reimplement ExecutionProfile as a data class. (#80) * CORDA-2877: Refactor how we create child SandboxConfiguration objects. (#76) * CORDA-2877: Load bytecode from a persistent cache to prevent repeated rewriting. (#75) * Refactor byte-code cache to SandboxConfiguration instead of AnalysisConfiguration. We cannot "mix and match" byte-code generated by different sets of rules. * CORDA-3137: Enhance annotation handling so that we can allow some annotations to be mapped into the sandbox without also needing to be stitched. (#72) * CORDA-2871: Minor cosmetic fixes. (#69) * CORDA-3218: Align DJVM with internal Corda Serialisation API. (#68) * Ensure we get the latest SNAPSHOT of the serialisation code. * CORDA-2871: Refactor SourceClassLoader to define source classes. (#66) * Rewrite SourceClassLoader to support parent/child relationships. * Revert catching TypNotPresebtException - it was a symptom of a bigger problem. * Remove AutoCloseable from AnalysisConfiguration and SourceClassLoader. * SourceClassLoader.getResource() must delegate to its parent first. * CORDA-2871: Ensure ClassLoader.loadClass() throws ClassNotFoundException for all cases where the class cannot be found. (#64) * CORDA-2871: Modify sandbox tasks to implement both java.Function and sandbox.Function (#62) * Make TaskExecutors implement BiFunction to make them composable. * Create ImportTask to wrap a java.Function inside a sandbox.Function. * Add createExecutor() and createRawExecutor() APIs to SandboxClassLoader. * Update serialization to use SandboxClassLoader.toSandboxClass(). * Remove a layer of lambdas from the serialisation code. * Update SandboxExecutor and SandboxRawExecutor. * Rename Executor to TaskFactory. * Rename dangling executor -> taskFactory. * CORDA-2871: Sanity fixes! (#63) * Improve message for SandboxClassLoadingException. * Fix serialisation API for using sandboxed environment. * CORDA-3174: Extend serialisation to include InputStream and OpaqueBytesSubSequence. (#60) * Update DJVM Example project for serialisation. * Add serializers for InputStream and OpaqueBytesSubSequence. * Support ZIP Inflater and CRC32 inside the sandbox. * Allow the DJVM to wrap java.io.InputStream as sandbox.java.io.InputStream. * Configure tests also to preserve @DeprecatedConstructorForDeserialization. * CORDA-3174: Implement Corda serialization modules. (#59) * Create DJVM serialization modules. * Create test cases for Array<T>, List<T> and List<Array<T>>. * Refactor SandboxPrimiveSerializer for all primitive types. * Implement SandboxCollectionSerializer to support Collection types. * Implement SandboxMapSerializer to support Map types. * Attempt to fix infinite loop when computing Collection and Map fingerprints. * Apply special handling when deserialising sandbox.java.lang.Character. * Remap Java primitive types to sandbox Java object types to deter evolution. * Use Class.getPackage().getName() to determine sandbox package name. * Implement SandboxEnumSerializer to support Enum types. * Implement SandboxPublicKeySerializer to support Java security keys. * Add serialization projects to the composite example project. * Implement serializers for BigInteger, BigDecimal, Currency and StringBuffer. * Test that deserialising does not instantiate the untrusted user classes. * Implement serializers for java.time.* types. * Add serialiser for BitSet - currently disabled until BitSet itself is supported. * Add serialisers for EnumSet and Class. * Include support for EnumMap in the SandboxMapSerializer. * Ensure the DJVM Example project's tests preserve @CordaSerializable. * Add support for UUID as a primitive type. * Use common abortReadOnly() method for declaring serialization as unsupported. * Streamline the API for deserialising into the sandbox. * Add preliminary support for deserialising X.509 certificates. * Implement serializer for java.util.Optional. * Refactor configuration of the sandbox serialization scheme. * Add tests for deserialising arrays of basic types. * Include method annotations in annotation stitching. This ensures that `@ConstructorForDeserialization` is not dropped. * Enable test for SandboxBitSetSerializer. * Enable tests for X.509 serializers. * Implement serializers for ProtonJ primitive types. * Serialize java.util.Date as a primitive type. * Add the bintray Gradle plugin to the serialisation modules. * Do not publish serialisation modules - they will become part of Corda itself. * CORDA-2876: Only apply DJVM sources to Node Driver when devMode=true. * Resolve DeteKT warnings. * Require Node's JVM to set -Dnet.corda.djvm=true in order to enable DJVM. * Enable DJVM for DemoBench nodes. * Disable Quasar instrumentation verification for DemoBench nodes. * Upgrade to DJVM 1.0-RC01. * Try to modify DriverParameters in a more "ABI friendly" way. * Refactor and simplify sandbox deserialisation of primitive objects. * Review fixes. * Update EvolutionSerializerFactory to handle sandboxed primitive boxed types.
2019-11-05 13:44:18 +00:00
useJUnitPlatform()
systemProperty 'deterministic-rt.path', configurations.jdkRt.asPath
systemProperty 'sandbox-libraries.path', configurations.sandboxTesting.asPath
// Configure the host timezone to match the DJVM's.
systemProperty 'user.timezone', 'UTC'
}
publish {
name jar.archiveBaseName.get()
}
idea {
module {
downloadJavadoc = true
downloadSources = true
}
}