Commit Graph

394 Commits

Author SHA1 Message Date
Vyacheslav Gerasimov bc2f0936bd Build: Rename commonDep -> commonDependency 2021-12-16 21:48:19 +03:00
Ilya Chernikov 1450f4d890 Implement property for explicit jvmTarget for script definition...
Apply the property to the default JSR-223 script taking the value from
java.specification.version property, so effectively implementing
jvmTarget detection from current VM.
Also drop enforcing of target 1.8, using common default.
#KT-49329 fixed
#KT-40497 fixed
2021-12-14 13:39:21 +03:00
Ilya Chernikov ec2d6ea5f1 Restore script testing on both backends, fix some tests 2021-12-14 13:39:19 +03:00
Mikhael Bogdanov 0997207c7c Apply -Xjvm-default for specific modules only 2021-12-03 06:39:38 +01:00
Ilya Muradyan 7283ea86af [scripting] Fix Kotlin reflection metadata for script constructors 2021-12-02 01:49:58 +03:00
Ilya Muradyan 6917ff7d2a [scripting] Move earlierScripts to the frontend descriptor
^KT-20488 fixed
2021-11-30 09:11:59 +03:00
Ilya Muradyan 57543f5b19 [scripting] Fix NPE in aether.kt 2021-11-11 11:27:07 +03:00
Ilya Muradyan 56d472451c Mark packages for relocation to fix classpath interferring in main-kts
KT-49476 fixed
2021-11-09 23:04:05 +03:00
Ilya Muradyan a22c8c8f2f [scripting] Fix script resolver options parsing
#KT-49400 Fixed
2021-10-25 04:15:35 +03:00
Alexey Subach ca2f37f6eb Add possibility to get location of the script.main.kts file
#KT-48414 fixed
2021-10-11 15:45:57 +02:00
Alexey Subach 7ddf83f32d Add link to ScriptCompilationConfiguration into ScriptEvaluationConfiguration
#KT-48758 fixed
2021-10-11 15:45:57 +02:00
Nikolay Krasko 1d2c1140a4 Minor: rewrite testResolveWithRuntime without !! 2021-10-05 17:51:50 +03:00
Nikolay Krasko 1d42d86537 Minor: unify kotlin version used in MavenResolverTest 2021-10-05 17:51:50 +03:00
Nikolay Krasko 824c227d81 Stop removing libraries from local maven in MavenResolverTest
While it's a good practice to remove all files that were downloaded
during the test execution, here we delete files in common directory
without checking that files were not present before test start.

This might be dangerous as we might fail other tests and programs.
As we manipulate common maven directory it's better to leave downloaded
files untouched
2021-10-05 17:51:50 +03:00
Nikolay Krasko 31e30dc852 Fix external issue with org.uberfire library in MavenResolverTest
Use kotlin library instead.

java.lang.AssertionError: org.eclipse.aether.resolution.DependencyResolutionException: Failed to collect dependencies at org.uberfire:uberfire-io:jar:7.39.0.Final -> org.uberfire:uberfire-nio2-model:jar:7.39.0.Final -> com.thoughtworks.xstream:xstream:jar:1.4.11.1 -> xmlpull:xmlpull:jar:1.2.0
2021-10-05 17:51:48 +03:00
Vyacheslav Gerasimov f91d6958a8 Build: Rework runtimeJar helper and drop redundant configuration
#KTI-559
2021-09-26 20:10:29 +03:00
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Ilya Chernikov 4243bafd1d Scripting: implement correct disposal of REPL state on finalization
#KT-47927 fixed
2021-08-24 21:39:38 +03:00
Ilya Chernikov a45e31720c Make state of the default REPL compiler explicit and replaceable
restores proper object hierarchy in case the legacy REPL infrastructure
2021-08-24 21:39:37 +03:00
Ilya Chernikov 61e5f68b8d Scripting invalidate compiled cache if a dependency is missing
#KT-48303 fixed
2021-08-24 21:39:35 +03:00
Ilya Chernikov e60e80f19a Scripting: improve reporting on cyclic dependency
#KT-48177 fixed
the issue is in fact fixed by the previous commit (report error
on duplicated import) by normalizing import path before processing,
but here we're making error reporting nicer for the case.
2021-08-24 21:39:33 +03:00
Alexander Udalov 1599a049aa Fix warnings in scripting modules 2021-08-06 22:36:22 +02:00
Mikhael Bogdanov f590c3201a Update ScriptingHostTest.testCompileOptionsLanguageVersion test 2021-07-29 19:45:55 +02:00
Alexander Udalov 0a9498f7e2 Build: suppress deprecated JVM target warning globally
There seems to be no point in configuring the compiler argument per
project. This argument will be deleted soon anyway, when we remove
support for JDK 1.6 & 1.7.

Also remove `disableDeprecatedJvmTargetWarning`. It didn't have any
effect in all modules where it was applied because these modules
reassign `freeCompilerArgs` anyway, with
`-Xsuppress-deprecated-jvm-target-warning` in it.
2021-07-27 13:35:39 +02:00
Nikolay Krasko 83023c2073 Remove 202 platform support in build scripts 2021-07-23 16:58:28 +03:00
Ilya Chernikov 8eb7e719d3 [minor] fix compiler warnings in scripting modules 2021-07-20 19:42:34 +03:00
Dmitriy Novozhilov f3116cb64a Fix NON_EXHAUSTIVE_WHEN_STATEMENT warnings in project code 2021-07-20 13:33:46 +03:00
Ilya Muradyan 014765a302 Add dependencies-maven-all artifact 2021-07-19 21:31:48 +03:00
Ilya Muradyan f7c2adae30 Always use wagon classloader as a plexus class world
In CLI compiler, system classloader doesn't load all classes directly,
so wagons (including HttpWagon) happen to be invisible to
Plexus DI that leads to artifacts download failures.
2021-07-19 21:31:46 +03:00
Ilya Chernikov 0cd29adcc7 Get rid of kotlinx-coroutines usage in scripting libs and plugins
the dependency on the coroutines library caused various problems like
KT-30778, or stdlib/runtime version conflicts.
The only function used was `runBlocking`, so this change replaces it
with the internal implementation based on the similar internal thing
from the stdlib.
#KT-30778 fixed
2021-07-19 16:35:36 +03:00
Mikhail Glukhikh 5871f3d663 CLI: support -option=value syntax for non-advanced flags #KT-47640 Fixed 2021-07-12 21:26:19 +03:00
Yan Zhulanow cf65754ea4 Update 203 bunch 2021-07-08 13:29:18 +03:00
Ilya Chernikov 6911860cca Clean-up coroutines usage in scripting libs and plugin
#KT-30778 fixed (again)
2021-07-05 19:26:42 +03:00
Ilya Chernikov 49e0b639f8 Add JSR-223 tests with compilable and bindings 2021-07-05 19:26:40 +03:00
Ilya Chernikov 32b6cfe2ea [Scripting] fix receiver substitution in script JVM IR lowering 2021-07-05 19:26:39 +03:00
Yahor Berdnikau 7789054547 Migrate repo to use JVM toolchains Gradle feature.
^KT-46972 Fixed
2021-07-05 14:11:12 +00:00
Nikolay Krasko 32f811e0ec Build: Cleanup old platforms from the build 2021-06-09 17:43:53 +03:00
Ilya Muradyan 23faacd21b [Scripting] Expose scripting-dependencies as API of Maven resolver 2021-05-22 04:10:39 +03:00
Ilya Muradyan 0e7d690923 [Scripting] Change compile to implementation in Maven resolver 2021-05-22 00:38:46 +03:00
Ilya Muradyan bead0e3412 [Scripting] Fix Maven resolver dependencies 2021-05-22 00:38:44 +03:00
Ilya Muradyan 7caadd87a2 [Scripting] Get rid of unneeded dependencies in Maven resolver 2021-05-19 18:32:48 +03:00
Ilya Muradyan 55a9f1a910 [Scripting] Make AetherResolveSession internal and do related refactorings 2021-05-17 18:22:29 +03:00
Ilya Muradyan a0cc88ab5a [Scripting] Add transitive support for Maven Resolver 2021-05-17 18:22:28 +03:00
Ilya Muradyan b77a822822 [Scripting] Add authorization for Maven Resolver 2021-05-17 18:22:26 +03:00
Ilya Muradyan 78c65ab802 [Scripting] Bump up Maven resolver JARs version 2021-05-17 18:22:25 +03:00
Ilya Muradyan bab5d16001 [REPL] Stop old classpath calculation on the base classloader
The mechanism of the recursive classpath checking is intended
 for the "inner" scripting/REPL classloaders and should not touch
 anything beyond.
2021-05-12 18:30:43 +03:00
Ilya Muradyan 626c1d3b48 [Scripting] Fix repository ID generation for Maven resolver 2021-05-10 19:40:32 +03:00
Ilya Muradyan 7cea639209 chore: fix typo in comment 2021-05-10 19:40:31 +03:00
Ilya Muradyan e9af2849ef Add Kotlin DeprecationLevel into the REPL completion 2021-05-07 19:56:21 +03:00
Abduqodiri Qurbonzoda 40d1849f33 Migrate compiler, idea and others to new case conversion api 2021-04-08 03:22:02 +03:00