diff --git a/build.xml b/build.xml
index cab8bd8cd2b..1438501c068 100644
--- a/build.xml
+++ b/build.xml
@@ -284,6 +284,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/renameImportJet.kt b/renameImportJet.kt
new file mode 100644
index 00000000000..25f4f988002
--- /dev/null
+++ b/renameImportJet.kt
@@ -0,0 +1,34 @@
+import java.io.File
+import com.intellij.util.Processor
+import com.intellij.openapi.util.io.FileUtil
+import java.util.ArrayList
+
+fun main(args: Array) {
+ println("renameImportJet")
+
+ fun processFile(file: File) {
+ if (!file.getName().endsWith(".java") || file.isDirectory()) return
+
+ val lines = ArrayList()
+ var rewrite = false
+ file.reader().forEachLine { line ->
+ if (line.startsWith("import jet.") && !line.startsWith("import jet.runtime.typeinfo")) {
+ lines.add("import kotlin." + line.substring("import jet.".length))
+ rewrite = true
+ }
+ else {
+ lines.add(line)
+ }
+ }
+
+ if (rewrite) {
+ println("renaming imports in $file")
+ file.writeText(lines reduce { (a, b) -> "$a\n$b" })
+ }
+ }
+
+ val processor = Processor { if (it != null) processFile(it); true }
+ val directoryFilter = Processor { it?.getName() != "testData" }
+
+ FileUtil.processFilesRecursively(File("."), processor, directoryFilter)
+}