diff --git a/.idea/artifacts/KotlinBarePlugin.xml b/.idea/artifacts/KotlinBarePlugin.xml
new file mode 100644
index 00000000000..4dc7ce7bd47
--- /dev/null
+++ b/.idea/artifacts/KotlinBarePlugin.xml
@@ -0,0 +1,37 @@
+
+
+ $PROJECT_DIR$/out/artifacts
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
index d56e6d3330e..f5b93a84a7c 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -7,6 +7,7 @@
+
diff --git a/jps-plugin/bare-plugin/bare-plugin.iml b/jps-plugin/bare-plugin/bare-plugin.iml
new file mode 100644
index 00000000000..80ba7107224
--- /dev/null
+++ b/jps-plugin/bare-plugin/bare-plugin.iml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/jps-plugin/bare-plugin/src/META-INF/plugin.xml b/jps-plugin/bare-plugin/src/META-INF/plugin.xml
new file mode 100644
index 00000000000..8722daba9d2
--- /dev/null
+++ b/jps-plugin/bare-plugin/src/META-INF/plugin.xml
@@ -0,0 +1,22 @@
+
+ org.jetbrains.kotlin.bare
+
+ Kotlin Bare Compiler for IntelliJ IDEA
+
+ This plugin is intended for IntelliJ IDEA developers only. It should be installed along with main Kotlin plugin.
+ When main Kotlin plugin is disabled due to incompatibility with bleeding edge IntelliJ IDEA,
+ this plugin will still compile Kotlin sources.
+
+ This plugin is only capable of compiling Kotlin code. All highlighting, inspections, refactorings are disabled.
+
+ @snapshot@
+ JetBrains Inc.
+
+
+
+
+
+ org.jetbrains.jet.plugin.bare.BareJpsPluginRegistrar
+
+
+
diff --git a/jps-plugin/bare-plugin/src/org/jetbrains/jet/plugin/bare/BareJpsPluginRegistrar.kt b/jps-plugin/bare-plugin/src/org/jetbrains/jet/plugin/bare/BareJpsPluginRegistrar.kt
new file mode 100644
index 00000000000..e5f87180f9b
--- /dev/null
+++ b/jps-plugin/bare-plugin/src/org/jetbrains/jet/plugin/bare/BareJpsPluginRegistrar.kt
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2010-2014 JetBrains s.r.o.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jetbrains.jet.plugin.bare
+
+import com.intellij.compiler.server.CompileServerPlugin
+import com.intellij.ide.plugins.IdeaPluginDescriptor
+import com.intellij.ide.plugins.PluginManager
+import com.intellij.openapi.components.ApplicationComponent
+import com.intellij.openapi.extensions.Extensions
+import com.intellij.openapi.extensions.PluginId
+
+public class BareJpsPluginRegistrar : ApplicationComponent {
+ override fun initComponent() {
+ val mainKotlinPlugin = PluginManager.getPlugin(PluginId.getId("org.jetbrains.kotlin"))
+
+ if (mainKotlinPlugin != null && mainKotlinPlugin.isEnabled()) {
+ // do nothing
+ }
+ else {
+ val compileServerPlugin = CompileServerPlugin()
+ compileServerPlugin.setClasspath("jps/kotlin-jps-plugin.jar;kotlin-runtime.jar;kotlin-bare-plugin.jar")
+ compileServerPlugin.setPluginDescriptor(PluginManager.getPlugin(PluginId.getId("org.jetbrains.kotlin.bare")))
+
+ Extensions.getRootArea()
+ .getExtensionPoint(CompileServerPlugin.EP_NAME)
+ .registerExtension(compileServerPlugin)
+ }
+ }
+
+ override fun disposeComponent() {
+ }
+
+ override fun getComponentName(): String {
+ return javaClass.getName()
+ }
+}