Commit Graph

45134 Commits

Author SHA1 Message Date
Pavel V. Talanov 3aee544f02 Throw more descriptive exception when service isn't found 2018-04-04 17:56:32 +02:00
Ilya Chernikov da56f54982 Use script compiler options on script dependencies in the IDE as well
further fixes #KT-19120
2018-04-04 16:58:14 +02:00
Ilya Chernikov 5bf8460032 Do not throw if the script definition name is not defined 2018-04-04 16:23:59 +02:00
Ilya Chernikov bdd001d04c [minor] drop explicit stdlib detection logic in script compiler
...as it is mainly redundant and in the current for somewhat incorrect
2018-04-04 16:23:58 +02:00
Ilya Chernikov 73d2580435 Add FATAL diagnostic severity to match changes in the current script infrastructure 2018-04-04 16:23:58 +02:00
Ilya Chernikov 599a9acce8 Rearrange scripting examples to conform the build system requirements 2018-04-04 16:23:58 +02:00
Ilya Chernikov 7fbcfdf09e Add config params for specifying target annotations, import param renaming 2018-04-04 16:23:58 +02:00
Ilya Chernikov 191b1cfefa Refactor configurations handling:
- rearrange compile call parameters for clarity, more defaults
- remove baseConfiguration method - it is now covered by defaultConfiguration
for static part, and refineConfiguration call if a config parameter is
specified
- implement proper configurations chaining, documented in comment to compile function
- minor renamings and refactorings
2018-04-04 16:23:58 +02:00
Ilya Chernikov 4a4edf3458 [minor] Renames and rearrangements for clarity 2018-04-04 16:23:58 +02:00
Ilya Chernikov 5058c66e8c Refactor scripting properties:
- flatten the structure
- add some parameters
- replace iterables with lists
- renaming all scope objects uniformily
also:
- fix passing and usage of script sources
- renamings and other minor improvements
2018-04-04 16:23:58 +02:00
Ilya Chernikov 2ddcc280a9 Implement simplified property bag dsl:
move it to the separate jar,
use property bag chaining
2018-04-04 16:23:57 +02:00
Ilya Chernikov 495c75c48e Rename heterogeneous map to PropertyBag, make it chainable
the commit is needed to implement single chained script configuration bags
2018-04-04 16:23:57 +02:00
Ilya Chernikov 15fcee474c Fix script classpasth from environment extraction...
for classes dirs
2018-04-04 16:23:57 +02:00
Ilya Chernikov 6ea41b425d Pass script source directly instead of via configuration 2018-04-04 16:23:57 +02:00
Ilya Chernikov 29797ec264 Switch to plugins section in scripting build files after rebasing 2018-04-04 16:23:57 +02:00
Ilya Chernikov ae2af238fa Fixes after refactoring the API 2018-04-04 16:23:57 +02:00
Ilya Chernikov 1f0cac50d2 Refactor scriptDefinition in the common part
- get rid of selector (because of confusions), move it's data into
definition itself and make it more generic with heterogeneous map
- make main KotlinScript annotation accept complete definition
- make additional annotation for building definition from parts
- add ScriptingEnvironment and pass it as a constructor parameter to
the script handlers
- rename some classes for clarity
2018-04-04 16:23:57 +02:00
Ilya Chernikov 2c3a50e4b3 Refactor scripting examples:
- split into script def and host part
- remove bad dependencies
- organize it in a way that should be typical for user scenarios
2018-04-04 16:23:56 +02:00
Ilya Chernikov 7cca1a72d3 Fix after review: add stdlib to the script compilation classpath by default 2018-04-04 16:23:56 +02:00
Ilya Chernikov d50798c4cf Refactor script-util context tools to simplify its usage in the new scripting 2018-04-04 16:23:56 +02:00
Ilya Chernikov 4742d0a034 Rename scripting plugins to more established scheme 2018-04-04 16:23:56 +02:00
Ilya Chernikov 00320bad8d Implement support for additional receivers in the backend 2018-04-04 16:23:56 +02:00
Ilya Chernikov 611aff6b61 J2K: ScriptContext - convert 2018-04-04 16:23:56 +02:00
Ilya Chernikov cf4cca3683 J2K: ScriptContext - rename 2018-04-04 16:23:56 +02:00
Ilya Chernikov 87de1dff03 Implement support for additional receivers for script in frontend 2018-04-04 16:23:56 +02:00
Ilya Chernikov e79d3dd035 Fix scripting in the frontend after refactorings 2018-04-04 16:23:55 +02:00
Ilya Chernikov 1cb9592fcc Change samples after adding configuration dsl 2018-04-04 16:23:55 +02:00
Ilya Chernikov 0f0934aaa2 Change jvm implementation after adding configuration dsl 2018-04-04 16:23:55 +02:00
Ilya Chernikov 1723ff658d Refactoring heterogeneous map handling, add dsl builders 2018-04-04 16:23:55 +02:00
Ilya Chernikov 63d601e1be Implement scripting configuration gradle plugin 2018-04-04 16:23:55 +02:00
Ilya Chernikov d05f67127d Move scripting configuration into compiler plugin 2018-04-04 16:23:55 +02:00
Ilya Chernikov 1514a113b8 minor: Add maven deps example template to the discovery resource folder 2018-04-04 16:23:55 +02:00
Ilya Chernikov 0c06ec9088 Implement script templates discovery in the idea plugin 2018-04-04 16:23:54 +02:00
Ilya Chernikov d07a3f2bdd Implement script templates discovery in the cli compiler 2018-04-04 16:23:54 +02:00
Ilya Chernikov f496fbb625 Add new scripting libs to proguard library jars
so proguard do not complain for missing classes
2018-04-04 16:23:54 +02:00
Ilya Chernikov 548bf26c58 Add new scripting support to the gradle plugin 2018-04-04 16:23:54 +02:00
Ilya Chernikov c764365da5 Add new scripting support to the compiler 2018-04-04 16:23:54 +02:00
Ilya Chernikov 3f22e28a51 Implement basic support of the new scripting in the frontend and plugin 2018-04-04 16:23:54 +02:00
Ilya Chernikov 3732422e6a Add example scripting hosts with tests:
the simple scripting host and the one with maven resolving
2018-04-04 16:23:54 +02:00
Ilya Chernikov c48a74b84a Implement base jvm scripting infrastructure 2018-04-04 16:23:54 +02:00
Ilya Chernikov aac7f97121 Add new experimental scripting API 2018-04-04 16:23:53 +02:00
Mikhael Bogdanov 4aec9499b5 Add @RequireKotlin(1.2.40) on interface with @JvmDefaults and its subinterfaces 2018-04-04 16:17:38 +02:00
Mikhael Bogdanov be33a9bf3b Update test data 2018-04-04 14:55:39 +02:00
Mikhael Bogdanov a27d1b7a3b Update @JvmDefault documentation 2018-04-04 14:55:39 +02:00
Natalia Selezneva a6019cc5fb Rearrange script definition contributors to avoid old EP appear before new EP
Fix highlighting of build.gradle.kts files with LivePlugin enabled
^KT-23571 Fixed
2018-04-04 12:44:04 +03:00
Dmitry Jemerov e05b54a2b4 Fix unsupported syntax in code style settings example 2018-04-04 11:35:04 +02:00
Alexander Udalov 0439abba46 Check that kotlin.stdlib is explicitly required in module-info
Writing a Jigsaw-modular Kotlin program which doesn't require
kotlin.stdlib doesn't make sense because it most likely will fail at
runtime, on access to anything from the standard library. Previously, we
checked that kotlin.stdlib was in the module graph, but that's not
enough, we should also check that the source module requires it.
'-Xallow-kotlin-package' can be used to disable the error.

Add a test checking that an indirect (transitive) dependency is also OK
2018-04-03 21:50:25 +02:00
Ilya Gorbunov 7501d2ad69 Make JDK 9 required to build the project 2018-04-03 21:24:35 +02:00
Ilya Gorbunov 299d6fa772 Use default compileJava9Java task to build java9 source set 2018-04-03 21:24:34 +02:00
Ilya Gorbunov bd4abaa8bf Improve JDK discovery for JDK9+ on Windows 2018-04-03 21:24:07 +02:00