Ilya Chernikov
3629583942
Add overridable method "setup" for defining properties
2018-08-23 09:51:53 +03:00
Ilya Chernikov
1de37ca765
Make KotlinScript annotation accepting all params needed to define a script
2018-08-23 09:51:53 +03:00
Ilya Chernikov
dafbd59707
Add shorter aliases for properties
2018-08-23 09:51:53 +03:00
Ilya Chernikov
df870b47b8
Add helpers for jvm dependencies from context
2018-08-23 09:51:53 +03:00
Ilya Chernikov
100b908a94
Add properties builders to the dsl, implement a builder for refineConfiguration
2018-08-23 09:51:53 +03:00
Ilya Chernikov
e5e1b8d100
Improve generic DSL
2018-08-23 09:51:53 +03:00
Ilya Chernikov
7a621405ae
Add generic properties builder dsl, convert maven example to it
2018-08-23 09:51:53 +03:00
Ilya Chernikov
d0ed86c11c
Add REPL interfaces to scripting API
2018-08-23 09:51:53 +03:00
Ilya Chernikov
5ca4a21edf
Convert evaluator interface to function
2018-08-23 09:51:53 +03:00
Ilya Chernikov
9b7eeebaaa
Convert compiler interface to function
2018-08-23 09:51:53 +03:00
Ilya Chernikov
cf2162c445
Refactor properties
2018-08-23 09:51:53 +03:00
Ilya Chernikov
904917c194
Make script definition a property bag directly
2018-08-23 09:51:53 +03:00
Ilya Chernikov
8953bba47c
Pass scripting (host) environment independently from properties/configuration
2018-08-23 09:51:53 +03:00
Ilya Chernikov
91e6c0b77c
Remove evaluator from script definition, simplify interface
2018-08-23 09:51:53 +03:00
Ilya Chernikov
e61ba1fd70
Replace dedicated configurator with definition properties + refine fun
2018-08-23 09:51:53 +03:00
Ilya Chernikov
a54675abe7
Clean and fix new scripting API
2018-08-23 09:51:53 +03:00
Ilya Chernikov
2a4cef3ac2
Avoid "Failed to initialize native filesystem for Windows" warning from the platform on script compilation
2018-08-17 09:49:46 +02:00
Ilya Chernikov
e1ee31b4ce
Use linked hashmap in properties dsl - preserving order
2018-08-16 15:13:00 +02:00
Alexander Udalov
5da8ce844a
Minor, move ContentRoot and KotlinSourceRoot to module 'cli'
...
Also move CONTENT_ROOTS from JVMConfigurationKeys to
CLIConfigurationKeys since it's used on all platforms, not just JVM
2018-08-07 13:38:30 +02:00
Ilya Chernikov
5d597eb382
Fix configurations chaining in the script compiler
2018-07-10 08:43:52 +02:00
Ilya Chernikov
56e9bfcd62
Fix default configuration refinement in scripts
2018-07-10 08:43:50 +02:00
Ilya Chernikov
befa94689a
Return script instance from the evaluation in the basic jvm evaluator
2018-07-10 08:43:50 +02:00
Ilya Chernikov
bacc2079ed
Fix/workaround lazy lcript definition test and related scenarios
2018-05-28 22:10:56 +02:00
Ilya Chernikov
6fdb8746de
Fixes after review
2018-05-28 22:10:56 +02:00
Ilya Chernikov
a46dd5b30e
Avoid using reflected types in the scripting API
...
since it causes numerous classloading issues. Using the wrapping types
and reload them in the proper context when needed.
Note: this version supports only classes, but the wrapping type could
be extended to support other types in the future.
+ numerous fixes related to proper loading and handling of the templates.
2018-05-28 22:10:56 +02:00
Ilya Chernikov
705faa4792
Add lazy discovery test
2018-05-25 09:51:04 +02:00
Yan Zhulanow
6e362f6734
Kapt: Remove kapt1 from Kotlin compiler
2018-05-24 01:01:51 +03:00
Ilya Chernikov
b3219cb762
Implement lazy script definition and light discovery in cli plugin, ...
...
update appropriate parts of the scripting infrastructure
2018-05-14 11:13:44 +02:00
Natalia Selezneva
9535c82149
Backport ScriptSeverity.FATAL to old script API
...
(cherry picked from commit dceb063)
2018-05-11 15:51:47 +03:00
Ilya Chernikov
9eab7a627d
Add script API libs sources to the IDEA plugin
2018-05-03 22:15:10 +02:00
Ilya Chernikov
48cf0bd949
Fixes and refactorings after review
2018-05-03 22:15:10 +02:00
Ilya Chernikov
57db77a295
Refactor script infrastructure for easier usage and testability:
...
- add script annotation for specifying default configuration for a script
- add support for this annotation in the default configurator
- rename configurator accordingly
- add default implementation of the refineConfiguration method
- make property bag class open
2018-05-03 22:15:09 +02:00
Denis Zharkov
003f381fcd
Replace default-type dependencies to :kotlin-stdlib with distJar
...
Use distJar configuration instead.
It's necessary because currently when using default-type, subproject
starts having a transitive dependency to :kotlin-stdlib-common
and that leads to exception from KT-20897 when building light classes
This change might be reverted once KT-23942 is fixed
#KT-23942 Submitted
2018-04-26 16:11:27 +03:00
Yan Zhulanow
715421566b
Pill: Add new script modules
2018-04-09 19:45:49 +03:00
Alexander Udalov
914cf18051
Fix line separators in scripting-related build.gradle.kts files
2018-04-04 22:26:17 +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
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
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
00320bad8d
Implement support for additional receivers in the backend
2018-04-04 16:23:56 +02:00