Commit Graph

965 Commits

Author SHA1 Message Date
sebastian.sellmair e91785ba39 [KPM] Implement initial IdeaKotlinProjectModelBuilder
- Introduce `kotlin-gradle-plugin-idea` module that allows
to share models between the IDE and KGP

- Add `kotlin-gradle-plugin-idea` to the RuntimePublicAPITest to
ensure binary compatibility

^KT-51262
2022-02-17 20:19:12 +00:00
Alexander Likhachev 80a68ec433 [Build] Remove local publishing workaround for configuration cache
#KTI-759 Fixed
2022-02-16 08:28:14 +00:00
Yahor Berdnikau ff3a08de6e Cleanup JVM toolchain implementation
Remove support for <Gradle 6.7 and fix extension method to accept
'JavaToolchainSpec' instead of 'Any'.

^KT-47924 Fixed
2022-02-15 09:36:31 +00:00
Yahor Berdnikau 34ca38d1a0 Fix comment in properties was not ignored by property
This lead to inable to spawn Kotlin daemon in buildSrc files compilation
2022-01-25 14:30:03 +01:00
Dmitriy Novozhilov b9c22a5e5e [Build] Add ability to choose which run configurations for modularized tests should be generated 2022-01-23 08:22:07 +03:00
Dmitriy Novozhilov b8e728f0cb [Build] Generate run configurations for modularized tests on Space 2022-01-23 08:22:07 +03:00
Nikolay Krasko 22b5d86656 Stop double null instrumentation for modules with several source roots
KTI-754

For instrumentation only destination directory is relevant. So each
execution did own instrumentation, and there no internal mechanism for
preventing re-instrumentation included.

Replace InstrumentIdeaExtensions with Javac2 because
areJavaClassesCompiled=true in the base class.

https://github.com/JetBrains/intellij-community/blob/9c40bdd/java/compiler/javac2/src/com/intellij/ant/InstrumentIdeaExtensions.java
https://github.com/JetBrains/intellij-community/blob/9c40bdd/java/compiler/javac2/src/com/intellij/ant/Javac2.java
2022-01-19 16:49:07 +03:00
Yahor Berdnikau 1c1e8f3c85 Migrate SubpluginsIT to new test DSL
^KT-45745 In Progress
2022-01-13 10:30:50 +01: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
Ilya Gorbunov 2954769296 KT-50059 Stop publishing artifacts with 'modular' classifier 2021-12-29 17:43:56 +00:00
Yahor Berdnikau 3fca808b63 Revert "Revert "Set minimal supported Gradle version to 6.7.1.""
This reverts commit 2aa1c187d9.

^KT-49733 Fixed
2021-12-27 15:19:15 +01:00
Nikolay Krasko 5b073c2565 Drop ComponentsXmlResourceTransformerPatched
After shadow is updated to 7.1.1, library ComponentsXmlResourceTransformer
should work fine.

The only reason for this patched version was the bug that was fixed in 7.1.0:
https://github.com/johnrengelman/shadow/releases/tag/7.1.0

^KTI-733 Fixed
2021-12-20 21:39:04 +03:00
Nikolay Krasko 85521f01f8 Update shadow plugin 6.1.0 -> 7.1.1
Version 7.1.1 is absent in jcenter, so additional repository was added
in some modules.

Leave old version in NewMultiplatformIT.kt because of
`This version of Shadow supports Gradle 7.0+ only. Please upgrade.` error.

^KTI-733 Fixed
2021-12-20 21:39:00 +03:00
Dmitriy Dolovov cb115a4088 [Build] Extract DefaultTestFilter.commandLineIncludePatterns as a property of Test 2021-12-20 12:35:48 +03:00
Vyacheslav Gerasimov 5369813acc Fix "IdeaWin64.dll not found" error when running tests on Windows 2021-12-17 21:28:10 +03:00
Vyacheslav Gerasimov 84469d0c68 Build: Fix test runtime for kapt tests 2021-12-16 21:48:29 +03:00
Vyacheslav Gerasimov 443cbcbc3c Minor: Reformat and fix warnings in dependencies.kt 2021-12-16 21:48:24 +03:00
Vyacheslav Gerasimov 944c7990a1 Build: Use fake ideaHome for tests with intellij build number only
#KTI-82
2021-12-16 21:48:24 +03:00
Vyacheslav Gerasimov f7a9065b75 Build: Use intellij maven repo instead of downloaded IDEA
#KTI-82
2021-12-16 21:48:23 +03:00
Vyacheslav Gerasimov 9f725da7f7 Build: Stop building ivy repo from full Idea during buildSrc build
#KTI-82
2021-12-16 21:48:22 +03:00
Vyacheslav Gerasimov 0727981ae6 Build: Move kotlinxCollectionsImmutable helper to dependencies.kt 2021-12-16 21:48:21 +03:00
Vyacheslav Gerasimov 269366d8c3 Build: Drop obsolete form instrumentation 2021-12-16 21:48:20 +03:00
Vyacheslav Gerasimov b86e85624e Build: Use annotations dependency from intellij-dependencies maven repo
#KTI-82
2021-12-16 21:48:20 +03:00
Vyacheslav Gerasimov bc2f0936bd Build: Rename commonDep -> commonDependency 2021-12-16 21:48:19 +03:00
Nikolay Krasko bfd540e9e6 Fix compile:android-test:generateAndroidTests
Don't read absent file with disabled plugins during creating Kotlin
core environment.

Exception in thread "main" java.lang.NullPointerException
	at java.io.Reader.<init>(Reader.java:78)
	at java.io.InputStreamReader.<init>(InputStreamReader.java:113)
	at com.intellij.ide.plugins.PluginManagerCore.readBrokenPluginFile(PluginManagerCore.java:249)
	at com.intellij.ide.plugins.PluginManagerCore.getBrokenPluginVersions(PluginManagerCore.java:241)
	at com.intellij.ide.plugins.PluginManagerCore.createLoadingResult(PluginManagerCore.java:822)
	at com.intellij.ide.plugins.DescriptorListLoadingContext.createSingleDescriptorContext(DescriptorListLoadingContext.java:64)
	at com.intellij.ide.plugins.PluginManagerCore.registerExtensionPointAndExtensions(PluginManagerCore.java:1318)
	at com.intellij.core.CoreApplicationEnvironment.registerExtensionPointAndExtensions(CoreApplicationEnvironment.java:287)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.registerApplicationExtensionPointsAndExtensionsFrom(KotlinCoreEnvironment.kt:622)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createApplicationEnvironment(KotlinCoreEnvironment.kt:592)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForTests(KotlinCoreEnvironment.kt:505)
	at org.jetbrains.kotlin.android.tests.CodegenTestsOnAndroidGenerator$FilesWriter.writeFilesOnDisk(CodegenTestsOnAndroidGenerator.kt:214)
	at org.jetbrains.kotlin.android.tests.CodegenTestsOnAndroidGenerator$FilesWriter.writeFilesOnDiskIfNeeded(CodegenTestsOnAndroidGenerator.kt:208)
2021-12-15 19:18:52 +03:00
Yahor Berdnikau c5c606924c Move Kotlin daemon jvm args to kotlin.daemon.jvmargs property 2021-12-15 10:37:52 +00:00
Nikolay Krasko 4e60a2dbe1 Remove unused JUnitMode.Mix mode
It's not used by now, and there's are known problems with it check
KTI-712.

If transition to JUnit5 is needed, creating another module might
be a better option.
2021-12-14 23:07:20 +03:00
Nikolay Krasko 1efd583e14 Fix running nested classes with JUnit 5 causes outer class tests execution
Note: there might be a performance issue with running tests,
the reason why custom filtering was added to the tests running.
It's not tested and should be addressed separately

Try run IrBlackBoxCodegenTestGenerated.Annotations. Everything in the
outer class IrBlackBoxCodegenTestGenerated is run instead.
This is not an IDEA problem, since it reproduces from
the command line too.

^KTI-712 Fixed
2021-12-14 23:07:19 +03:00
Dmitriy Dolovov e0daa96cae [Build] Avoid resetting of DefaultTestFilter.commandLineIncludePatterns 2021-12-13 18:14:43 +03:00
Mikhael Bogdanov 0997207c7c Apply -Xjvm-default for specific modules only 2021-12-03 06:39:38 +01:00
Yahor Berdnikau 2aa1c187d9 Revert "Set minimal supported Gradle version to 6.7.1."
Temporary until 1.6.20 release branching.

This reverts commit 4c3404888a.

^KT-49733 Open
2021-12-02 15:05:54 +03:00
Alexander Udalov 8a7d86c4e5 Build: remove obsolete argument -Xskip-runtime-version-check
It was removed in KT-41664.
2021-11-30 17:13:10 +01:00
Nikolay Krasko 6a2c607862 Return source and javadoc publication for kotlin-test-wasm
Setting packaging to klib didn't work because it was overwritten below.

^KTI-692 Fixed
2021-11-20 10:11:32 +03:00
Nikolay Krasko 272081d8cf Reduce dependency on teamcity.jetbrains.com when downloading dependencies 2021-11-20 00:05:51 +03:00
Yahor Berdnikau 4c3404888a Set minimal supported Gradle version to 6.7.1.
^KT-49733 Fixed
2021-11-17 14:10:24 +00:00
Dmitriy Novozhilov a7bea1ad2f [Build] Add ability to set fixed numbers of JUnit 5 threads via local.properties 2021-11-15 16:50:08 +03:00
Ivan Kylchik 225b064470 Implement new 'mix' test mode
This mode must be used when one configuration will run several tests
for different JUnit versions.
2021-10-25 00:14:20 +03:00
Pavel Kunyavskiy 0bd4dbc0c1 [K/N] Disable debug info in runtime by default
Bundle grows 200mb if debug info is enabled, it's too much.
But probably, this can be useful for debug, so we need gradle option.
2021-10-11 11:45:24 +00:00
Andrey Uskov 4a99f04b41 Add simple test of KAPT working under JDK 16 2021-10-10 16:40:35 +03:00
Alexander Likhachev f27f91b03a [Build] Make JVM target settings logic less imperative
Previously actual value was dependent on the order of calls to `updateJvmTarget` and `configureJava9Compilation` in build script that may lead to inconsistencies
2021-09-29 16:34:11 +00:00
Dmitriy Novozhilov 825ecc3a6f [Build] Remove JDK 15 and 16 from JdkMajorVersion
They are replaced with JDK 17 LTS release
2021-09-28 13:01:48 +03:00
Ilya Kirillov 65b6e7076b Fix cooperative development configuration
Deprecated testCompile was not available, replace with testApi
2021-09-27 21:20:36 +03:00
Vyacheslav Gerasimov 8d2fafa3ce Build: Fix various warnings in build files
Required for Gradle 7+ #KTI-559
2021-09-26 20:10:29 +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
Yahor Berdnikau 24d088242c Use JVM toolchain for buildSrc module.
Before this change buildSrc module was compiled with current user JDK.
For example on CI it is JDK 1.8. But when the user is using JDK
different from 1.8, buildSrc compilation misses remote build cache. This
may lead to full project recomplilation on the user side.
2021-09-22 11:35:07 +00:00
Mikhail Glukhikh ed035d99ab Migrate -Xopt-in to -opt-in in Gradle Kotlin scripts 2021-09-03 15:40:47 +03:00
Ilya Gorbunov ed1bee6975 Setup Kotlin compilation of java 9 source sets consistently
Usually, java 9 source sets contain only module-info.java file, so
Kotlin compilation does not run because there are no .kt sources.
However, it can still start after some incremental changes and
thus it's important to have its JVM target configured consistently
with Java compilation of the same source set.
2021-08-25 18:34:38 +03:00
Nikolay Krasko 9e0ba8c3d2 Clean up 193.6494.7 mentionings 2021-08-12 21:15:30 +03:00
Nikita Bobko dac4fe7507 Adapt coop-dev for 212 platform 2021-08-07 00:07:28 +03:00