diff --git a/build.gradle b/build.gradle index 29dc5d0533..f25bd52f8e 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { file("$projectDir/constants.properties").withInputStream { constants.load(it) } // Our version: bump this on release. - ext.corda_release_version = "5.0-SNAPSHOT" + ext.corda_release_version = constants.getProperty("cordaVersion") ext.corda_platform_version = constants.getProperty("platformVersion") ext.gradle_plugins_version = constants.getProperty("gradlePluginsVersion") @@ -14,7 +14,7 @@ buildscript { ext.kotlin_version = constants.getProperty("kotlinVersion") ext.quasar_group = 'co.paralleluniverse' - ext.quasar_version = '0.7.10' + ext.quasar_version = constants.getProperty("quasarVersion") // gradle-capsule-plugin:1.0.2 contains capsule:1.0.1 by default. // We must configure it manually to use the latest capsule version. @@ -81,7 +81,7 @@ buildscript { // Update 121 is required for ObjectInputFilter. // Updates [131, 161] also have zip compression bugs on MacOS (High Sierra). // when the java version in NodeStartup.hasMinimumJavaVersion() changes, so must this check - ext.java8_minUpdateVersion = '171' + ext.java8_minUpdateVersion = constants.getProperty('java8MinUpdateVersion') repositories { mavenLocal() diff --git a/constants.properties b/constants.properties index fe57487de0..869bc9cc21 100644 --- a/constants.properties +++ b/constants.properties @@ -1,11 +1,18 @@ +# This file is parsed from Python in the docs/source/conf.py file +# because some versions here need to be matched by app authors in +# their own projects. So don't get fancy with syntax! + +cordaVersion=5.0-SNAPSHOT gradlePluginsVersion=4.0.42 kotlinVersion=1.2.71 +java8MinUpdateVersion=171 # ***************************************************************# # When incrementing platformVersion make sure to update # # net.corda.core.internal.CordaUtilsKt.PLATFORM_VERSION as well. # # ***************************************************************# platformVersion=5 guavaVersion=25.1-jre +quasarVersion=0.7.10 proguardVersion=6.0.3 bouncycastleVersion=1.60 disruptorVersion=3.4.2 diff --git a/docs/source/app-upgrade-notes.rst b/docs/source/app-upgrade-notes.rst index 96a7814736..ddd9d9aa6b 100644 --- a/docs/source/app-upgrade-notes.rst +++ b/docs/source/app-upgrade-notes.rst @@ -37,12 +37,12 @@ Step 2. Adjust the version numbers in your Gradle build files Alter the versions you depend on in your Gradle file like so: -.. sourcecode:: groovy +.. parsed-literal:: - ext.corda_release_version = '4.0' - ext.corda_gradle_plugins_version = '4.0.38' - ext.kotlin_version = '1.2.71' - ext.quasar_version = '0.7.10' + ext.corda_release_version = '|corda_version|' + ext.corda_gradle_plugins_version = '|gradle_plugins_version|' + ext.kotlin_version = '|kotlin_version|' + ext.quasar_version = '|quasar_version|' .. note:: You may wish to update your kotlinOptions to use language level 1.2, to benefit from the new features. Apps targeting Corda 4 may not at this time use Kotlin 1.3, as it was released too late in the development cycle diff --git a/docs/source/conf.py b/docs/source/conf.py index 0516f279ed..95e9626abb 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -7,10 +7,21 @@ import sys, os # # TEXT SUBSTITUTIONS +with open("../../constants.properties", "r") as f: + constants_properties_lines = f.readlines() +constants_properties_dict = dict([l.strip().split('=') for l in constants_properties_lines if not l.startswith("#") and not l.strip() == ""]) + rst_epilog = """ -.. |java_version| replace:: 8u171 -.. |kotlin_version| replace:: 1.2.71 -""" +.. |java_version| replace:: 8u%s +.. |kotlin_version| replace:: %s +.. |gradle_plugins_version| replace:: %s +.. |quasar_version| replace:: %s +.. |corda_version| replace:: %s +""" % (constants_properties_dict["java8MinUpdateVersion"], + constants_properties_dict["kotlinVersion"], + constants_properties_dict["gradlePluginsVersion"], + constants_properties_dict["quasarVersion"], + constants_properties_dict["cordaVersion"]) ############################################################################ diff --git a/docs/source/cordapp-build-systems.rst b/docs/source/cordapp-build-systems.rst index 07da3debc7..19d9cada6e 100644 --- a/docs/source/cordapp-build-systems.rst +++ b/docs/source/cordapp-build-systems.rst @@ -9,7 +9,7 @@ Building and installing a CorDapp .. contents:: -Cordapps run on the Corda platform and integrate with it and each other. This article explains how to build CorDapps. +CorDapps run on the Corda platform and integrate with it and each other. This article explains how to build CorDapps. To learn what a CorDapp is, please read :doc:`cordapp-overview`. CorDapp format @@ -45,29 +45,22 @@ Setting your dependencies Choosing your Corda, Quasar and Kotlin versions ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Several ``ext`` variables are used in a CorDapp's ``build.gradle`` file to define which versions are used to build your CorDapp: +Several ``ext`` variables are used in a CorDapp's ``build.gradle`` file to define version numbers that should match the version of +Corda you're developing against: -* ``ext.corda_release_version`` defines the version of Corda +* ``ext.corda_release_version`` defines the version of Corda itself * ``ext.corda_gradle_plugins_version`` defines the version of the Corda Gradle Plugins -* ``ext.quasar_version`` defines the version of Quasar +* ``ext.quasar_version`` defines the version of Quasar, a library that we use to implement the flow framework * ``ext.kotlin_version`` defines the version of Kotlin (if using Kotlin to write your CorDapp) -``corda_gradle_plugins_versions`` are given in the form ``major.minor.patch``. You should use the same ``major`` and -``minor`` versions as the Corda version you are using, and the latest ``patch`` version. A list of all the available -versions can be found here: https://bintray.com/r3/corda/cordapp. If in doubt, you should base yourself on the version -numbers used in the ``build.gradle`` file of the -`Kotlin CorDapp Template <https://github.com/corda/cordapp-template-kotlin>`_ and the -`Java CorDapp Template <https://github.com/corda/cordapp-template-java>`_. +The current versions used are as follows: -For example, to use version 3.0 of Corda, version 3.0.8 of the Corda gradle plugins, version 0.7.9 of Quasar, and -version 1.1.60 of Kotlin, you'd write: +.. parsed-literal:: -.. sourcecode:: groovy - - ext.corda_release_version = 'corda-3.0' - ext.corda_gradle_plugins_version = '3.0.8' - ext.quasar_version = '0.7.9' - ext.kotlin_version = '1.1.60' + ext.corda_release_version = '|corda_version|' + ext.corda_gradle_plugins_version = '|gradle_plugins_version|' + ext.quasar_version = '|quasar_version|' + ext.kotlin_version = '|kotlin_version|' In certain cases, you may also wish to build against the unstable Master branch. See :doc:`building-against-master`. diff --git a/docs/source/getting-set-up.rst b/docs/source/getting-set-up.rst index 7e727046fb..bd397b3cf0 100644 --- a/docs/source/getting-set-up.rst +++ b/docs/source/getting-set-up.rst @@ -6,7 +6,7 @@ Software requirements Corda uses industry-standard tools: -* **Java 8 JVM** - we require at least version **|java_version|**, but do not currently support Java 9 or higher. +* **Java 8 JVM** - we require at least version |java_version|, but do not currently support Java 9 or higher. We have tested with Oracle JDK, Amazon Corretto, and Red Hat's OpenJDK builds. Please note that OpenJDK builds usually exclude JavaFX, which our GUI tools require. * **IntelliJ IDEA** - supported versions **2017.x** and **2018.x** (with Kotlin plugin version |kotlin_version|) diff --git a/node/build.gradle b/node/build.gradle index 56dc13295a..a536c9f275 100644 --- a/node/build.gradle +++ b/node/build.gradle @@ -217,4 +217,4 @@ jar { publish { name jar.baseName -} +} \ No newline at end of file