Docs: use version numbers read from the build system, not duplicated.

This commit is contained in:
Mike Hearn 2019-03-07 13:13:18 +01:00
parent 1c38ecee7b
commit 785755067a
7 changed files with 42 additions and 31 deletions

View File

@ -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()

View File

@ -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

View File

@ -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

View File

@ -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"])
############################################################################

View File

@ -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`.

View File

@ -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|)

View File

@ -217,4 +217,4 @@ jar {
publish {
name jar.baseName
}
}