Commit Graph

82 Commits

Author SHA1 Message Date
Ilya Chernikov
cc4aedb807 Move the rest of script descriptor implementation details to plugin, cleanup 2019-02-21 15:59:48 +01:00
Ilya Chernikov
dafb2a7519 Drop unused classes and references 2019-02-10 13:31:55 +01:00
Mikhael Bogdanov
a122cba862 Switch Kotlin project to jvm-target 1.8
#KT-29405
2019-01-31 07:43:05 +01:00
Sergey Rostov
f35185b261 Build: remove explicit dependencies to org.jetbrains.annotations 2019-01-28 13:43:08 +03:00
Vyacheslav Gerasimov
f58acbeef5 Build: implement useBootstrapStdlib flag
Excludes stdlib projects from build and uses bootstrap stdlib artifacts

 #KT-29205
2019-01-21 21:09:40 +03:00
Dmitry Savvinov
69fff12384 Drop LockBasedStorageManager.defaultDebugName, use meaningful name everywhere
Also, drop `createDelegatingWithSameLock` as it was unused
2019-01-14 11:10:37 +03:00
Sergey Rostov
883970fadb Add explicit dependencies to nullable annotations 2018-12-26 09:07:06 +03:00
Ilya Chernikov
5602bcf9e1 Fix vararg argument mapping for generic args convertor 2018-12-13 18:00:07 +01:00
Sergey Rostov
df2e4524d7 Move resources from /src to separate /resources directory.
Previously this files was stored in /src directory and was included in
resources mainly by SourceSet.projectDefault from sourceSets.kt:

val processResources = tasks.getByName(processResourcesTaskName) as ProcessResources
processResources.from("resources") { include("**") }
processResources.from("src") { include("META-INF/**", "**/*.properties") }

Also there are some custom rules like this:

resources.srcDir("../idea-analysis/src").apply { include("**/*.properties") }
resources.srcDirs("idea-repl/src").apply { include("META-INF/**") }

All this rules are synthesized in script
https://github.com/snrostov/kotlin-migrate-resources/blob/master/src/main/kotlin/main.kt

This commit created using that script. See README.md for more details on
 script.
2018-11-30 15:01:01 +03:00
Ilya Gorbunov
a64a76d5fc Remove experimental coroutines opt-in from build scripts
It has no effect in Kotlin 1.3

Only enable coroutines if '-ReleaseCoroutines' is used
2018-11-09 04:00:26 +03:00
Dmitry Petrov
0191e3d1cf Migrate to release coroutines 2018-09-27 21:59:31 +03:00
Ilya Gorbunov
a18770fbbb Remove projectDist dependency helper usages
Use default configuration dependencies instead of projectDist ones.
2018-09-12 06:05:05 +03:00
Mikhail Zarechenskiy
659289b41a Report diagnostics about experimentality on unsigned literals
#KT-25580 Fixed
2018-08-06 17:45:22 +03:00
Ilya Chernikov
9549736d35 Fixes after review 2018-07-10 08:43:52 +02:00
Ilya Chernikov
9453834fb1 Create proper constructor in script descriptor
allows to resolve calls to scripts in compiler (but not in the IDE yet)
Some refactorings on the way
2018-07-10 08:43:50 +02:00
Ilya Chernikov
6fdb8746de Fixes after review 2018-05-28 22:10:56 +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
Natalia Selezneva
082916be70 Refactoring of ScriptDependenciesUpdater
Extract classes for sync and async dependencies loading
2018-05-11 15:51:14 +03:00
Ilya Chernikov
d05f67127d Move scripting configuration into compiler plugin 2018-04-04 16:23:55 +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
Natalia Selezneva
15914dac86 Add ScriptExpectedLocations annotation to script-runtime.
It describes where script file can be found.
2018-03-30 14:43:17 +03:00
Alexey Tsvetkov
8a82c1618c Use Plugins DSL in Kotlin Gradle scripts
When plugins DSL is used, there is no need to
manually generate typesafe accessors for extensions and
conventions (by running `./gradlew kotlinDslAccessorsSnapshot`).
2018-03-26 16:09:29 +03:00
Ilya Chernikov
d6792f5f52 Implement support for additional compiler arguments for scripts in IDE
fixes #KT-19120
2018-03-19 11:45:10 +01:00
Natalia Selezneva
dcea9d0cd5 Add FATAL severity to script dependencies resolve result 2018-03-17 00:23:57 +03:00
Alexey Tsvetkov
ccd6263787 Use runtimeOnly dependency in kotlin-reflect
"kotlin-reflect" is a shadow jar which breaks incremental compilation
to avoid non-incremental builds, project should add
* `compileOnly` dependency on ":kotlin-reflect-api"
* `runtimeOnly` dependency on ":kotlin-reflect"
* `runtime` dependency is not recommended because it leaks into compile
* classpath
through transitive dependencies
2018-03-12 16:09:04 +03:00
Yan Zhulanow
34d1611ed4 Add Pill support to compiler and IDE modules 2018-03-02 03:15:17 +03:00
Ilya Chernikov
e38d5395df Pass previous dependencies to the legacy script dependency resolvers
fixes #KT-22753
2018-02-09 11:03:43 +01:00
Ilya Chernikov
0a95e7b20f Fix dependencies and artifacts contents after review 2018-01-30 17:06:16 +03:00
Ilya Chernikov
7e21573cf4 Convert the rest of the project to intellij repo prepared in buildSrc 2018-01-30 17:06:13 +03:00
Ilya Chernikov
4eb557724c Convert compiler projects to the new intellij deps 2018-01-30 17:06:13 +03:00
Ilya Chernikov
a4f28cd94f Make all dependencies to idea sdk intransitive 2018-01-30 17:06:11 +03:00
Ilya Chernikov
8f96157d7f Switch kotlinx-coroutines usages to regular dependency 2018-01-30 17:06:09 +03:00
Alexander Udalov
907f53e539 Refactor ConstantValue implementations
Remove KotlinBuiltIns and take a ModuleDescriptor instance in getType
instead. This will allow to create constant values in contexts where
there's no module or built-ins accessible (such as, deserialization of
module annotations during indexing of .kotlin_module files in IDE).

Note that some values (KClassValue, EnumValue, AnnotationValue) still
take module-dependent objects (KotlinType, ClassDescriptor and
AnnotationDescriptor respectively). This is to be refactored later
2018-01-18 12:49:38 +01:00
Denis Zharkov
886d3ef3a6 Optimize KotlinScriptDefinitionFromAnnotatedTemplate::isScript
Avoid multiple pattern compilation for script file regex
2018-01-15 18:20:27 +03:00
Alexander Udalov
aca74cef0e Replace dependencies on kotlin-reflect with kotlin-reflect-api
See the previous commit for information on the kotlin-reflect vs
kotlin-reflect-api distinction.

Add kotlin-reflect as an explicit runtime dependency of most of the test
configurations because even though they all depend on tests-common, the
runtime dependency on kotlin-reflect is not exported from tests-common
to other modules because the projectTests dependency is not transitive.
2017-11-28 12:35:49 +01:00
Pavel V. Talanov
cdfdc1d19b Refactor script definitions loading
Make ScriptDefinitionProvider an interface
    and provide different implementation for cli and IDEA
Rework ide extension point to a simpler interface (ScriptDefinitionContributor)
Move template loading logic into a top level function
Allow script definitions to be reloaded in IDE
2017-11-14 16:30:33 +03:00
Alexander Udalov
d782c8a644 Use ServiceLoader instead of IntelliJ extensions for ScriptHelper 2017-11-13 13:04:54 +01:00
Pavel V. Talanov
df4b90fcb6 Scripts: Accept objects as DependenciesResolver implementations
Fixes DependenciesResolver.NoDependencies causing "missing constructor without parameters" warning
2017-10-12 19:22:59 +03:00
Ilya Chernikov
fd1b677904 Switch reflect to compiled core classes 2017-09-19 23:58:32 +02:00
Ilya Chernikov
d039d191f2 Fix tests in the new build infrastructure 2017-09-19 23:58:30 +02:00
Alexander Podkhalyuzin
3f8170d369 Clean idea files generated on the gradle import, add them to .gitignore 2017-09-19 23:58:27 +02:00
Ilya Chernikov
27968c8e13 Set proper jvmTarget for projects 2017-09-19 21:37:27 +02:00
Ilya Chernikov
deda50dbbb Continue switching projects to improved dsl: sourceSets and test running 2017-09-19 21:37:26 +02:00
Ilya Chernikov
aa4fdaa713 Implement publishing in the build 2017-09-19 21:37:13 +02:00
Ilya Chernikov
61dfb75e0e Implement Gradle Kotlin DSL build 2017-09-19 21:37:06 +02:00
Pavel V. Talanov
c132f3b0d1 KT-19276: Drop exception logging on loading script definitions failure
See YT discussion
Have to come up with more meaningful diagnostics on definition loading

#KT-19276 Fixed
2017-08-18 19:11:35 +03:00
Mikhail Glukhikh
c5a81691fb Partial code cleanup: can be private and some others applied 2017-08-01 17:08:56 +03:00
Pavel V. Talanov
b0b2c046b2 script.runtime 1.1.4: IDE and compiler use 'kotlin.script.experimental' 2017-07-30 18:15:41 +03:00
Pavel V. Talanov
f1811e7f0e Minor, more precise error message 2017-07-24 18:56:14 +03:00
Pavel V. Talanov
5faad493b4 Catch and report exceptions from DependenciesResolver 2017-07-19 12:29:25 +03:00