Commit Graph

29 Commits

Author SHA1 Message Date
Yahor Berdnikau 6b19b8b9d0 [Repo] Don't use kotlinOptions in repo build scripts
^KT-63419 In Progress
2024-02-22 14:48:10 +00:00
Ilya Muradyan 841cc8eb43 Scripting, KT-61727: Make it possible to resolve multiple artifacts at once
For MavenDependenciesResolver it improves performance drastically
depending on how strong transitive dependencies of the roots interfere

^KT-61727 Fixed
2023-09-14 12:14:32 +00:00
Alexander.Likhachev 53fde520d5 [Build] Add jUnit dependencies in testApiJUnit5 to the implementation configuration
Adding these dependencies to the `api` configuration pollutes classpath for each dependant modules even if it doesn't need them. Instead, the dependencies should be declared more granularly if they're required
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 357d12fc8e [Build] Move JUnit dependencies into the version catalog
The `kotlin-test` dependencies are left untouched as changing them affects publications, thus these versions are independent from the used inside our build
#KTI-1349 In Progress
2023-09-06 22:47:33 +00:00
Ilya Muradyan 551a481dc5 [Scripting] Add partial transitive resolution to Maven resolver 2022-09-12 14:11:04 +02:00
Vsevolod Tolstopyatov 14b13a2f17 [kotlin.reflect] Introduce ClassValue-based cache for KClassImpl
* Replace pcollections with ClassValue/ConcurrentHashMap-based caches
* Do not store weak references, instead cache strong references and count on ClassValue to unload the corresponding classloader if necessary
* ConcurrentHashMap does not rely on WeakReference as it's only selected on Android where classloader leaks don't exist
* Update reflect/scripting JDK requirement to Java 8 in order to proceed

#KT-53454
#KT-50705


Merge-request: KT-MR-6788
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
2022-08-05 15:35:34 +00:00
Yahor Berdnikau af6f17c243 Unify kotlinCompilerClasspath for all projects
This will prevent spawning second Kotlin daemon during compilation
except 'buildSrc' compilation. Original change was introduced in
2e515f3945 commit.
2022-05-24 07:58:38 +00:00
Ilya Muradyan 46563e93ea [Scripting] Allow transitive resolution of non-JAR artifacts
It allows to resolve libraries sources which is crucial for
Kotlin Notebook plugin.
2022-05-16 11:45:47 +00:00
Ilya Muradyan 537ae662d7 [Scripting] Pass exception when constructing ScriptDiagnostic 2022-05-06 13:01:32 +00:00
Alexander Udalov 2e515f3945 Prohibit JVM target 1.6
But still compile stdlib, reflect, kotlin.test and scripting runtimes
with JVM target 1.6 to simplify migration from Kotlin 1.6 to 1.7.

 #KT-45165 Fixed
2022-04-19 22:54:40 +02:00
Vyacheslav Gerasimov bc2f0936bd Build: Rename commonDep -> commonDependency 2021-12-16 21:48:19 +03:00
Ilya Muradyan a22c8c8f2f [scripting] Fix script resolver options parsing
#KT-49400 Fixed
2021-10-25 04:15:35 +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
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
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
Ilya Chernikov 6911860cca Clean-up coroutines usage in scripting libs and plugin
#KT-30778 fixed (again)
2021-07-05 19:26:42 +03:00
Yahor Berdnikau 7789054547 Migrate repo to use JVM toolchains Gradle feature.
^KT-46972 Fixed
2021-07-05 14:11:12 +00: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
Abduqodiri Qurbonzoda 40d1849f33 Migrate compiler, idea and others to new case conversion api 2021-04-08 03:22:02 +03:00
Alexander Udalov 1d6b198915 Build: suppress version and JVM target warnings
To further reduce the output on each build.
2021-02-18 12:17:17 +01:00
Ilya Gorbunov b2b2629e79 Use new kotlin.io.path API in tests 2020-11-20 09:03:25 +03:00
Ilya Muradyan 1ac9b4c38f Add dependency scopes option for scripting resolvers 2020-07-14 23:42:00 +03:00
Mathias Quintero e45e491718 Add options param to external dependencies resolver API 2020-06-10 16:28:41 +02:00
Mathias Quintero 83087291df Add API to get locations of collected script annotations
#KT-38404 fixed

also:
- Add wrapper class for the location combined with the location id
- Add source code location parameters to external dependency resolvers
- Add tests for locations in annotations
- Add tests for order of annotation resolution for dependencies resolvers
2020-06-10 16:28:41 +02:00
Ilya Chernikov c112d37ac1 Consolidate resolving in the new lib, deprecate it in script-util
also deprecate Import and CompileOptions annotations, because they
do not seem generic enough. Create specific copie in the main-kts
instead.
2020-05-21 16:49:57 +02:00
Ilya Chernikov b96109f23f Add diagnostic code to the ScriptDiagnostic
to allow checking for specific errors, e.g. incomplete statements in
the REPL
2020-02-13 11:33:40 +01:00
Ilya Chernikov b73625ad9e Switch main-kts to the updated resolvers infrastructure 2019-11-25 14:46:32 +01:00
Anatoly Nikitin c7e9a6c5d9 Add new script dependency resolvers
Changes in new API for dependency resolvers (GenericDependenciesResolver) comparing to an old one (GenericResolver:
- Add ability to fast check whether artifact or repository is suitable for current resolver to distinguish between unsuitable resolvers and resolution failures
- Return all artifact resolution failures in ResultWithDiagnostics
- Use single string for artifact coordinates
- Add compound resolver that combines several resolvers
- Merge Direct and FlatLib resolver into single FileSystemDependencyResolver
- Mark resolve() method as suspend to indicate long operation
- Add credentials support for maven resolver (https://youtrack.jetbrains.com/issue/KT-27701)
2019-11-14 08:38:50 +01:00