Commit Graph

69 Commits

Author SHA1 Message Date
Roman Golyshev ac388010b1 [213] Add missing test runtime dependencies
KTI-1114
2023-04-21 13:19:04 +00:00
Aleksei.Cherepanov 5c039e25fc Pin API and language version to 1.8 for Kotlin facet serialization used by IJ
Facet serialization is located in Kotlin repo, and it uses new(1.9.*) stdlib in compile dependencies. But when it is used by IJ it has previous runtime stdlib dependency (looks like 1.8.0). So here is workaround, that specifies apiVersion and languageVersion, that does not produce such problematic outputs.

#KTIJ-24903 Fixed

Merge-request: KT-MR-9333
Merged-by: Aleksei Cherepanov <aleksei.cherepanov@jetbrains.com>
2023-04-03 09:24:21 +00:00
Nikita Bobko 0a6dadd04d 4/5 Replace source dependency on kotlin-reflect with binary dependency
Review: https://jetbrains.team/p/kt/reviews/6753

Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.

Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276
2022-08-22 15:43:53 +02:00
Nikita Bobko 8f79e833a8 Drop all redundant kotlin-reflect, kotlin-reflect-api dependencies
Review: https://jetbrains.team/p/kt/reviews/6753

All redundant I managed to find, of course.

Why: I'm going to process all reflect dependencies in the next commits.
Cleanup reflect dependency before processing.

They are redundant because:
1. if `compileOnly` then compilation didn't break after dropping the
   dependency
2. if `test*` then tests didn't break after dropping the dependency.
3. `analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts`
   `compiler/fir/checkers/checkers-component-generator/build.gradle.kts`
   Drop `implementation(project(":kotlin-reflect-api"))` because the
   module already depends on
   `implementation(project(":kotlin-reflect"))`
4. `compiler/daemon/daemon-client/build.gradle.kts`. Drop `runtimeOnly`
   because after dropping `compileOnly` compilation didn't break (so
   `runtimeOnly` looks suspicious). Less safe than 1-3
2022-08-22 15:42:57 +02:00
Nikita Bobko 540164a691 Refactoring: Split compilerModulesForJps into "embedded" and "maven"
This small refactoring is needed for the next commit.

This commit doesn't change any semantic.
2022-05-30 17:13:56 +02:00
Nikita Bobko 3569cdda38 JPS plugin: use single source of truth for the classpath
Before this commit `jps/jps-*/build.gradle.kts` list of dependencies
were partially duplicated in the `compilerModulesForJps`

Right now, list of all JPS dependencies is the source of truth.
Actually, I wish I could it do it the other way around -- let the Gradle
do dependency management and correctly produce jars with as less as
possible other libraries being embedded, and as much as poosible
libraries being just dependencies in the pom.xml.

I tried to do so using `embedded` and self-made configurations but
desperately failed, because was getting to big
`kotlin-jps-plugin-classpath` jar. Probably, what I was getting is a
correct classpath, and currently hardcoded classpath may not be
correctly full. Well, at least current classpath is time-proven.
2022-05-30 17:13:56 +02:00
Nikita Bobko 0cb256a999 JPS plugin: Cleanup dependencies
- Some unnecessary dependencies are dropped
- `api` is replaced with `implementation` when it's more appropriate (in
  our case more appropriate everywhere). `implementation` makes it
  easier to analyze dependencies because it doesn't export the
  dependencies
- Regarding: `// Workaround for Gradle dependency resolution error`.
  Actually, it's not longer needed for the successful project import.
  Confirmed by Yahor and tested locally.
2022-05-30 17:13:56 +02:00
Yahor Berdnikau c345f01a79 Fix IDEA Gradle import error 2022-05-02 12:02:30 +02:00
Nikita Bobko c1f2d66ed8 Kotlin JPS plugin: drop intellij-core dependency
Drop dependency because
https://youtrack.jetbrains.com/issue/IDEA-292483/UnsupportedClassVersionError-when-trying-to-run-JUnit5-unit-test#focus=Comments-27-6034750.0-0

IDEA plans to drop `PathUtil` from JPS classpath, we should prepare to
that

`KotlinFacetSettingsProvider` isn't used in jps so it was moved into
intellij repo. It was moved to
`community/plugins/kotlin/idea/src/org/jetbrains/kotlin/config/KotlinFacetSettingsProvider.kt`
path (so you can find it git history)

Review: KT-MR-6195
2022-04-29 14:51:03 +02:00
Yahor Berdnikau 4aa6d984fc Restore "Drop tasks inheritance from 'AbstractCompile' and 'SourceTask'"
This reverts commit 2c5d817633.
2022-03-24 19:02:54 +01:00
Yahor Berdnikau 2c5d817633 Revert "Drop tasks inheritance from 'AbstractCompile' and 'SourceTask'"
This reverts commit e9498c8978.
2022-03-23 19:03:32 +01:00
Yahor Berdnikau e9498c8978 Drop tasks inheritance from 'AbstractCompile' and 'SourceTask'
'AbstractCompile' task has inputs that are related only to Java
compilation and should not used for Kotlin compile tasks.

'SourceTask' most probably will be deprecated in future Gradle releases
- https://github.com/gradle/gradle/issues/9040. Plus it has
old 'sources' with 'FileTree' type which is not stable
for task inputs snapshotting.

Another breaking change - 'destinationDir' task property is not longer
available. It is replaced by 'destinationDirectory' which uses Gradle
Provider API type.

^KT-32805 In Progress
2022-03-22 15:29:05 +00:00
Nikita Bobko a471ddf059 Kotlin JPS: Inject KOTLIN_BUNDLED macro into JPS
KTIJ-21292
2022-03-14 13:53:15 +00:00
Aleksei.Cherepanov 0e0b3e6d75 Add test of Kotlin Lombok project compilation
This test checks that the project with Lombok plugin will be compiled successfully after successful import (KTIJ-20506)

#KTIJ-20641 Fixed
2022-01-28 13:30:42 +00:00
Nikita Bobko 81b4760907 Kotlin JPS plugin: set JVM bytecode target to 1.8
^KTIJ-20854 Fixed
2022-01-25 18:28:25 +00:00
Nikita Bobko fc9000d460 Adopt Kotlin JPS plugin modules Gradle model to kotlin/master
Recenlty, Kotlin repository started using Gradle 7.1.
Deprecated `compile`/`testCompile` Gradle API were dropped in that release
2022-01-12 15:25:17 +01:00
Nikita Bobko fb01b46f6a GenerateTests.kt: restore Kotlin JPS plugin tests schema 2022-01-12 15:25:15 +01:00
Nikita Bobko 3daec9b9ce Use Java 11 in :jps:jps-plugin module in order to fix compilation
IntelliJ uses Java 11 so it forces us to use Java 11 in JPS

This commit fixes:
```
public class DataContainerVersionChangedTestGenerated extends AbstractDataContainerVersionChangedTest {
       ^
  bad class file: /home/bobko/.gradle/caches/modules-2/files-2.1/com.jetbrains.intellij.platform/test-framework/203.8084.24/ba5c6b3b0eae0a083dc30e866c362094f5072853/test-framework-203.8084.24.jar(com/intellij/testFramework/UsefulTestCase.class)
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
```
2022-01-12 15:25:15 +01:00
Nikita Bobko 047272e56f Attach JPS plugin modules to the project model 2022-01-12 15:25:12 +01:00
Nikita Bobko a9cdca40c3 Compilation fixes 2022-01-12 15:25:09 +01:00
Nikita Bobko 7238e64912 [jps] Fix KotlinJpsBundle by adding jps resource dir 2022-01-12 15:11:06 +01:00
Vyacheslav Gerasimov ac5da46004 Cleanup 193 compatibility fixes
Original commit: 3feff16a77
2020-11-11 14:28:54 +03:00
Alexey Tsvetkov da1c48254d Add tests for lookup tracker with JS KLIB compiler
Original commit: 6acf9385bd
2020-04-10 05:35:45 +03:00
Vyacheslav Gerasimov 8b1e8995ed Build: Make all compile dependencies on toolsJar compileOnly
tools.jar differs between different versions of JDK reducing cache reuse
so better to not leak it to other modules

Original commit: 0db69cadb6
2020-02-29 16:35:54 +03:00
Nikolay Krasko e407ead58e 201: openapi.jar is removed
Original commit: 162c2f3dc9
2020-02-11 20:27:59 +03:00
Nikolay Krasko 8c8a7bcc84 Remove 181 branch from build scripts
#KT-33536 Fixed

Original commit: 8ae4293a0f
2019-08-30 12:14:54 +03:00
Nikolay Krasko 96bcadbbba Modify dependencies for 192 branch: more dependencies to full java plugin
Original commit: b7c12014ee
2019-06-26 14:11:23 +03:00
Nikolay Krasko 9ab1814dd5 Update to 192.5118.30
Original commit: beb1bc09d4
2019-06-25 11:48:59 +03:00
Vyacheslav Gerasimov a6167fd77b Build: Fix intellij dependency leak from ir tree module
Original commit: 5a39c637c2
2019-06-13 21:03:55 +03:00
Vadim Brilyantov 1b322bfdeb Move daemon jar from compiler
Original commit: 01a05a5495
2019-05-17 15:51:52 +03:00
Vadim Brilyantov 5b697b0c98 Introduce new Kotlin Daemon without RMI abstraction
Original commit: ced973b707
2019-05-17 15:51:51 +03:00
Mikhael Bogdanov e6fbfcb35b Support parallelization in another IDE tests
Original commit: 0d3f03a15a
2019-04-17 11:22:18 +02:00
Vyacheslav Gerasimov 63f1428139 Build: Improve intellij-sdk repo up-to-date check time & layout
Up-to-date check is very heavy for intellij repo due to artifact size.
If module directory in repo is written only by one task we can assume
that task if up-to-date if target directory exists.

Original commit: fc8be48fa8
2019-03-20 21:29:13 +03:00
Sergey Rostov 6a46dddcff Build: remove explicit dependencies to org.jetbrains.annotations
Original commit: f35185b261
2019-01-28 13:43:08 +03:00
Andrey Uskov 43282fae3d Remove some bunches for build scripts.
Original commit: c85f56a0a8
2018-12-06 19:44:09 +03:00
Nikolay Krasko ab5e07f8e4 191: asm-all has 7.0-beta version in Intellij 191
Pass project to fetch extra parameters for asm-all work

Original commit: 17421ed14d
2018-10-19 19:16:21 +03:00
Ilya Gorbunov 3522140643 Remove projectDist dependency helper usages
Use default configuration dependencies instead of projectDist ones.

Original commit: a18770fbbb
2018-09-12 06:05:05 +03:00
Alexey Tsvetkov 08a6ac910d Build: remove testRuntime dependency on ":kotlin-compiler:dist"
Original commit: 1dea01a479
2018-07-02 22:36:35 +03:00
Alexey Tsvetkov 3657dba063 Fix test dependencies in jps-plugin
Otherwise tests fail on clean checkout

Original commit: 3a7c674957
2018-06-28 22:03:10 +03:00
Sergey Rostov 5f818789cf jps: support multiplatform incremental compilation for jvm and js
- support common modules metadata compilation under flag (it is not required since all common source roots are included transitively for now)
- introduce expect actual tracker in jps: move implementation from gradle to build-common
- support js incremental compilation: move implementation from gradle to build-common

Original commit: 0eee2729cd
2018-06-08 09:46:37 +03:00
Sergey Rostov 79bf8f7c98 jps: support dev kit module types (and all other ModuleBasedBuildTargetType)
#KT-24500 fixed

Original commit: ec5110e1f4
2018-05-24 11:12:01 +03:00
Vyacheslav Gerasimov 440d218436 Switch to 181 platform
Original commit: bc403ce744
2018-04-27 18:25:17 +03:00
Denis Zharkov f4d5649cd5 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

Original commit: 003f381fcd
2018-04-26 16:11:27 +03:00
Alexey Tsvetkov 8a9c76588d 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`).

Original commit: 8a82c1618c
2018-03-26 16:09:29 +03:00
Alexey Tsvetkov b3a619bcc3 Revert "Provide custom ConstantAffectionResolver in JPS"
This reverts commit 1a7737494b.

The API in Intellij was changed, now the issue can be fixed only in
182.* branches.

Original commit: 0deec7983d
2018-03-13 21:26:11 +03:00
Yan Zhulanow 4d1a929809 Add Pill support to compiler and IDE modules
Original commit: 34d1611ed4
2018-03-02 03:15:17 +03:00
Alexey Tsvetkov 1a7737494b Provide custom ConstantAffectionResolver in JPS
#KT-16091 fixed

Original commit: 772a935de6
2018-02-21 19:12:12 +03:00
Vyacheslav Gerasimov 0f68c3017a Remove intellij-core from testRuntime if full idea is already there
Looks like it makes tests flacky

Original commit: 68b5dc756c
2018-01-30 17:06:18 +03:00
Vyacheslav Gerasimov 991ca73c0b Add asm-all to jps-plugin dependencies
Original commit: 29caa00f23
2018-01-30 17:06:18 +03:00
Ilya Chernikov a870208a3b Convert the rest of the project to intellij repo prepared in buildSrc
Original commit: 7e21573cf4
2018-01-30 17:06:13 +03:00