From 71cd881d0a3ab70860e6fa13a7b62546edd10bec Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Fri, 1 Sep 2017 01:53:27 +0200 Subject: Finish basic implementation of simulator This change introduces a basic coroutine-based simulator implementation. The simulator currently misses the crucial ability to send messages over channels, which will be implemented in later commits. --- opendc-core/build.gradle | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'opendc-core/build.gradle') diff --git a/opendc-core/build.gradle b/opendc-core/build.gradle index 05448aae..f2999d82 100644 --- a/opendc-core/build.gradle +++ b/opendc-core/build.gradle @@ -21,8 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ + +/* Build configuration */ buildscript { - ext.kotlin_version = '1.1.3-2' + ext.kotlin_version = '1.1.4-3' + ext.kotlin_version = '1.1.4' repositories { mavenCentral() @@ -30,20 +33,31 @@ buildscript { dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.0-RC3' } } plugins { id 'java' - id 'org.jetbrains.kotlin.jvm' version '1.1.3' + id 'org.jetbrains.kotlin.jvm' version '1.1.4' } +apply plugin: 'org.junit.platform.gradle.plugin' +apply plugin: 'kotlin' + tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { kotlinOptions { jvmTarget = "1.8" } } +kotlin { + experimental { + coroutines 'enable' + } +} + +/* Project configuration */ group 'nl.atlarge.opendc' version '1.0' @@ -53,4 +67,19 @@ repositories { dependencies { compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" + compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.18' + + testCompile "org.junit.jupiter:junit-jupiter-api:5.0.0-RC3" + testRuntime "org.junit.jupiter:junit-jupiter-engine:5.0.0-RC3" + compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version" +} +compileKotlin { + kotlinOptions { + jvmTarget = "1.8" + } +} +compileTestKotlin { + kotlinOptions { + jvmTarget = "1.8" + } } -- cgit v1.2.3