diff --git a/build.gradle b/build.gradle index d172bda4fb..43795f9fdd 100644 --- a/build.gradle +++ b/build.gradle @@ -118,18 +118,16 @@ buildscript { classpath "net.i2p.crypto:eddsa:$eddsa_version" // Needed for ServiceIdentityGenerator in the build environment. classpath "org.owasp:dependency-check-gradle:${dependency_checker_version}" classpath "org.jfrog.buildinfo:build-info-extractor-gradle:$artifactory_plugin_version" + // Capsule gradle plugin forked and maintained locally to support Gradle 5.x + // See https://github.com/corda/gradle-capsule-plugin + classpath "us.kirchmeier:gradle-capsule-plugin:1.0.4_r3" } } plugins { - // TODO The capsule plugin requires the newer DSL plugin block.It would be nice if we could unify all the plugins into one style, - // but the DSL has some restrictions e.g can't be used on the allprojects section. So we should revisit this if there are improvements in Gradle. - // Version 1.0.2 of this plugin uses capsule:1.0.1 by default. - id 'us.kirchmeier.capsule' version '1.0.2' apply false - // Add the shadow plugin to the plugins classpath for the entire project. id 'com.github.johnrengelman.shadow' version '2.0.4' apply false - id "com.gradle.build-scan" version "1.16" + id "com.gradle.build-scan" version "2.2.1" } ext { @@ -217,6 +215,8 @@ allprojects { // Prevent the project from creating temporary files outside of the build directory. systemProperty 'java.io.tmpdir', buildDir.absolutePath + maxHeapSize = "1g" + if (project.hasProperty('test.parallel') && project.property('test.parallel').toBoolean()) { maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) as int ?: 1 } @@ -473,7 +473,7 @@ if (file('corda-docs-only-build').exists() || (System.getenv('CORDA_DOCS_ONLY_BU wrapper { - gradleVersion = "4.10.1" + gradleVersion = "5.4.1" distributionType = Wrapper.DistributionType.ALL } diff --git a/common/configuration-parsing/build.gradle b/common/configuration-parsing/build.gradle index 08137649c2..1fb78d4406 100644 --- a/common/configuration-parsing/build.gradle +++ b/common/configuration-parsing/build.gradle @@ -28,4 +28,4 @@ jar { publish { name jar.baseName -} +} \ No newline at end of file diff --git a/common/logging/build.gradle b/common/logging/build.gradle index e778d934c6..b2bcd61e01 100644 --- a/common/logging/build.gradle +++ b/common/logging/build.gradle @@ -8,12 +8,12 @@ dependencies { compile group: "org.jetbrains.kotlin", name: "kotlin-reflect", version: kotlin_version compile group: "com.typesafe", name: "config", version: typesafe_config_version - compile "org.apache.logging.log4j:log4j-slf4j-impl:$log4j_version" + // Log4J: logging framework + compile "org.apache.logging.log4j:log4j-core:$log4j_version" compile "com.jcabi:jcabi-manifests:$jcabi_manifests_version" - testCompile project(":test-utils") } diff --git a/confidential-identities/build.gradle b/confidential-identities/build.gradle index a9c7081bf8..549ff0e4db 100644 --- a/confidential-identities/build.gradle +++ b/confidential-identities/build.gradle @@ -31,8 +31,6 @@ dependencies { jar { baseName 'corda-confidential-identities' - preserveFileTimestamps = false - reproducibleFileOrder = true } publish { diff --git a/constants.properties b/constants.properties index 869bc9cc21..a544a1eb54 100644 --- a/constants.properties +++ b/constants.properties @@ -3,7 +3,7 @@ # their own projects. So don't get fancy with syntax! cordaVersion=5.0-SNAPSHOT -gradlePluginsVersion=4.0.42 +gradlePluginsVersion=5.0.0 kotlinVersion=1.2.71 java8MinUpdateVersion=171 # ***************************************************************# diff --git a/core/build.gradle b/core/build.gradle index d6975b0f30..6254a94599 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -143,6 +143,11 @@ configurations { testArtifacts.extendsFrom testRuntimeClasspath } +tasks.withType(Test) { + // fork a new test process for every test class + forkEvery = 10 +} + task testJar(type: Jar) { classifier "tests" from sourceSets.test.output diff --git a/finance/contracts/build.gradle b/finance/contracts/build.gradle index 384cf5e10a..1db0572bbf 100644 --- a/finance/contracts/build.gradle +++ b/finance/contracts/build.gradle @@ -31,8 +31,6 @@ configurations { jar { baseName 'corda-finance-contracts' - preserveFileTimestamps = false - reproducibleFileOrder = true manifest { attributes('Corda-Revision': 'n/a') attributes('Corda-Vendor': 'Corda Open Source') diff --git a/finance/workflows/build.gradle b/finance/workflows/build.gradle index 9885e5cc1f..4ccd18a4f8 100644 --- a/finance/workflows/build.gradle +++ b/finance/workflows/build.gradle @@ -70,8 +70,6 @@ artifacts { jar { baseName 'corda-finance-workflows' - preserveFileTimestamps = false - reproducibleFileOrder = true } cordapp { diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 28861d273a..5c2d1cf016 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 4e974715fd..ee69dd68d1 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index cccdd3d517..b0d6d0ab5d 100755 --- a/gradlew +++ b/gradlew @@ -1,5 +1,21 @@ #!/usr/bin/env sh +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + ############################################################################## ## ## Gradle start up script for UN*X @@ -28,7 +44,7 @@ APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" diff --git a/gradlew.bat b/gradlew.bat index e95643d6a2..15e1ee37a7 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem http://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome diff --git a/isolated/build.gradle b/isolated/build.gradle index 903384ed00..dbb1095c99 100644 --- a/isolated/build.gradle +++ b/isolated/build.gradle @@ -7,11 +7,6 @@ dependencies { cordaCompile project(':core') } -jar { - preserveFileTimestamps = false - reproducibleFileOrder = true -} - cordapp { targetPlatformVersion corda_platform_version.toInteger() minimumPlatformVersion 1 diff --git a/node/build.gradle b/node/build.gradle index 203d7d64b9..dce25c4719 100644 --- a/node/build.gradle +++ b/node/build.gradle @@ -212,6 +212,12 @@ tasks.withType(JavaCompile) { options.compilerArgs << '-proc:none' } +tasks.withType(Test) { + maxHeapSize = "2g" + // fork a new test process for every test class + forkEvery = 10 +} + task integrationTest(type: Test) { testClassesDirs = sourceSets.integrationTest.output.classesDirs classpath = sourceSets.integrationTest.runtimeClasspath diff --git a/settings.gradle b/settings.gradle index 586a8b2ae5..d2589f6044 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,3 +1,12 @@ +pluginManagement { + ext.artifactory_contextUrl = 'https://software.r3.com/artifactory' + + repositories { + mavenLocal() + gradlePluginPortal() + maven { url "$artifactory_contextUrl/corda-dependencies" } + } +} // The project is named 'corda-project' and not 'corda' because if this is named the same as the // output JAR from the capsule then the buildCordaJAR task goes into an infinite loop. rootProject.name = 'corda-project' diff --git a/tools/demobench/build.gradle b/tools/demobench/build.gradle index 6f49779a74..3f9be21b8c 100644 --- a/tools/demobench/build.gradle +++ b/tools/demobench/build.gradle @@ -66,6 +66,7 @@ dependencies { // FontAwesomeFX: icons in the form of a font. compile "de.jensd:fontawesomefx-fontawesome:4.7.0-5" + compile 'de.jensd:fontawesomefx-commons:8.15' // JediTerm: the terminal emulator used in IntelliJ. We have forked it and tweaked it, see https://github.com/corda/jediterm compile ':terminal-331a005d6793e52cefc9e2cec6774e62d5a546b1' diff --git a/tools/explorer/build.gradle b/tools/explorer/build.gradle index 3c60f92709..806613af6e 100644 --- a/tools/explorer/build.gradle +++ b/tools/explorer/build.gradle @@ -35,6 +35,7 @@ dependencies { // FontAwesomeFX: The "FontAwesome" icon library. compile 'de.jensd:fontawesomefx-fontawesome:4.7.0' + compile 'de.jensd:fontawesomefx-commons:8.13' // ReactFX: Functional reactive UI programming. compile 'org.reactfx:reactfx:2.0-M5' @@ -67,4 +68,4 @@ jar { 'Automatic-Module-Name': 'net.corda.tools.explorer' ) } -} +} \ No newline at end of file