diff --git a/build.gradle b/build.gradle index e4c1684e12..8cbb168b6f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ buildscript { // For sharing constants between builds Properties constants = new Properties() - file("constants.properties").withInputStream { constants.load(it) } + file("$projectDir/constants.properties").withInputStream { constants.load(it) } // Our version: bump this on release. ext.corda_version = "0.10-SNAPSHOT" @@ -10,7 +10,7 @@ buildscript { // Dependency versions. Can run 'gradle dependencyUpdates' to find new versions of things. // // TODO: Sort this alphabetically. - ext.kotlin_version = '1.1.1' + ext.kotlin_version = constants.getProperty("kotlinVersion") ext.quasar_version = '0.7.6' // TODO: Upgrade to 0.7.7+ when Quasar bug 238 is resolved. ext.asm_version = '0.5.3' ext.artemis_version = '1.5.3' diff --git a/client/jackson/build.gradle b/client/jackson/build.gradle index d55a3104de..9a7f6a6306 100644 --- a/client/jackson/build.gradle +++ b/client/jackson/build.gradle @@ -4,7 +4,7 @@ apply plugin: 'net.corda.plugins.publish-utils' dependencies { compile project(':core') - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" // Jackson and its plugins: parsing to/from JSON and other textual formats. diff --git a/client/jfx/src/main/kotlin/net/corda/client/jfx/model/ContractStateModel.kt b/client/jfx/src/main/kotlin/net/corda/client/jfx/model/ContractStateModel.kt index 4ed8c99ca5..6fe987b12f 100644 --- a/client/jfx/src/main/kotlin/net/corda/client/jfx/model/ContractStateModel.kt +++ b/client/jfx/src/main/kotlin/net/corda/client/jfx/model/ContractStateModel.kt @@ -2,7 +2,6 @@ package net.corda.client.jfx.model import javafx.collections.FXCollections import javafx.collections.ObservableList -import kotlinx.support.jdk8.collections.removeIf import net.corda.client.jfx.utils.fold import net.corda.client.jfx.utils.map import net.corda.contracts.asset.Cash diff --git a/client/jfx/src/main/kotlin/net/corda/client/jfx/model/NetworkIdentityModel.kt b/client/jfx/src/main/kotlin/net/corda/client/jfx/model/NetworkIdentityModel.kt index bbf7a2f42d..501eeed015 100644 --- a/client/jfx/src/main/kotlin/net/corda/client/jfx/model/NetworkIdentityModel.kt +++ b/client/jfx/src/main/kotlin/net/corda/client/jfx/model/NetworkIdentityModel.kt @@ -3,7 +3,6 @@ package net.corda.client.jfx.model import javafx.beans.value.ObservableValue import javafx.collections.FXCollections import javafx.collections.ObservableList -import kotlinx.support.jdk8.collections.removeIf import net.corda.client.jfx.utils.firstOrDefault import net.corda.client.jfx.utils.firstOrNullObservable import net.corda.client.jfx.utils.fold diff --git a/client/jfx/src/main/kotlin/net/corda/client/jfx/utils/AmountBindings.kt b/client/jfx/src/main/kotlin/net/corda/client/jfx/utils/AmountBindings.kt index ad233db5e1..acaaae381b 100644 --- a/client/jfx/src/main/kotlin/net/corda/client/jfx/utils/AmountBindings.kt +++ b/client/jfx/src/main/kotlin/net/corda/client/jfx/utils/AmountBindings.kt @@ -3,7 +3,6 @@ package net.corda.client.jfx.utils import javafx.beans.binding.Bindings import javafx.beans.value.ObservableValue import javafx.collections.ObservableList -import kotlinx.support.jdk8.collections.stream import net.corda.client.jfx.model.ExchangeRate import net.corda.core.contracts.Amount import org.fxmisc.easybind.EasyBind diff --git a/constants.properties b/constants.properties index 305d4edf02..8f38d6e077 100644 --- a/constants.properties +++ b/constants.properties @@ -1,2 +1,3 @@ gradlePluginsVersion=0.10.2 -guavaVersion=21.0 \ No newline at end of file +kotlinVersion=1.1.1 +guavaVersion=21.0 diff --git a/core/build.gradle b/core/build.gradle index 5ef7a6e896..cda93dfc3c 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -30,9 +30,8 @@ dependencies { testCompile project(":node") testCompile project(":test-utils") - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "org.jetbrains.kotlinx:kotlinx-support-jdk8:0.3" testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" // Thread safety annotations diff --git a/core/src/main/kotlin/net/corda/core/Utils.kt b/core/src/main/kotlin/net/corda/core/Utils.kt index 2d2b19befc..b0b437d642 100644 --- a/core/src/main/kotlin/net/corda/core/Utils.kt +++ b/core/src/main/kotlin/net/corda/core/Utils.kt @@ -7,7 +7,6 @@ import com.google.common.base.Function import com.google.common.base.Throwables import com.google.common.io.ByteStreams import com.google.common.util.concurrent.* -import kotlinx.support.jdk7.use import net.corda.core.crypto.newSecureRandom import net.corda.core.serialization.CordaSerializable import org.slf4j.Logger diff --git a/gradle-plugins/build.gradle b/gradle-plugins/build.gradle index 59eabc9f26..4086427a4f 100644 --- a/gradle-plugins/build.gradle +++ b/gradle-plugins/build.gradle @@ -4,7 +4,7 @@ buildscript { // For sharing constants between builds Properties constants = new Properties() - file("../constants.properties").withInputStream { constants.load(it) } + file("$projectDir/../constants.properties").withInputStream { constants.load(it) } // If you bump this version you must re-bootstrap the codebase. See the README for more information. ext.gradle_plugins_version = constants.getProperty("gradlePluginsVersion") diff --git a/gradle-plugins/cordformation/build.gradle b/gradle-plugins/cordformation/build.gradle index 007a1553b5..3b95f138a8 100644 --- a/gradle-plugins/cordformation/build.gradle +++ b/gradle-plugins/cordformation/build.gradle @@ -1,6 +1,9 @@ buildscript { - // TODO: Unify with the one in the main project - ext.kotlin_version = '1.0.5-2' + // For sharing constants between builds + Properties constants = new Properties() + file("$projectDir/../../constants.properties").withInputStream { constants.load(it) } + + ext.kotlin_version = constants.getProperty("kotlinVersion") repositories { mavenCentral() @@ -39,7 +42,7 @@ dependencies { compile gradleApi() compile localGroovy() - noderunner "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + noderunner "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" // TypeSafe Config: for simple and human friendly config files. // TODO: Add a common versions file between Corda and gradle plugins to de-duplicate this version number @@ -59,4 +62,4 @@ jar { from(createNodeRunner) { rename { 'net/corda/plugins/runnodes.jar' } } -} \ No newline at end of file +} diff --git a/gradle-plugins/cordformation/src/noderunner/kotlin/net/corda/plugins/NodeRunner.kt b/gradle-plugins/cordformation/src/noderunner/kotlin/net/corda/plugins/NodeRunner.kt index 43bfd95334..c24bb016e1 100644 --- a/gradle-plugins/cordformation/src/noderunner/kotlin/net/corda/plugins/NodeRunner.kt +++ b/gradle-plugins/cordformation/src/noderunner/kotlin/net/corda/plugins/NodeRunner.kt @@ -71,7 +71,6 @@ private fun execJar(jarName: String, dir: File, args: List = listOf()): private fun execJarInTerminalWindow(jarName: String, dir: File, args: List = listOf()): Process { val javaCmd = "java -jar $jarName " + args.joinToString(" ") { it } val nodeName = "${dir.toPath().fileName} $jarName" - val osName = System.getProperty("os.name", "generic").toLowerCase(Locale.ENGLISH) val builder = when (os) { OS.MACOS -> ProcessBuilder( "osascript", "-e", @@ -100,4 +99,4 @@ end tell""" } } return builder.directory(dir).start() -} \ No newline at end of file +} diff --git a/node-api/build.gradle b/node-api/build.gradle index 3dc8a7bb75..b13820e6c2 100644 --- a/node-api/build.gradle +++ b/node-api/build.gradle @@ -26,9 +26,8 @@ sourceSets { dependencies { compile project(":core") - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "org.jetbrains.kotlinx:kotlinx-support-jdk8:0.3" testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" compile "org.apache.activemq:artemis-core-client:${artemis_version}" compile "org.apache.activemq:artemis-commons:${artemis_version}" @@ -45,4 +44,4 @@ configurations.compile { // We want to use SLF4J's version of these binding: jcl-over-slf4j // Remove any transitive dependency on Apache's version. exclude group: 'commons-logging', module: 'commons-logging' -} \ No newline at end of file +} diff --git a/node/build.gradle b/node/build.gradle index 2510936ed4..2fb317498d 100644 --- a/node/build.gradle +++ b/node/build.gradle @@ -66,7 +66,7 @@ dependencies { compile "org.apache.logging.log4j:log4j-slf4j-impl:${log4j_version}" compile "org.apache.logging.log4j:log4j-web:${log4j_version}" - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" diff --git a/node/src/integration-test/kotlin/net/corda/services/messaging/P2PSecurityTest.kt b/node/src/integration-test/kotlin/net/corda/services/messaging/P2PSecurityTest.kt index 677e0363dc..77f488bcbe 100644 --- a/node/src/integration-test/kotlin/net/corda/services/messaging/P2PSecurityTest.kt +++ b/node/src/integration-test/kotlin/net/corda/services/messaging/P2PSecurityTest.kt @@ -1,7 +1,6 @@ package net.corda.services.messaging import com.google.common.util.concurrent.ListenableFuture -import kotlinx.support.jdk7.use import net.corda.core.crypto.Party import net.corda.core.div import net.corda.core.getOrThrow diff --git a/node/src/main/kotlin/net/corda/node/services/schema/HibernateObserver.kt b/node/src/main/kotlin/net/corda/node/services/schema/HibernateObserver.kt index 1e80a8b29a..73a3ae3016 100644 --- a/node/src/main/kotlin/net/corda/node/services/schema/HibernateObserver.kt +++ b/node/src/main/kotlin/net/corda/node/services/schema/HibernateObserver.kt @@ -1,6 +1,5 @@ package net.corda.node.services.schema -import kotlinx.support.jdk7.use import net.corda.core.contracts.ContractState import net.corda.core.contracts.StateAndRef import net.corda.core.contracts.StateRef diff --git a/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineManager.kt b/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineManager.kt index 1f04e0a332..3693a58b89 100644 --- a/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineManager.kt +++ b/node/src/main/kotlin/net/corda/node/services/statemachine/StateMachineManager.kt @@ -9,7 +9,6 @@ import com.esotericsoftware.kryo.Kryo import com.esotericsoftware.kryo.pool.KryoPool import com.google.common.collect.HashMultimap import com.google.common.util.concurrent.ListenableFuture -import kotlinx.support.jdk8.collections.removeIf import net.corda.core.ThreadBox import net.corda.core.bufferUntilSubscribed import net.corda.core.crypto.Party diff --git a/samples/attachment-demo/build.gradle b/samples/attachment-demo/build.gradle index 812a9d5b5c..39296704d0 100644 --- a/samples/attachment-demo/build.gradle +++ b/samples/attachment-demo/build.gradle @@ -32,7 +32,7 @@ configurations { } dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" testCompile "junit:junit:$junit_version" // Corda integration dependencies diff --git a/samples/bank-of-corda-demo/build.gradle b/samples/bank-of-corda-demo/build.gradle index 60f24fb61a..bf203564a5 100644 --- a/samples/bank-of-corda-demo/build.gradle +++ b/samples/bank-of-corda-demo/build.gradle @@ -32,7 +32,7 @@ configurations { } dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" testCompile "junit:junit:$junit_version" // Corda integration dependencies diff --git a/samples/irs-demo/build.gradle b/samples/irs-demo/build.gradle index beda652c6f..573a4beb47 100644 --- a/samples/irs-demo/build.gradle +++ b/samples/irs-demo/build.gradle @@ -35,7 +35,7 @@ configurations { } dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" testCompile "junit:junit:$junit_version" // Corda integration dependencies diff --git a/samples/network-visualiser/build.gradle b/samples/network-visualiser/build.gradle index 6046f94e2a..1eb18c071e 100644 --- a/samples/network-visualiser/build.gradle +++ b/samples/network-visualiser/build.gradle @@ -8,7 +8,7 @@ apply plugin: 'us.kirchmeier.capsule' dependencies { compile project(':samples:irs-demo') - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" testCompile "junit:junit:$junit_version" // Corda integration dependencies diff --git a/samples/raft-notary-demo/build.gradle b/samples/raft-notary-demo/build.gradle index 7ce48eba28..c28b7b9a77 100644 --- a/samples/raft-notary-demo/build.gradle +++ b/samples/raft-notary-demo/build.gradle @@ -32,7 +32,7 @@ configurations { } dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" testCompile "junit:junit:$junit_version" // Corda integration dependencies diff --git a/samples/simm-valuation-demo/build.gradle b/samples/simm-valuation-demo/build.gradle index a8c8a32cb7..912f9f24cd 100644 --- a/samples/simm-valuation-demo/build.gradle +++ b/samples/simm-valuation-demo/build.gradle @@ -36,7 +36,7 @@ configurations { } dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" testCompile "junit:junit:$junit_version" // Corda integration dependencies diff --git a/samples/simm-valuation-demo/src/test/kotlin/net/corda/vega/SwapExample.kt b/samples/simm-valuation-demo/src/test/kotlin/net/corda/vega/SwapExample.kt index b66331cad3..d6005f045b 100644 --- a/samples/simm-valuation-demo/src/test/kotlin/net/corda/vega/SwapExample.kt +++ b/samples/simm-valuation-demo/src/test/kotlin/net/corda/vega/SwapExample.kt @@ -29,7 +29,6 @@ import com.opengamma.strata.product.common.BuySell import com.opengamma.strata.product.swap.ResolvedSwapTrade import com.opengamma.strata.product.swap.SwapTrade import com.opengamma.strata.product.swap.type.FixedIborSwapConventions -import kotlinx.support.jdk8.collections.stream import net.corda.core.serialization.deserialize import net.corda.core.serialization.serialize import net.corda.vega.analytics.BimmAnalysisUtils diff --git a/samples/trader-demo/build.gradle b/samples/trader-demo/build.gradle index c28aeab6a0..c165f74f7a 100644 --- a/samples/trader-demo/build.gradle +++ b/samples/trader-demo/build.gradle @@ -32,7 +32,7 @@ configurations { } dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" testCompile "junit:junit:$junit_version" // Corda integration dependencies diff --git a/test-utils/build.gradle b/test-utils/build.gradle index 8830b7e969..fb27cd22bf 100644 --- a/test-utils/build.gradle +++ b/test-utils/build.gradle @@ -17,7 +17,7 @@ dependencies { compile project(':node:webserver') compile project(':verifier') - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" diff --git a/tools/demobench/src/main/kotlin/net/corda/demobench/profile/ProfileController.kt b/tools/demobench/src/main/kotlin/net/corda/demobench/profile/ProfileController.kt index 0d32a2b396..74f4e44b15 100644 --- a/tools/demobench/src/main/kotlin/net/corda/demobench/profile/ProfileController.kt +++ b/tools/demobench/src/main/kotlin/net/corda/demobench/profile/ProfileController.kt @@ -13,7 +13,6 @@ import java.util.logging.Level import java.util.stream.StreamSupport import javafx.stage.FileChooser import javafx.stage.FileChooser.ExtensionFilter -import kotlinx.support.jdk8.collections.spliterator import net.corda.demobench.model.* import net.corda.demobench.plugin.PluginController import net.corda.demobench.plugin.inPluginsDir diff --git a/tools/explorer/build.gradle b/tools/explorer/build.gradle index c1ac163b0d..9112f0dcc9 100644 --- a/tools/explorer/build.gradle +++ b/tools/explorer/build.gradle @@ -26,7 +26,7 @@ sourceSets { } dependencies { - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" testCompile "junit:junit:$junit_version" diff --git a/tools/loadtest/src/main/kotlin/net/corda/loadtest/ConnectionManager.kt b/tools/loadtest/src/main/kotlin/net/corda/loadtest/ConnectionManager.kt index c72721ac34..87d2b54f2d 100644 --- a/tools/loadtest/src/main/kotlin/net/corda/loadtest/ConnectionManager.kt +++ b/tools/loadtest/src/main/kotlin/net/corda/loadtest/ConnectionManager.kt @@ -5,8 +5,7 @@ import com.jcraft.jsch.* import com.jcraft.jsch.agentproxy.AgentProxy import com.jcraft.jsch.agentproxy.connector.SSHAgentConnector import com.jcraft.jsch.agentproxy.usocket.JNAUSocketFactory -import kotlinx.support.jdk8.collections.parallelStream -import kotlinx.support.jdk8.streams.toList +import kotlin.streams.toList import net.corda.client.rpc.CordaRPCClient import net.corda.core.messaging.CordaRPCOps import net.corda.node.driver.PortAllocation diff --git a/tools/loadtest/src/main/kotlin/net/corda/loadtest/LoadTest.kt b/tools/loadtest/src/main/kotlin/net/corda/loadtest/LoadTest.kt index ba67dff6cf..d6616809e1 100644 --- a/tools/loadtest/src/main/kotlin/net/corda/loadtest/LoadTest.kt +++ b/tools/loadtest/src/main/kotlin/net/corda/loadtest/LoadTest.kt @@ -1,6 +1,5 @@ package net.corda.loadtest -import kotlinx.support.jdk8.collections.parallelStream import net.corda.client.mock.Generator import net.corda.core.div import net.corda.node.driver.PortAllocation diff --git a/verifier/build.gradle b/verifier/build.gradle index 3c782996b6..28ce49d2bb 100644 --- a/verifier/build.gradle +++ b/verifier/build.gradle @@ -33,9 +33,8 @@ sourceSets { dependencies { compile project(":node-api") - compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version" - compile "org.jetbrains.kotlinx:kotlinx-support-jdk8:0.3" testCompile "org.jetbrains.kotlin:kotlin-test:$kotlin_version" compile "org.apache.activemq:artemis-core-client:${artemis_version}"