diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 1be8a5b2e25..13d6655cce8 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -5,6 +5,7 @@
+
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 4c80b02dfd9..b81f5f90b51 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -43,6 +43,7 @@
+
diff --git a/build.xml b/build.xml
index 89ef5929e3f..d3806597379 100644
--- a/build.xml
+++ b/build.xml
@@ -13,6 +13,7 @@
+
@@ -402,6 +403,15 @@
+
+
+
+
+
+
+
+
+
@@ -526,7 +536,7 @@
-libraryjars '${rtjar}'
-libraryjars '${jssejar}'
- -libraryjars '${bootstrap.runtime}'
+ -libraryjars '${bootstrap.runtime.minimal}'
-target 1.6
-dontoptimize
@@ -724,7 +734,6 @@
-
@@ -741,43 +750,97 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/core/reflection.stub.jvm/src/kotlin/reflect/jvm/KotlinReflectionNotSupportedError.java b/core/reflection.stub.jvm/src/kotlin/reflect/jvm/KotlinReflectionNotSupportedError.java
new file mode 100644
index 00000000000..5f7d347ff61
--- /dev/null
+++ b/core/reflection.stub.jvm/src/kotlin/reflect/jvm/KotlinReflectionNotSupportedError.java
@@ -0,0 +1,24 @@
+/*
+ * 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 kotlin.reflect.jvm;
+
+public class KotlinReflectionNotSupportedError extends Error {
+ public KotlinReflectionNotSupportedError() {
+ super("Kotlin reflection implementation is not found at runtime. " +
+ "Make sure you do have kotlin-runtime.jar and do not have kotlin-runtime-minimal.jar in the classpath");
+ }
+}
diff --git a/core/reflection.stub.jvm/src/kotlin/reflect/jvm/internal/InternalPackage.java b/core/reflection.stub.jvm/src/kotlin/reflect/jvm/internal/InternalPackage.java
new file mode 100644
index 00000000000..8c64f269f8d
--- /dev/null
+++ b/core/reflection.stub.jvm/src/kotlin/reflect/jvm/internal/InternalPackage.java
@@ -0,0 +1,33 @@
+/*
+ * 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 kotlin.reflect.jvm.internal;
+
+import kotlin.reflect.jvm.KotlinReflectionNotSupportedError;
+
+public class InternalPackage {
+ public static KClassImpl foreignKotlinClass(Class jClass) {
+ throw new KotlinReflectionNotSupportedError();
+ }
+
+ public static KClassImpl kClassFromKotlin(Class jClass) {
+ return null;
+ }
+
+ public static KPackageImpl kPackage(Class c) {
+ return null;
+ }
+}
diff --git a/core/reflection.stub.jvm/src/kotlin/reflect/jvm/internal/KClassImpl.java b/core/reflection.stub.jvm/src/kotlin/reflect/jvm/internal/KClassImpl.java
new file mode 100644
index 00000000000..002ad2c46bd
--- /dev/null
+++ b/core/reflection.stub.jvm/src/kotlin/reflect/jvm/internal/KClassImpl.java
@@ -0,0 +1,22 @@
+/*
+ * 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 kotlin.reflect.jvm.internal;
+
+import kotlin.reflect.KClass;
+
+public abstract class KClassImpl implements KClass {
+}
diff --git a/core/reflection.stub.jvm/src/kotlin/reflect/jvm/internal/KFunctionImpl.java b/core/reflection.stub.jvm/src/kotlin/reflect/jvm/internal/KFunctionImpl.java
new file mode 100644
index 00000000000..da07701c357
--- /dev/null
+++ b/core/reflection.stub.jvm/src/kotlin/reflect/jvm/internal/KFunctionImpl.java
@@ -0,0 +1,22 @@
+/*
+ * 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 kotlin.reflect.jvm.internal;
+
+import kotlin.jvm.internal.FunctionImpl;
+
+public abstract class KFunctionImpl extends FunctionImpl {
+}
diff --git a/core/reflection.stub.jvm/src/kotlin/reflect/jvm/internal/KPackageImpl.java b/core/reflection.stub.jvm/src/kotlin/reflect/jvm/internal/KPackageImpl.java
new file mode 100644
index 00000000000..6aa51dfee21
--- /dev/null
+++ b/core/reflection.stub.jvm/src/kotlin/reflect/jvm/internal/KPackageImpl.java
@@ -0,0 +1,22 @@
+/*
+ * 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 kotlin.reflect.jvm.internal;
+
+import kotlin.reflect.KPackage;
+
+public abstract class KPackageImpl implements KPackage {
+}
diff --git a/resources/kotlinManifest.properties b/resources/kotlinManifest.properties
index c9e475c1fb7..5792eec70a4 100644
--- a/resources/kotlinManifest.properties
+++ b/resources/kotlinManifest.properties
@@ -7,7 +7,9 @@ manifest.impl.title.kotlin.compiler.sources=Kotlin Compiler Sources
manifest.impl.title.kotlin.compiler.ant.task=Kotlin Compiler Ant Tasks
manifest.impl.title.kotlin.jvm.runtime=Kotlin Runtime
+manifest.impl.title.kotlin.jvm.runtime.minimal=Kotlin Runtime Minimal
manifest.impl.title.kotlin.jvm.runtime.sources=Kotlin Runtime Sources
+manifest.impl.title.kotlin.jvm.runtime.minimal.sources=Kotlin Runtime Minimal Sources
manifest.impl.title.kotlin.javascript.stdlib=Kotlin JavaScript StdLib
manifest.spec.title.kotlin.javascript.lib=Kotlin JavaScript Lib