diff --git a/build.gradle b/build.gradle index b4fe7f4073..45d0ce3a92 100644 --- a/build.gradle +++ b/build.gradle @@ -91,6 +91,11 @@ dependencies { compile("com.intellij:forms_rt:7.0.3") { exclude group: "asm" } + + // Force commons logging to version 1.2 to override Artemis, which pulls in 1.1.3 (ARTEMIS-424) + compile("commons-logging:commons-logging:1.2") { + force = true + } } // These lines tell Gradle to add a couple of JVM command line arguments to unit test and program runs, which set up diff --git a/core/build.gradle b/core/build.gradle index 33730ea5f9..a159947089 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -42,5 +42,9 @@ dependencies { compile "io.reactivex:rxkotlin:0.40.1" // Quasar: for the bytecode rewriting for state machines. - compile("co.paralleluniverse:quasar-core:${quasar_version}:jdk8") + compile "co.paralleluniverse:quasar-core:${quasar_version}:jdk8" + + // Apache JEXL: An embeddable expression evaluation library. + // This may be temporary until we experiment with other ways to do on-the-fly contract specialisation via an API. + compile "org.apache.commons:commons-jexl3:3.0" } diff --git a/core/src/test/kotlin/core/utilities/EmbeddedExpressionsTest.kt b/core/src/test/kotlin/core/utilities/EmbeddedExpressionsTest.kt new file mode 100644 index 0000000000..356523d58b --- /dev/null +++ b/core/src/test/kotlin/core/utilities/EmbeddedExpressionsTest.kt @@ -0,0 +1,23 @@ +/* + * Copyright 2015 Distributed Ledger Group LLC. Distributed as Licensed Company IP to DLG Group Members + * pursuant to the August 7, 2015 Advisory Services Agreement and subject to the Company IP License terms + * set forth therein. + * + * All other rights reserved. + */ + +package core.utilities + +import org.apache.commons.jexl3.JexlBuilder +import org.apache.commons.jexl3.MapContext +import org.junit.Test +import kotlin.test.assertEquals + +class EmbeddedExpressionsTest { + @Test + fun basic() { + val jexl = JexlBuilder().create() + val result = jexl.createExpression("2 + 2").evaluate(MapContext()) + assertEquals(4, result) + } +} \ No newline at end of file