From e3e3fcded1ffcf457f902ca8f02afa03af1b7c20 Mon Sep 17 00:00:00 2001 From: Roman Artemev Date: Tue, 5 Mar 2019 14:44:14 +0300 Subject: [PATCH] Fix windows j2v8 artifact --- js/js.tests/build.gradle.kts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/js/js.tests/build.gradle.kts b/js/js.tests/build.gradle.kts index 94fe713c66a..2484f0b7c48 100644 --- a/js/js.tests/build.gradle.kts +++ b/js/js.tests/build.gradle.kts @@ -43,11 +43,16 @@ dependencies { testRuntime(project(":compiler:backend-common")) testRuntime(commonDep("org.fusesource.jansi", "jansi")) + val currentOs = OperatingSystem.current() + when { - OperatingSystem.current().isWindows() -> testCompile("com.eclipsesource.j2v8:j2v8_win32_x86:4.6.0") - OperatingSystem.current().isLinux() -> testCompile("com.eclipsesource.j2v8:j2v8_linux_x86_64:4.8.0") - OperatingSystem.current().isMacOsX() -> testCompile("com.eclipsesource.j2v8:j2v8_macosx_x86_64:4.6.0") - else -> logger.error("unsupported platform - can not compile com.eclipsesource.j2v8 dependency") + currentOs.isWindows -> { + val suffix = if (currentOs.toString().endsWith("64")) "_64" else "" + testCompile("com.eclipsesource.j2v8:j2v8_win32_x86$suffix:4.6.0") + } + currentOs.isMacOsX -> testCompile("com.eclipsesource.j2v8:j2v8_macosx_x86_64:4.6.0") + currentOs.run { isLinux || isUnix } -> testCompile("com.eclipsesource.j2v8:j2v8_linux_x86_64:4.8.0") + else -> logger.error("unsupported platform $currentOs - can not compile com.eclipsesource.j2v8 dependency") } antLauncherJar(commonDep("org.apache.ant", "ant"))