Commit Graph

14 Commits

Author SHA1 Message Date
Shams Asari
63f8e220c8
ENT-11251: Upgrade to Kotlin language version 1.9 (#7660) 2024-01-25 13:51:19 +00:00
Shams Asari
2e63ca6264
ENT-11065: Remove the need for JVM flags in client code (#7635) 2024-01-03 11:22:03 +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
Adel El-Beik
9962c9085d
INFRA-424: Merge openj9 updates into 4.6 (#6683)
* INFRA-424 linux1 jenkinsfile

* INFRA-424 full run

* INFRA-424 bigger heap size

* Upgraded DJVM to handle BC - latest version of BC is a multirelease JAR.
When reading JKS keystore if a BC EdDSAPrivateKey is returned then swap for a net.i2p EdDSA private key.

* Temporary downgrade of BC

* Removed the BC EdDSA conversion

* INFRA-424 bigger heap size

* Upgrading Quasar to handle openJ9 different fields.

* INFRA-424: Handle lack of SUPPRESSED_SENTINEL in openj9.

* INFRA-424: If BCEdDSA public or private key is generated convert to net.i2p EdDSA form.

* INFRA-424 bigger heap size

* INFRA-424: On openJ9 only getting upto milli resolution.

* INFRA-424: Handle keystore returning a BCEdDSAPrivateKey.

* INFRA-424: Disable test on JDK11, as it requires the custom cordapp to generate JDK8 contract code, which we now check for.

* INFRA-424: Truncated time test to resolution of millis for openj9.

* INFRA-424 disabling log intensive tests until a fix is developed

* INFRA-424 one more test disabled

* INFRA-424: Disabled a couple of tests failing on openj9.

* INFRA-424: Disabling failing openj9 tests.

* INFRA-424: Disabling test failing on openj9.

* INFRA-424: Ignoring another flaky sleep test on openj9.

* INFRA-424 run integrationTests

* INFRA-424 set timeout to 4 hours

* INFRA-424: Cope with exception message from openj9.

* INFRA-424: Handle the coloured text characters openj9 adds.

* INFRA-424: Disabling test as it is generating JDK11 contract code under JDK11. Currently on JDK8 contract code allowed.

* INFRA-424: Commenting test out for openj9. Output of the processs thats read by the test is sometimes garbled.

* INFRA-424 switching to smoke tests

* INFRA-424 switching to slow integration tests

* INFRA-424 full run

* INFRA-424 moving jenkinsfile

* INFRA-424 removing references

* INFRA-424: Created common IS_OPENJ9 func for ignoring tests.

Co-authored-by: Schife <razvan.codreanu@r3.com>
2020-09-02 14:35:30 +01:00
josecoll
0263650a5f
Revert "Merge pull request #5145 from corda/jdk11-migration-gradle5-upgrade" (#5146)
This reverts commit f46377556c, reversing
changes made to ba675e73b9.
2019-05-20 16:16:49 +01:00
josecoll
1586fd64f1 Enable JDK-internal API illegal access warnings. 2019-05-20 15:08:27 +01:00
Chris Rankin
4b41bd0189 BUILD: Resolve warnings with Gradle and system property API usage. (#4904) 2019-03-20 13:39:51 +00:00
Michele Sollecito
5f02425ef5
[CORDA-2285]: Enabled jUnit parallel execution. (#4344) 2018-12-03 13:31:17 +00:00
James Brown
c205a10ec0
ENT-2684 Fix owasp dependency checker to fail builds based on CVSS level (#4169)
OWASP Dependency Checker has been updated so that it can be configured to automatically fail a build when a vulnerable dependency is detected. This option is exposed through gradle settings, so that a build can be configured in TeamCity to pass/fail. This change is backward-compatible - i.e. it does not affect a build by default unless configured to do so.

Ability to fail a build is exposed by the new owasp.failBuildOnCVSS gradle property
By default this is set to '11.0' which will always pass a build even if a vulnerability is found (so will not affect anything by default)
Reduce the CVSS level between 0-10 to indicate what level to fail a build on
Example usage to catch Medium severity (and above) issues:

Configure gradle with the option -Powasp.failBuildOnCVSS=4
2018-11-07 09:00:19 +00:00
josecoll
6f27898664
CORDA-1509 Configure and enable Gradle Build Cache (#3908)
* Fix to enable gradle build caching of test runs.

* Configure gradle build caching to be enabled.

* Generate dependency report and graph:
1) ./gradlew htmlDependencyReport
2) ./gradlew generateDependencyGraphCorda

* Strip out all Jacoco references to prevent Gradle Build Cache error:
"Caching disabled for task ':<module>:test': 'JaCoCo agent configured with `append = true`' satisfied"

* Revert jacoco back into jarFilter gradle build file.
Disable building deterministic modules (including jarFilter).

* Added Gradle build scan plugin.

* Set file encoding to prevent incorrect Gradle build cache keys across different machines.
https://guides.gradle.org/using-build-cache/#system_file_encoding

* Apply gradle build cache settings to buildSrc.

* Added targetted gradle build tasks to leverage cache.

* Updated URL's of several different test Gradle Cache instances.

* Updated CI batch build scripts.

* Updated script perms to be executable.

* Added CI smoke tests batch script.

* Use TestDev Labs gradle cache.

* Echo URL of Gradle Build Repository.
Echo exit status of each Gradle build command.

* Use environment variables to define Gradle Build Cache usage and URL.

* Customisation through parameters.

* Remove dependency graph generation plugin.
Align build cache settings across project and buildSrc gradle files.

* Remove buildSrc gradle build cache config.

* Revert definition of gradle build cache variables back to settings.gradle.

* Fix incorrect path.

* Aligned gradle build cache configuration across buildSrc and project.

* Minor updates to test scope.

* Minor updates to test scope.

* Update scripts to use GRADLE_HOME

* Exit on unset GRADLE_HOME

* Remove duplication following rebase from master.

* Remove fine-grained build task scripts.

* Added back Jacoco reporting.

* Revert jdk8u-deterministic module.

* Incorporating changes from PR review feedback.

* Workaround Jacoco issue associated with Gradle Build Cache test task.

* Update init script.

* Remove redundant build-scan declarations.

* Updates from PR review feedback.

* Remove GRADLE_HOME as no longer needed - everything is driven via gradle wrapper.

* Use CORDA prefix in system environment variable.
2018-09-26 13:38:23 +01:00
Andrzej Cichocki
242d9cf7ad
CORDA-692 Don't include internal packages in API documentation (#2415)
* Use G1 for gradle daemon
2018-01-25 15:26:13 +00:00
Mike Hearn
5f79acaa88 Enable Kotlin incremental compilation in Gradle 2017-01-06 16:39:01 +01:00
Matthew Nesbit
058ac986bd Move contracts base files to namespace to make api aspect clearer in includes.
Move Party to core.crypto as Party is closely aligned with the signing and used in code areas unrelated to the contract code.
2016-05-14 13:47:07 +01:00
Mike Hearn
232a4b7f53 Kotlin 1.0.2. Enable experimental incremental compilation in Gradle. 2016-05-13 12:50:54 +02:00