181 Commits

Author SHA1 Message Date
Bogdan Mukvich c6aac835e5 Update SPDX gradle plugin
* fixes SPDX Gradle plugin to be used with configuration cache
* allows removing output workaround for multimodule builds

KTI-1427
2024-03-11 14:22:06 +00:00
cristiangarcia cb0d78d443 singleOutputFile() method used Task.getProject() and that's not allowed with CC
Required for KTI-1553
2024-02-09 21:35:03 +00:00
Brian Norman aa34282efb [PowerAssert] Integrate with build
^KT-63617 Fixed
2024-02-07 21:51:17 +00:00
cristiangarcia c53ac2e91f Update Proguard to 7.4.1 2024-01-25 11:36:31 +00:00
Ilya Kirillov a97518a903 [kapt] fix KAPT tests failing with ClassNotFoundException: com.intellij.openapi.roots.ContentIterator
The failing tests are in  `org.jetbrains.kotlin.kapt.cli.tes.Kapt4ToolIntegrationTestGenerated`
2024-01-23 09:09:37 +00:00
Ilya Kirillov dd4b1abc6a Fix multiple allocations of empty PersistentMap in PersistentSetMultimap
The `persistentMapOf` overload without arguments should be used there.

The needed overload is not available in the version of `kotlinx.immmutable 0.3.2`,
so the library is updated to the latest version.

This commit also removes the dependency on the `kotlinx-collections-immutable-metadata`
as it's not published anymore for new versions of `kotlinx-collections-immutable`.

^KT-64987 fixed
2024-01-19 15:19:41 +00:00
Ilya Gorbunov 653fc03cbc Replace kotlin-test project dependencies in dist
KT-61969
2023-12-13 15:40:25 +00:00
Alexander.Likhachev a19bd2ed2e [Build] Migrate most of the build logic from Project.buildDir usage
It's going to be deprecated in Gradle 8.3

There's currently no way to pass a `org.gradle.api.provider.Provider` to the JavaExec.systemProperty or Test.systemProperty. There's a workaround using `org.gradle.process.CommandLineArgumentProvider`, but I intentionally don't rework these calls as Gradle is going to allow passing providers to configure system properties: https://github.com/gradle/gradle/issues/12247#issuecomment-1568427242
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Ilya Goncharov 51c6e81de9 [JS] Drop publishing JAR artifact of kotlin-test-js
^KT-62067 fixed
2023-10-16 13:34:37 +00:00
Dmitriy Novozhilov b9744f5315 [Build] Remove incorrect dependency from :kotlin-compiler for JPS build 2023-10-09 07:46:50 +00:00
Ilya Gorbunov 785d6858ea KT-62004 Drop legacy JS build of kotlin-stdlib
- preserve kotlin-stdlib-js.jar in dist and maven
- change packaging to klib in .pom
- fix manifest attributes of kotlin-stdlib-js
2023-10-06 00:46:08 +00:00
Ilya Gorbunov eb813b7837 KT-62004 Drop legacy JS build of kotlin-test 2023-10-06 00:46:08 +00:00
Ilmir Usmanov e5aa737eaf Do not trim getType from com.intellij.lang.jvm.JvmParameter
Since K2 KAPT uses this API, absence of class bodies in classes
from the package leads to java.lang.NoSuchMethodError

 #KT-61879 Fixed
2023-10-04 17:15:05 +00:00
Alexander Udalov 5c19cb3fcb [KAPT4] KT-51982 Implement Kapt4AnalysisHandlerExtension, add KAPT CLI and Gradle IT
Co-authored-by: Alexander Udalov <Alexander.Udalov@jetbrains.com>
2023-08-31 22:19:13 +00:00
Bogdan Mukvich 7b00323b89 [Build] Update guava
Fix some reports from "Show Vulnerable Dependencies"

^KTI-1342
2023-08-25 14:10:37 +00:00
Nataliya.Valtman 6263b67643 Remove gson from compiler fat jar
KT-56438: Fixed
2023-08-16 11:34:49 +00:00
Ilya Gorbunov 7ae443ad7f [stdlib-mpp] Use kotlin-stdlib-common artifact for dist from kotlin-stdlib project 2023-08-11 08:49:23 +00:00
Ilya Gorbunov a4c75338f3 [stdlib-mpp] js artifacts for dist
KT-56106
2023-08-03 14:47:21 +00:00
Pavel Mikhailovskii 083f54aceb [KAPT4] Create basic infrastructure for KAPT4 2023-07-07 11:09:16 +00:00
Alexander Udalov c66bc36382 Build: fix some warnings in buildSrc and build.gradle.kts 2023-06-26 15:42:21 +00:00
Alexander.Likhachev 6e07d432b3 Embed kotlin-build-tools-api into kotlin-compiler
#KT-57398 In Progress
2023-06-23 12:34:23 +00:00
Bogdan Mukvich 303b01b89b Add SBOM configuration for all published artifacts by default 2023-06-06 13:27:26 +00:00
Vyacheslav Gerasimov e0a477f16d Build: Refactor sbom configuration & wire it with main publication 2023-06-06 13:27:25 +00:00
Bogdan Mukvich 02de693a12 Configure SBOM should return artifact 2023-06-06 13:27:25 +00:00
Andrei Klunnyi 6255efa7f7 [KT-58817] Publish K2 script compiler artifact
With this commit kotlin script compiler (as a plugin) becomes
available for IDE.
2023-05-26 12:55:00 +00:00
Yahor Berdnikau eef7c3e834 Publish serialization plugin as kotlin-serialization-compiler-plugin
With this change it will have consistent naming with other compiler plugins.

'-embeddable' was also renamed.

'dist' should contain two identical jar files:
- 'serialization-compiler-plugin.jar'
- 'kotlinx-serialization-compiler-plugin.jar'

^KT-58530 In Progress
2023-05-12 09:31:41 +00:00
Bogdan Mukvich 303f7493cc Do not publish SBOM artifact by default
* In case we generate several artifacts like in kotlin-compiler
there are separate jar and zip modules which differ in content
2023-05-10 16:03:01 +00:00
Bogdan Mukvich bbe5418a85 Add SBOM to dist compiler task 2023-05-10 16:03:01 +00:00
Bogdan Mukvich d78e30a5f5 Generate SBOM for kotlin-compiler.zip 2023-05-09 08:46:07 +00:00
Nikolay Krasko 92a7a74382 [213] Fix proguard rule for ExtensionsArea.registerExtensionPoint
Fix for 6e18b75c73

KTI-1114
2023-05-03 20:46:58 +00:00
Nikolay Krasko 6e18b75c73 [213] Do not remove deprecated ExtensionsArea.registerExtensionPoint
The method is proved to be used in klint project
https://github.com/pinterest/ktlint/blob/c5a81e0d4198fa5cb2cac69967080e01e365b837/ktlint-rule-engine/src/main/kotlin/com/pinterest/ktlint/rule/engine/internal/KotlinPsiFileFactory.kt#L121

There is an issue about the remove: https://github.com/pinterest/ktlint/issues/1981

KTI-1114
2023-04-28 08:25:19 +00:00
nataliya.valtman e34dd043da Add minimal statistic report for JPS build
Fix build stat for gradle 8

#KT-56438 Fixed
2023-04-25 11:29:09 +00:00
Nikolay Krasko 9e00bb8a21 [213] More dependencies aalto + stax2
KTI-1114
2023-04-21 13:19:05 +00:00
Roman Golyshev e388b1df36 [213] Ignore proguard warning about com.intellij.util.io.WalRecord$Companion
KTI-1114
2023-04-21 13:19:04 +00:00
Roman Golyshev d4cffb8a5a [213] Switch to 213 platform
KTI-1114
2023-04-21 13:19:04 +00:00
Jérôme Prinet 24d39ec815 Add task dependency from kotlin-compiler:sourcesJar to :compiler:ir.tree:generateTree
This allows cache hits for `:kotlin-compiler:sourcesJar`

#5094
2023-02-15 17:09:23 +01:00
Yunir Salimzyanov ee32fddbfe KT-55700: fix IDEA import with JPS build enabled 2023-02-14 13:43:58 +00:00
Yunir Salimzyanov 3cb0d489bf KT-55700: fix kotlin-test-sources.jar in compiler lib
to contain both jvm and common parts
as it is made for maven artifacts distribution
2023-02-13 17:42:27 +00:00
Andrey Uskov c9e0100214 Remove experimental implementation of Kotlin Compiler Daemon
#KT-50846 Fixed
2022-12-05 16:02:03 +00:00
Alexander Korepanov d5e9e87538 [JS BE] Drop JS scripting support
JS scripting uses the old IR to JS transformer.
 The new IR to JS transformer can not be used for
 JS scripting out of the box. Patching the new transformer for
 JS scripting is potentially dangerous and requires a lot of effort.
 Dropping JS scripting and the old IR to JS transformer allows to
 refactor and simplify JS BE codebase.
2022-11-04 14:15:15 +00:00
Dmitriy Novozhilov 04dae17333 [Assign plugin] Add assign plugin to the list of plugins for compiler dist 2022-10-04 19:47:34 +00:00
Yahor Berdnikau 286d0d56af Introduce Kotlin compiler options with Gradle Properties API types
Old one is deprecated and delegates to new options. All new options
are marked with task input types, so they could be used as `@Nested`
input.

Generated options are using specific types in generated
compiler options. This should simplify code completion and provide
meaningful hints to user.

At this point repository compilation will fail.

^KT-27301 In Progress
2022-09-19 12:30:39 +02:00
Nikita Bobko 8547cb0afd 5/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

Tests that would break if we put reflect from the minimum supported
IDEA into dist:
* Java11ModulesIntegrationTest
* Java17ModulesIntegrationTest

^ Actually, a lot of tests would fail, but I specifically highlight
those two because the "a lot of tests" can be easily fixed by changing
`ForTestCompileRuntime.reflectJarForTests` to:
```
@NotNull
public static File reflectJarForTests() {
    return assertExists(new File("libraries/reflect/build/libs/kotlin-reflect-1.7.255-SNAPSHOT.jar"));
}
```
`Java11ModulesIntegrationTest` & `Java11ModulesIntegrationTest` cannot
be fixed in principle because those tests use reflect from dist with
help of `JvmArgumentsKt.configureStandardLibs` (not with help of
`ForTestCompileRuntime`). `JvmArgumentsKt.configureStandardLibs` is
about `-no-stdlib` & `-no-reflect` compiler flags. That's why we have to
pack SNAPSHOT reflect into dist.
2022-08-22 15:43:55 +02:00
Nikita Bobko 2a4f3f41aa 2/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

Note: Kotlin Maven artifacts (./gradlew publish) changed their
dependency on kotlin-reflect
2022-08-22 15:43:49 +02:00
Dmitriy Novozhilov c2bf68c9d3 [Lombok] Reorganize module structure of Lombok compiler plugin
Also rename its jar to `kotlin-lombok-compiler-plugin`

^KT-52468 Fixed
2022-06-07 14:12:19 +00:00
Dmitriy Novozhilov 259862d294 [Parcelize] Reorganize module structure of Parcelize plugin
Also mark parcelize as compatible with K2
2022-06-07 14:12:15 +00:00
Hung Nguyen a7403fc615 [New IC] Remove "-dontwarn com.google.gson.**" from compiler.pro
This line was added in commit 8c611e0 to allow the
`incremental-compilation-impl` module to use Gson.

This module is no longer using Gson now (only used by its unit tests),
so we can revert that commit.

^KT-52141 Fixed
2022-04-27 15:26:27 +00:00
Dmitriy Novozhilov 77b3823f78 [Build] Keep some asm classes in proguard rules
Those classes are needed for test framework
2022-04-19 10:49:46 +00:00
Jerome Prinet c067026133 Set task dependencies 2022-04-14 14:21:31 +03:00
Dmitriy Novozhilov ecf4d7cbd1 [Build] Keep com.intellij.openapi.util.text.StringUtil in proguard rules
This class is required for test framework, so without new rule it's
  impossible to use it outside of Kotlin project
2022-04-13 17:09:21 +00:00