Commit Graph

356 Commits

Author SHA1 Message Date
Ilya Ryzhenkov 5db541ee24 Add container module with implementation of di based on java reflection
Initial implementation by Ilya Ryzhenkov
Renovation, optimization, integration and removal of unused features by Pavel Talanov
2015-06-26 15:21:39 +03:00
Denis Zharkov 80a7f79f12 Make jars with JDK/Android SDK annotations empty
- Compiler use them only for getting parameter names and we are OK to drop it
- IDE plugin can use jdkAnnotations from ideaSDK
2015-06-23 16:44:27 +03:00
Alexander Udalov 5ec4576844 CLI: add color to compiler output via jansi
Disabled on Windows temporarily, because for some reason colors there work only
in REPL
2015-06-15 15:42:42 +03:00
Alexander Udalov 64b60718e3 Finish off old deprecated function/extension function classes
This reverts commit d14e5b8a72.
2015-06-10 14:41:57 +03:00
Alexander Udalov cbbf8dec7e Drop ant-1.7 from project, advance Ant to 1.8.2
Ant 1.8.2 has the API (namely,
CompilerAdapterExtension#getSupportedFileExtensions) which will allow to fix a
critical bug in <withKotlin/> task (see KT-7870)
2015-06-05 15:55:52 +03:00
Alexander Udalov 9cc156c67f Copy kotlin-reflect.jar from dist to publish to Maven
Also build sources jar in build.xml to publish as kotlin-reflect's sources, and
create an empty javadoc
2015-06-02 11:12:09 +03:00
Alexander Udalov c830eee453 Add kotlin-reflect.jar to targets in build.xml 2015-06-02 11:12:08 +03:00
Alexander Udalov 803fb82b8b Minor, move compiler.pro out of project root 2015-06-01 19:23:09 +03:00
Alexander Udalov d14e5b8a72 Restore and deprecate Function{n}/ExtensionFunction{n} classes for easier migration
Users' Java code will not break in common cases (when passing functions to
Kotlin), and deprecation warnings will be reported.

Provide an inspection with a quick fix which allows to replace deprecated
function class usages to the new classes. Include this fix to the "code
cleanup" action
2015-05-28 01:20:05 +03:00
Alexander Udalov 45c28abfee Keep built-in metadata for reflection interfaces
Reflection interfaces (interfaces in kotlin.reflect.* in core/builtins/) are
now fully considered as built-ins and can be accessed via KotlinBuiltIns. This
increases runtime size by ~20kb, but only because KotlinBuiltIns is static and
is therefore constructed only via resource loading from the compiler classpath
at the moment. As soon as it's possible to inject KotlinBuiltIns to the
particular resolution process, the metadata on JVM will be loaded via standard
annotation mechanism (kotlin.jvm.internal.KotlinClass/KotlinPackage) and wasted
runtime space will be reclaimed
2015-05-26 14:27:38 +03:00
Michael Nedzelsky 4a05005fa7 JS: do not include sources in kotlin-jslib.jar 2015-05-26 05:03:28 +03:00
Yan Zhulanow b2220ca98a Annotation collector compiler plugin 2015-05-21 15:48:06 +03:00
Michael Nedzelsky d629271510 JS: make -meta-info cli option boolean 2015-05-21 02:30:54 +03:00
Andrey Breslav a2b1a86ef5 Rename packages in kotlin-reflect.jar so that they do not duplicate compiler classes 2015-05-19 17:15:02 +03:00
Andrey Breslav 100c1b2787 Proguard instruction extracted to a separate file 2015-05-19 17:15:02 +03:00
Alexander Udalov b860f2c9d5 Minor, remove temporary bootstrapping workaround 2015-04-29 01:03:54 +03:00
Alexander Udalov 244f37aa74 Use preloader for JS compilation in build.xml
Similar to "new-kotlinc" macro. Before this change bootstrap-runtime appeared
earlier on the classpath than the newly built compiler, and so everything was
breaking when e.g. built-ins metadata had been updated (old version in the old
runtime was found earlier than the newer version in the compiler)
2015-04-28 00:52:03 +03:00
Alexander Udalov 20cd360b07 Rename built-in metadata files starting with dot
Files starting with dot are considered as hidden on Unix systems, and sometimes
are ignored by the tools. For example, Android build tools do not package such
files to the resulting application, which causes Kotlin reflection to fail
there

 #KT-7088 Fixed
2015-04-23 03:17:29 +03:00
Nikolay Krasko ea47e29757 Update ZipFileCache and LowMemoryWatcher from new Idea 2015-04-16 00:25:01 +03:00
Alexander Udalov 91bb789758 Fix builtins-serializer source root in compiler sources jar 2015-04-14 12:56:50 +03:00
Alexander Udalov 5d5d1b759d Minor, simplify jar inclusion in build.xml 2015-04-14 12:56:01 +03:00
Alexander Udalov 3a4659c074 Include resources/kotlinManifest.properties to kotlin-for-upsource.jar 2015-04-14 12:52:33 +03:00
Alexander Udalov b2e0eda953 Include protobuf to kotlin-for-upsource.jar 2015-04-10 12:32:46 +03:00
Alexander Udalov 0a93cfc9c0 build.xml: drop 'generate.assertions' option
It was error-prone, not very useful (only a couple seconds saved on a 3min
build), and in fact did not work since 5194310d, because <skip> element was
failing inside the default javac
2015-03-30 20:20:46 +03:00
Alexander Udalov 32c3bb8c7f Extract module 'deserialization' out of 'serialization'
'deserialization' stays in core because it's needed both in compiler and
reflection, but 'serialization' is used only in the compiler
2015-03-30 19:44:17 +03:00
Alexander Udalov 085bc2197b Merge module 'serialization.jvm' into 'descriptor.loader.java'
It was very small and there proved to be no point in separation of loading Java
classes and deserializing Kotlin classes
2015-03-30 17:22:06 +03:00
Alexander Udalov 30916e37ce Move bootstrap runtime copying to 'prepare-dist' to fix dist-quick 2015-03-26 21:38:05 +03:00
Michael Nedzelsky 842eaa86a4 merge serialization.js module into js.serializer 2015-03-24 15:13:45 +03:00
Alexander Udalov 73f06baa90 Drop temporary bootstrapping hack 2015-03-23 12:20:45 +03:00
Yan Zhulanow c945a53eec Move AndroidPsiTreeChangePreprocessor to android-idea-plugin module 2015-03-18 17:51:58 +03:00
Michael Nedzelsky e3bd99d510 JS: fix clash between sources and metadata in one library 2015-03-18 09:39:34 +03:00
Michael Nedzelsky 1a4a7f6715 build.xml: remove module name from js-stdlib manifest file 2015-03-18 09:39:00 +03:00
Michael Nedzelsky a1ee616769 build.xml: create and archive meta information for js-stdlib 2015-03-18 09:38:58 +03:00
Michael Nedzelsky 711501af56 add new module js.serializer 2015-03-18 09:38:51 +03:00
Michael Nedzelsky e0c0012a20 add serialization.js module 2015-03-18 09:38:47 +03:00
Alexander Udalov 444b461ba7 Run preloader in new-kotlinc, fix reflect->runtime class-path reference 2015-03-17 15:46:47 +03:00
Alexander Udalov 9d6f4e99a1 Move reflection interfaces to module 'builtins'
They are considered to be built-ins everywhere anyway
2015-03-16 20:29:39 +03:00
Yan Zhulanow 6b368e445a Cache XML layout widgets using PsiTreeChangePreprocessor 2015-03-13 15:46:39 +03:00
Denis Zharkov f632a90741 Fix compiler settings for android-compiler-plugin
It's necessary to use bootstrap-compiler and runtime but new compiler in classpath when increasing ABI.

For example ABI was X, then we increase it to X':

- It compiles in Bootstrap (B) build with compiler that knows
  old ABI version, so compiled compiler (C1) will still have version X, but new
  runtime's version is X' (R1).

  So when we compile android-compiler-plugin each part has version X.

- Then project compiles by new compiler (C1)
  (that class-files have ABI version X, but it knows about X') in main build.
  Here compiled compiler (C2) will have X' version of class-files,
  either has runtime (R1) compiled on previous stage.

  On this step android-compiler-plugin will be compiled fine by C1 and with C2, R1.
2015-03-11 17:45:29 +03:00
Alexander Udalov 2b090e02a1 Build kotlin-reflect.jar in build.xml and for Maven
Reflection will be distributed in a separate jar and not in kotlin-runtime.jar
for two primary reasons:
- Reflection implementation at the moment takes almost 2Mb
- Separate libraries for separate features is a technique encouraged by Maven,
  and it's inconvenient to make it different in the compiler distribution
2015-03-11 16:42:28 +03:00
Alexander Udalov 6fe483f0cf build.xml: use absolute paths, extract some constants 2015-03-07 02:32:59 +03:00
Alexander Udalov 0bd5264b5e Get rid of module reflection.stub.jvm
Generate K*Function as a supertype for a function reference instead of
K*FunctionImpl; this will allow one binary library to be used with or without
reflection
2015-03-07 02:31:26 +03:00
Alexey Tsvetkov 4efadb33fa JS: switched ClosureCompiler to whitespace level 2015-03-06 21:36:18 +03:00
Michael Bogdanov db987eedee Fix android compiler plugin classpath 2015-03-03 17:05:17 +03:00
Yan Zhulanow 756d0a06d9 Remove obsolete "frontend.android" paths 2015-02-26 15:26:01 +03:00
Yan Zhulanow 328116cb1a Fix android-compiler-plugin build 2015-02-26 15:25:59 +03:00
Yan Zhulanow b897803f5b Fix ProGuard rules for plugin-api 2015-02-26 15:25:58 +03:00
Yan Zhulanow fbed5426e2 Kotlin Gradle subplugin support 2015-02-26 15:25:55 +03:00
Yan Zhulanow 755c16d6d2 Do not shrink org.jetbrains.kotlin package classes 2015-02-26 15:25:55 +03:00
Yan Zhulanow a2032e60a7 Provide values using ServiceLoader instead of MANIFEST.MF 2015-02-26 15:25:44 +03:00