Create ir/backend.js module with dummy compiler

This commit is contained in:
Zalim Bashorov
2018-03-12 22:17:52 +03:00
parent f820b3eadd
commit bef7b5389b
5 changed files with 42 additions and 0 deletions
+1
View File
@@ -190,6 +190,7 @@ extra["compilerModules"] = arrayOf(
":compiler:daemon",
":compiler:ir.tree",
":compiler:ir.psi2ir",
":compiler:backend.js",
":compiler:backend-common",
":compiler:backend",
":compiler:plugin-api",
+22
View File
@@ -0,0 +1,22 @@
plugins { kotlin("jvm") }
apply { plugin("jps-compatible") }
jvmTarget = "1.6"
dependencies {
compile(project(":compiler:util"))
compile(project(":compiler:frontend"))
compile(project(":compiler:backend-common"))
compile(project(":compiler:ir.tree"))
compile(project(":compiler:ir.psi2ir"))
compile(project(":js:js.ast"))
compile(project(":js:js.frontend"))
compileOnly(intellijCoreDep()) { includeJars("intellij-core") }
}
sourceSets {
"main" { projectDefault() }
"test" {}
}
@@ -0,0 +1,16 @@
/*
* Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
* that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.ir.backend.js
import org.jetbrains.kotlin.psi.KtFile
// Dummy compile function to work on the test infrastructure
fun compile(
files: List<KtFile>
): String {
if (files.none { it.name == "nestedPackage.kt" }) return ""
return "function box() { return \"OK\"; }"
}
+1
View File
@@ -25,6 +25,7 @@ dependencies {
testCompileOnly(project(":compiler:util"))
testCompile(intellijCoreDep()) { includeJars("intellij-core") }
testCompileOnly(intellijDep()) { includeJars("openapi", "idea", "idea_rt", "util") }
testCompile(project(":compiler:backend.js"))
testCompile(project(":js:js.translator"))
testCompile(project(":js:js.serializer"))
testCompile(project(":js:js.dce"))
+2
View File
@@ -32,6 +32,7 @@ include ":kotlin-build-common",
":compiler:ir.tree",
":compiler:ir.psi2ir",
":compiler:ir.ir2cfg",
":compiler:backend.js",
":compiler:backend-common",
":compiler:backend",
":compiler:plugin-api",
@@ -204,6 +205,7 @@ project(':kotlin-ant').projectDir = "$rootDir/ant" as File
project(':compiler:ir.tree').projectDir = "$rootDir/compiler/ir/ir.tree" as File
project(':compiler:ir.psi2ir').projectDir = "$rootDir/compiler/ir/ir.psi2ir" as File
project(':compiler:ir.ir2cfg').projectDir = "$rootDir/compiler/ir/ir.ir2cfg" as File
project(':compiler:backend.js').projectDir = "$rootDir/compiler/ir/backend.js" as File
project(':kotlin-jps-plugin').projectDir = "$rootDir/prepare/jps-plugin" as File
project(':idea:idea-android-output-parser').projectDir = "$rootDir/idea/idea-android/idea-android-output-parser" as File
project(':plugins:android-extensions-compiler').projectDir = "$rootDir/plugins/android-extensions/android-extensions-compiler" as File