Commit Graph

1791 Commits

Author SHA1 Message Date
Alexander Udalov 861d9a1620 Use null instead of CompilerMessageLocation.NO_LOCATION in MessageCollector 2017-04-11 12:08:31 +03:00
Yan Zhulanow 3ee65ac499 Kapt: Support specifying javac options (KT-17245) 2017-04-10 22:48:17 +03:00
Sergey Igushkin 8cdb08cbfe Fixed duplicated kapt options caused by multiple call to args setup
Separated kapt args from other plugin options.

Issues: #KT-16965 Fixed

Fix indentation
2017-04-10 20:59:23 +03:00
Sergey Igushkin ea3adb0629 Implemented resolving the compiler jar using the class loader
Added resolving the compiler jar using the class loader urls as the
first step with the fallback to the original resolution method. Also
helps if the compiler is not present in the classpath dependencies.

Issues: #KT-16580 Fixed

Changed to getting plugin version from the applied plugin instead of
the plugin JAR name.

Removed unnecessary working with version of AbstractKotlinPlugin.
2017-04-10 20:55:19 +03:00
Sergey Igushkin bda59e58d5 Filling in and reverting annotationProcessor
Added reverting processor path back.
Appending processor path instead of setting it.

Issues: #KT-17255 Fixed

(cherry picked from commit 843844b)

Added a test checking that -processorpath is set for all Gradle versions
2017-04-10 20:50:34 +03:00
Sergey Igushkin 64278a06cc Refactoring in AnnotationProcessingManager.kt. 2017-04-10 20:45:03 +03:00
Sergey Igushkin 80daae90e3 Partial fix for the processor path not being set up properly.
Issues: #KT-17255
2017-04-10 20:44:12 +03:00
Ilya Gorbunov afba967fcf Use kotlin-stdlib.jar instead of kotlin-runtime.jar as runtime during build 2017-04-10 19:46:06 +03:00
Dmitry Jemerov 406714a1f4 Remove warning for running the compiler under Java 6/7
Now the compiler won't even start, so no need to check this manually.
2017-04-10 17:30:03 +02:00
Alexey Tsvetkov 0a42a1c104 Minor: fix maven IC tests with custom local repository 2017-04-08 21:14:49 +03:00
Ilya Gorbunov e7dc7ec005 Rebuild sources for kotlin-daemon-client and compiler-client-embeddable in maven build
Do not build these sources in ant.
Do not require them as artifact dependencies.
2017-04-08 19:07:54 +03:00
Ilya Gorbunov 5aabcb6ea3 Update build instructions in ReadMe to include gradle build step.
Also update links and overall readme structure.
2017-04-08 08:37:12 +03:00
Ilya Gorbunov f5647fb27f Delete temporary proguard configuration for gradle, change the primary one. 2017-04-08 08:32:05 +03:00
Ilya Gorbunov 337fd4e180 Drop poms that are no longer required. Drop separate unit test modules for stdlib js. 2017-04-08 08:28:50 +03:00
Anton Bannykh 93f11a6da3 Update HtmlUnit driver to version 2.24; run tests using JDK 1.8
The old version had very limited TypedArray support, which lead to
browser-example crashes.
The new version of HtmlUnit needs JDK 1.8 to run.
2017-04-07 18:52:56 +03:00
Anton Bannykh 7287645937 JS: fix AMD module integration tests 2017-04-06 21:35:03 +03:00
Ilya Gorbunov 02293dab9e Add public api dumps for kotlin-reflect and kotlin-stdlib-jre7/8 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 97d1ffb036 Do not build modules with maven which are built with gradle.
kotlin-maven-plugin-test:
Remove dependency on kotlin-test-parent that is no longer published and required.
Add dependency on kotlin-runtime as it's no longer coming transitively from kotlin-script-runtime.
Change kotlin version test to reflect manifest implementation title changes.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov 3db1613167 Setup dist task to assemble libs for compiler distribution.
Produce special stdlib artifact with annotations for dist.
Put js outputs to dist, they're required for JS backend tests.

Use kotlin-compiler for maven, which has all required dependencies bundled.
Clean local directory repository on clean.

Change paths in tests to compiled artifacts.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov 0b2cadc638 Provide a method for common publishing configuration. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 92ef26606b Refactor build to make manifest specification less error-prone.
Use legacy implementation title in manifest of JS stdlib for now.

Change the way common jvm project configurations is applied.
Add missing artifacts to common libraries.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov 026a76e98c Assemble protobuf-lite with gradle, and use it in kotlin-reflect. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov d1d62d557d Create task to run kotlin scripts and use it to strip metadata. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov c2aa906d77 Build reflection classes with gradle: all from main sourceSet 2017-04-06 20:32:37 +03:00
Ilya Gorbunov f619dbe631 Build and package reflection with gradle 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 4645fc4b7b Build reflection classes with gradle 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 7a6621cc85 Migrate stdlib generator to gradle and include it to the main project
Use latest released kotlin compiler and stdlib to build it.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov e090a44b71 Migrate binary-compatibility-validator tests to gradle. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 122e63d072 Build kotlin-stdlib-js with gradle 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 846b74885c Remove some configuration duplication by using 'tasks.withType()'
Setup common options of java and kotlin compiler tasks.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov d25b07fe23 Exclude additional test source sets when importing project in IDEA, enable coroutines in stdlib 2017-04-06 20:32:37 +03:00
Ilya Gorbunov 780e12f04a Build stdlib without dependency to kotlin-runtime and kotlin-test. 2017-04-06 20:32:37 +03:00
Ilya Gorbunov d3afc1ba2e Extract manifest attribute specification to helper function.
Specify default jdkHome for all projects.
2017-04-06 20:32:37 +03:00
Ilya Gorbunov 5755210498 Tune build options for kotlin-test, kotlin-runtime, kotlin-stdlib, kotlin-stdlib-jre7/8 2017-04-06 20:32:37 +03:00
Ilya Gorbunov c5aa5ef571 Do not duplicate sources, add non-compiled sources to runtime, dump declarations to json. 2017-04-06 20:32:37 +03:00
Ilya Chernikov dfdce5ff58 Publish to custom local repo, add copy-only reflect and js-lib
Add artifact signing
2017-04-06 20:32:37 +03:00
Ilya Chernikov 35a135cbf6 Add builds for main stdlib, stdlib jre7/8, kotlin.test 2017-04-06 20:32:37 +03:00
Ilya Chernikov ed9221cb7d Add script runtime, refactorings 2017-04-06 20:32:37 +03:00
Ilya Chernikov c2c051cfe8 Prepare gradle config for building libs - bootstrap and runtime
Use external gradle plugin (1.1-M04) with compiler.jar from dist
Add empty build scripts for other projects that needs to be built with gradle
2017-04-06 20:32:37 +03:00
Ilya Chernikov a309511adf Add actual sources to compiler and daemon client jars 2017-04-06 10:02:46 +02:00
Ilya Chernikov 88652154c9 Port compiler to the script-runtime with script base classes 2017-04-06 10:02:45 +02:00
Ilya Chernikov 7ceaca133a Add new artifact kotlin-compiler-client-embeddable.jar 2017-04-06 10:02:44 +02:00
Alexey Tsvetkov 30d6af7aae Provide incremental compilation for Maven
#KT-11916 fixed

To use the IC either:
1. set the `kotlin.compiler.incremental` property to `true` in a pom.xml:
```
<properties>
    <kotlin.compiler.incremental>true</kotlin.compiler.incremental>
</properties>
```
2. pass the `kotlin.compiler.incremental` property in a command line:
```
mvn install -Dkotlin.compiler.incremental=true
```

When IC is on Kotlin plugin is expected to print the warning in the log:
```
Using experimental Kotlin incremental compilation
```

After each call an incremental compiler will also log how many files it has compiled:
```
Compiled %SOME_NUMBER% Kotlin files using incremental compiler
```

Note that the first build will be non-incremental.

For more diagnostic information (such as an exact list of compiled files) use the `kotlin.compiler.incremental.log.level` system property:
```
mvn install -Dkotlin.compiler.incremental=true -Dkotlin.compiler.incremental.log.level=info
```

To force the rebuild just run the 'clean' goal:
```
mvn clean install
```
2017-04-05 21:00:43 +03:00
Yan Zhulanow 21da11fe18 Fix 'kotlin-spring' and 'kotlin-noarg' Gradle plugin importing (KT-17049)
Allopen and Noarg plugins now use 'presets' that should be handled in the Gradle importer as well.
2017-04-05 18:13:14 +03:00
Alexander Udalov b5ea6d3e25 Upgrade maven-shade-plugin to 3.0.0
A critical bug related to Java 8 bytecode (default/static methods in
interfaces) was fixed in maven-shade-plugin in 3.0.0, which reproduces
for kotlin-compiler-embeddable on Java 9 because the verifier in Java 9
started to check consistency of constant pool references to methods in
interfaces

 #KT-17112 Fixed
2017-04-03 18:37:22 +03:00
Ilya Gorbunov c740c0b177 Do not produce javadoc for kotlin-compiler and do not attach it to maven artifacts 2017-04-01 04:32:01 +03:00
Anton Bannykh 3eb5ce7d9a JS: polyfill ArrayBuffer.isView in order to support PhantomJS 2017-03-31 21:20:01 +03:00
Alexander Udalov dac9ed4a33 Fix compilation of kotlin-script-util
See 20d5616
2017-03-31 20:14:13 +03:00
Mikhail Zarechenskiy aec0c029e5 Display description of language version in options 2017-03-30 13:27:50 +03:00
Mikhail Zarechenskiy 20d5616d75 Introduce Kotlin language version 1.2
Wherein DEFAULT version is still 1.1, which means that version 1.2 should be configured manually
2017-03-30 13:27:45 +03:00