Commit Graph

36 Commits

Author SHA1 Message Date
Arshad Mahmood
1b4189b2b3 Added explicit publishing configuration for projects bundled as jars, this change was required when upgrading to kotlin 1.9.0 2023-11-08 10:48:10 +00:00
Arshad Mahmood
6dd33fb8f7 Upgrade to gradle 7.6, kotlin 1.8 and jdk 17
Major changes due to JDK 17:
1. JDK17 JCE Provider now has built-in support for eddsas, corda uses
   the bouncycastle (i2p) implementation. This PR removes the conflicting
   algorithms from the built-in JCE provider.

2. JavaScript scripting has been removed from the JDK, the corda log4j config was using
   scripting to conditionally output additional diagnostic info if the MDC
   was populated. This PR has removed the scripting.

3. The artifactory plug-ins used are now deprecated, this PR has removed them
   and uses the same code as Corda 5 for publishing to artifactory.

4. Javadoc generation has been modified to use the latest dokka plug-ins.

5. Gradle 7.6 has implemented an incredibly annoying change where transitive
   dependencies are not put on the compile classpath, so that they have to be
   explicitly added as dependencies to projects.

6. Mockito has been updated, which sadly meant that quite a few source files
   have to changes to use the new (org.mockito.kotlin) package name. This makes
   this PR appear much larger than it is.

7. A number of tests have been marked as ignored to get a green, broadly they fall
   into 3 classes.

   The first is related to crypto keypair tests, it appears some logic
   in the JDK prefers to use the SunJCE implementation and we prefer to use
   bouncycastle. I believe this issue can be fixed with better test setup.

   The second group is related to our use of a method called "uncheckedCast(..)",
   the purpose of this method was to get rid of the annoying unchecked cast compiler
   warning that would otherwise exist. It looks like the Kotlin 1.9 compiler type
   inference differs and at runtime sometimes the type it infers is "Void" which causes
   an exception at runtime. The simplest solution is to use an explicit cast instead of
   unchecked cast, Corda 5 have removed unchecked cast from their codebase.

   The third class are a number of ActiveMQ tests which appear to have a memory leak somewhere.
2023-11-06 10:24:17 +00:00
Rick Parker
e5a8888232
CORDA-3644: Add Corda-Testing tag to test artifacts' MANIFEST.MF. (#6032) 2020-03-05 17:39:55 +00:00
Chris Rankin
b9f7c1a08a CORDA-2893, ENT-3422: Tweak JUnit 5 configurations to keep vintage engine off compile classpaths. (#5138)
* Tweak JUnit 5 configurations to keep vintage engine off compile classpaths.

* Configure Gradle tests to use JUnit 5.
2019-05-20 11:57:56 +01:00
Dominic Fox
0b63157a4b ENT-3422 Add JUnit 5 dependencies to all projects (#5084)
* ENT-3422 Add JUnit 5 dependencies to all projects

* Remove explicit junit 4 imports where not needed

* Minor PR fixes

* Limit import scope
2019-05-15 16:40:12 +01:00
szymonsztuka
4aaefb4fe9 CORDA-2331 Split Workflow and contracts of Finance App into separate Cordapps (#4422)
* Split Workflow and contracts of Finance App into separate Cordapps, part 1 - content which is different between OS and ENT is still in contract Cordapp.

* Move CashSelection implementations to workflow module.

* Move CashSelection implmentations to workflow module.

* Move finance module to finance-flows, top level finance module is empty.

* Move finance module to finance-flows, top level finance module is empty.

* Updated build comment.

* Revert publication of combined (contracts and flows) corda-finance.jar (to maintain backwards compatibility with 3rd party cordapps dependent on finance)

* Added backwards compatibility clarification comment.

* Re-instate new cordapp metadata.

* Global rename of `finance-flows` to `finance-workflows` to follow adopted naming conventions.

* Addressed final review comments.

* Rename application to "Corda Finance Demo"

* Generation of original corda-finance jar from new sub-modules.

* Fixed and tested demobench with new split finance contract and workflow jars.

* Renamed finance sub-modules to contracts and workflows.

* Remove Michele!!!

* Minor fix to filtering logic.

* Align CorDapp configuration filename with workflows jar.

* Fix breaks caused by finance module naming changes.

* Final alignment between OS/ENT of finance contract code.
2018-12-19 18:02:51 +00:00
Chris Rankin
02978fc174
Resolve warnings for Kotlin ByteArray. (#3521) 2018-07-05 13:00:29 +01:00
Tommy Lillehagen
551dc43265 Reformat files in client 2017-10-09 15:26:39 +01:00
Michele Sollecito
0b35a99c5a [CORDA-682]: Claim Jigsaw module names (#1824)
[CORDA-682] Specify Jigsaw module names for all JAR projects.
2017-10-06 15:37:33 +01:00
Chris Rankin
1e12aebe0a Gradle API Scanner plugin (#1669)
* Skeleton plugin.
* Implement Gradle api-scanner plugin, and apply it.
* Generate API documentation for any jar without a classifier.
* Fix usage of smokeTests classifier.
* Tweak Gradle API usage.
* Upgrade to fast-classpath-scanner 2.7.0
* Include interfaces and more modifiers in the class description.
* Allow system classes to be supertypes and implemented interfaces.
* Make API Scanner plugin configuration tweakable via build.gradle.
* Add a miserable amount of unit testing.
* Sort methods and fields using their natural comparators. Way easier!
* Add README for api-scanner plugin.
* Add @OutputFiles to ScanApiTask.
* Rename ScanApiTask to ScanApi.
* Allow the ScanApi task to be disabled.
* WIP: Create a top-level GenerateApi task to collate the ScanApi output.
* Exclude package-private classes, as well as bridge/synthetic methods.
* Replace "End of Class" delimiter with '##'.
* Don't scan modules whose API is still "in flux".
* Include constructors in the API definitions.
* Finish implementation of GenerateApi task.
* Update README to include GenerateApi task.
* Filter out Kotlin's "internal" methods.
* Assign "fatjar" classifier to the fat jar artifact.
* Enhance README for GenerateApi.
* Explain effect of api-scanner plugin, and link to Corda's API strategy.
* Tweak README
* Exclude synthetic Kotlin classes by analysing @Metadata.
* Allow us to exclude some classes explicitly from the API.
2017-09-29 16:55:26 +01:00
Andrzej Cichocki
9874e1ff34 uncheckedCast crusade (#1667) 2017-09-27 12:58:48 +01:00
Clinton Alexander
05e94e7425 Corrected isolated.jar excludes for all projects and corrected some test dependencies. 2017-09-22 18:19:07 +02:00
Shams Asari
4c3ac89d6b Try.Failure is no longer parameterised on Nothing, to avoid any issues with Java 2017-09-10 14:54:32 +01:00
Ross Nicoll
df87731043 CORDA-499: Dokka 'Kt' class cleanup (#1433)
* Remove unneeded identity registrations from tests, which sometimes cause duplicated entries in the database
* Add JvmName annotations to ObservableFold and ObservableUtilities
* Move createMapChange() into ReadOnlyBackedObservableMapBase as the only place it's used, to
improve Java interop.
* Clean up Generator by moving extension functions into the class/companion class.
* Add documentation to the actual functions rather than being only on the top level class. 
* Add JvmName to Generators
* Move extension functions into the classes they're used in to try supressing generation of empty RPCClientProxyHandlerKt class.
* Add JvmName to ConcurrencyUtils
* Move Iterable<ServiceInfo>.containsType() into Simulation, as it's only useful when verifying
setup of a simulated case. Resolves ServiceInfoKt class being generated.
* Move FlowHandle.notUsed() into the one place it's actually called, so Kotlin stops creating a FlowHandleKt class.
2017-09-08 14:37:18 +01:00
Matthew Nesbit
c86e78599f Rename finance module to own package
Fixup after rebase

Correct bad merges

Fixup docs

Fix integration test

Correct doc references to finance
2017-08-22 13:25:31 +01:00
mkit
2744079b4b Removing usages of the deprecated CashFlowCommand (#1289)
* Removing usages of the deprecated CashFlowCommand

* Addressing review comments
2017-08-21 13:32:08 +01:00
Shams Asari
62b26bcd89 Moved Currency stuff in ContractsDSL out of core and into finance 2017-08-15 18:08:02 +01:00
Andrius Dagys
f69273027c Verifier test: make sure only correct transactions are generated 2017-08-15 11:12:02 +01:00
Shams Asari
4312dc0771 Resolved all non-deprecation warnings 2017-08-02 12:17:52 +01:00
Clinton
0ccfae252f POMs generated by publishing are now correct. (#1055)
* POMs generated by publishing are now correct. The publish extension now requires an explicit call to configure the publishing instead of waiting until after evaluation. This prevents evaluation order issues with the artifact renaming code that causes the POM to have the original, incorrect, artifact names.

* Fixed new test compile issues caused by removal of some dependencies in test utils that caused webserver code to be automatically included in any project also compiling test utils.
2017-07-18 12:34:56 +01:00
Shams Asari
7caee508ec Refactored ErrorOr into Try, with Success and Failure data sub-classes, and moved it into core.utilities 2017-07-11 12:10:38 +01:00
Shams Asari
8f1529b863 Moved ByteArrays.kt to core.utilities 2017-07-06 17:58:18 +01:00
Clinton Alexander
b4e7d7ca1b Can now publish to artifactory. 2017-07-03 18:12:56 +01:00
Ross Nicoll
1a4965c294 Change CashIssueFlow to use anonymous identity
* Add functions for:
    * Retrieving nodes via their legal identity
    * Filtering a set of public keys down to those the node has corresponding private keys for
* Modify contract upgrade flows to handle identifying participants after an anomymisation step
* Correct terminology: "party who" -> "party which"
* Modify CashIssueFlow and CashPaymentFlow to optionally use an anonymous identity for the recipient.
2017-06-28 13:47:50 +01:00
Katarzyna Streich
ab1b7eb551 Move all changes unrelated to flow view in explorer to open source. 2017-06-20 18:01:49 +02:00
Katarzyna Streich
20403d806a Cleanup of the explorer code related to internal flow view work. (#832)
Cleanup of the explorer code related to internal flow view work.
Changes in simulation, widgets, minor visual.
2017-06-20 10:45:42 +01:00
Clinton
08cbcac40c Corda publications and JARs now have cord or corda at the start. (#749)
Core corda publications and JARs now have cord or corda at the start (excluding gradle plugins). Removed an unnecessary dependency on test-utils in node-schemas to prevent an evaluation order bug in gradle.
2017-06-06 15:05:47 +01:00
Ross Nicoll
e4a0bc6e11 Move party classes into identity package
Move AbstractParty, AnonymousParty and Party into a new net.corda.core.identity package,
as they're not really cryptography tools, and in preparation for further code coming in
for identity.

Optimize imports on many files to clean up the resulting refactor.
2017-05-11 11:25:59 +01:00
Andras Slemmer
de88ad4f40 RPC muxing, multithreading, RPC driver, performance tests 2017-05-05 17:10:52 +01:00
Matthew Nesbit
7e3b9a8934 Fix duplicate content root problems in IntelliJ 2017-04-26 10:37:16 +02:00
Patrick Kuo
d8370a41b5 Reduce occurrence of flow exception in explorer demo (#467)
* changed event generator to reduce flow exception due to wrongly generated event
2017-03-31 14:19:02 +01:00
Patrick Kuo
9a7d0a0fb5 Replace unused variables with _ after kotlin 1.1.1 upgrade (#456)
* Replace unused variables with _ after kotlin 1.1.1 upgrade
2017-03-29 13:54:40 +01:00
Rick Parker
8ef1d767c9 Consolidate maven repositories (#445)
* Consolidate repositories into root build.gradle
2017-03-28 17:17:40 +01:00
josecoll
0280299104 Soft locking implementation using database coin selection
Fix broken IssuerFlowTest

Fix IssuerFlowTests after rebase.

Resolve conflicts after rebase.

Soft locking converted to use persistent store.
Added additional optional 'includeLockStates' parameter in VaultService states API call.
Added Vault softLocked states query API call.

Fixed commercial paper failing test.
Improved exception handling on soft locking UPDATE statement.

Using SELECT FOR UPDATE to ensure correct soft locking data visibility.
Db query operations moved out of mutex code (as locking managed by underlying DB)

Adjusted logging severity levels.

Adjusted logging severity levels.

GenerateSpending now performing fine grained query for unconsumed states by joining with contract_cash_states table.
Using H2 proprietary cummulative counting feature (using sessioni SET variables)
Refactored and simplified HibernateObserver constructor to enable usage in JUnit tests.

Event generator issues larger random amounts (10,000..1,000,000) to those than are spent (0..10,000)
Adjusted Issue (5:1) and Exit (10:1) generation frequency vs spending.

Minor fixes: added optional lockid into select for spending criteria, set notary, additional trace logging.

Generate Cash Schema by default upon node start-up (as part of NodeSchemaService initialisation).

Explicitly close JDBC statements in finally() blocks.

Tightened HibernateObserver constructor.

Fix CommercialPaper test (was missing auto-generation of CONTRACT_CASH table)

Revert default JVM size back to 200Mb.

Revert default number of iterations in Explorer Node Simulation mode (back to 10000 with .5 sec sleep interval).

Remove redundant setter function.

Added TODO messages indicating Requery / H2 restrictions & caveats.

Consumed states lock updates now performed in general consumed state Update.

Updated/added Soft Locking documentation.

Addressed initial PR comments: use THREAD_LOCAL_KRYO, use AbstractParty, extract helper method, improve readability, address some doc typos

Addressed PR comment: removed lockId from WireTransaction.

Fixed soft locking UPDATE statements.

Improvements to VaultSoftLockManager for auto-registration of soft locks for flows with spendable states (as notifications from vault).
Other optimisations (IssuerFlow no longer explicitly reserve/release issued state) and improvements (soft lock release management of soft locks, docs update)

Performance update: now using Requery for UPDATE in release soft locking (non-composite key statement)

Removed redundant TODO messages (TODO: revisit Kryo bug when using THREAD_LOCAL_KYRO)

Minor fixes following rebase

Fixed failing JUnit following rebase

Addressed MH PR review items (1st pass)

Fix broken JUnit

Significant changes to RDBMS operations within coin selection and soft locking as requested by PR review.
(Removed SELECT FOR UPDATE; added RETRY upon coin selection; reverting partial soft locks)

Addressed a number of PR review requests added by MH (comments/spelling, lockID instantiation, HibernateObserver instantiation, cash schema white-listing usage)

Addressed latest PR review comments from RP.

Minor fixes following rebase from master.

Fixed final failing JUnit (issuer flow concurrent).

Updated TraderDemo to trigger concurrent issuance of cash.

Fixed compiler warning on lockId null check.

Fixed subtle bug in coin selection intermittently surfaced in IntegrationTestTutorial.

Fixed small memory leak.

Removed stray } in logger trace message.

Slight rewording of description of Soft Locking in docs.

Renamed NoStatesAvailableException to StatesNotAvailableException.
generateSpend is now Suspendable (calls sleep method on flow upon coin selection retry).

Added companion function to enable a Strand to sleep but without locking transactional context.

Improved logging, changed to StateNotAvailableException, using Flow sleep upon retry, tweaked SELECT criteria in coin selection, fixed bug when insufficient states selectable, generateSpend is now @suspendable

Improved handling and logging of flow results in Simulation Mode.

Fixed minor error in sleep when not an active flow.

Retry coin selection when unavailable states (as these may become available as new states).
Additional debug logging to highlight and identify H2 coin selection sporadic bug.

Inlined sleep method due to intermittent Quasar error.

Re-introduce selection clause that prevents selection and temporary locking of already locked states (by other flows).
Improved trace logging for coin selection (SQL row level info).
Correctly calling FlowStateMachineImpl sleep (now inlined and working correctly)

Fixed rebase error.

Remove redundant TODO message.
2017-03-27 17:12:33 +01:00
Chris Rankin
98266da41c Refactor CordaRPCClient into new :client:rpc Gradle module. (#405)
* CORDA-305: Refactor CordaRPCClient into :client:rpc module

* CORDA-305: Remove the Kotlin test framework from the artifacts.

* CORDA-305: Migrate serialisation whitelist into node-api module.

* CORDA-305: Clean up unused RPC observables.

* CORDA-305: Add :client:rpc module to documentation tasks.

* CORDA-305: Include :finance into :client:rpc for its serialisable classes.

* CORDA-305: Move test classes into the correct directory.

* CORDA-305: Migrate :finance dependency from :client:rpc into DemoBench.

* CORDA-305: Update wording of TODO about handling Observables.
2017-03-22 15:52:54 +00:00
Chris Rankin
9e43df36d3 Refactor :client module into :client:javafx and :client:mock (#388)
* CORDA-304: Refactor :client modules into :client:javafx and :client:mock.

* CORDA-304: Add :client:mock to Dokka tasks, and remove unused integrationTest task.

* CORDA-304: Migrate DriverBasedTest from node into test-utils.

* CORDA-304: Rename .fx. package to .jfx. to prevent confusion with "exchange rate".

* CORDA-304: Rename module to ':client:jfx'.
2017-03-21 19:45:12 +00:00