Commit Graph

6479 Commits

Author SHA1 Message Date
Anton Bannykh b684c2f8d7 Revert "JS IR gradle plugin: don't run IC for the main module"
This reverts commit 525c5b886f.
2021-11-19 00:38:48 +03:00
Zac Sweers 7f5eb3f5ff Fix incorrect kapt classpath error message.
The correct value is `kapt.include.compile.classpath`

^KT-47002 Fixed
2021-11-18 16:43:45 +01:00
Ivan Gavrilovic 684273783f Kotlin Gradle Plugin - clean caches for in-process compilation
This is to prevent file handle leaks on Windows. This
commit disposes KotlinCoreEnvironment used during
in-process compilation.

^KT-49772 Fixed
2021-11-18 16:20:10 +01:00
Yahor Berdnikau 4c3404888a Set minimal supported Gradle version to 6.7.1.
^KT-49733 Fixed
2021-11-17 14:10:24 +00:00
Ilya Goncharov fb6eb414ad [Gradle, JS] Fix afterEvaluate not inside task configuration 2021-11-17 12:19:39 +03:00
sebastian.sellmair bec2f89a07 [Gradle, MPP] Fix 'getCommonizerTarget' for source sets participating in multiple compilations of the same konanTarget
The previous implementation would return a 'SharedCommonizerTarget'
containing just a single leaf target. This would trigger the commonizer.
The new implementation will correctly return just a single
LeafCommonizerTarget instead.

^KT-49735 Verification Pending
2021-11-16 23:07:47 +00:00
konstantin.tskhovrebov cb37424831 Update K/N to "1.6.20-dev-5356". 2021-11-16 23:10:10 +03:00
sebastian.sellmair 7d56ef1925 [Gradle, MPP] Implement kotlin.mpp.absentAndroidTarget.nowarn flag
^KT-41641 Verification Pending
2021-11-15 16:15:18 +00:00
sebastian.sellmair c56c503426 [Gradle] Implement 'Project.kotlinPropertiesProvider' extension
This extension should increase discoverability over the previous
'PropertiesProvider(project)' API
2021-11-15 16:15:17 +00:00
sebastian.sellmair 373dcef45d [Gradle, MPP] Mention multiplatform in absent android target warning
^KT-41641 Verification Pending
2021-11-15 16:15:17 +00:00
sebastian.sellmair bf04f821d6 [Gradle, MPP] Print warning on absent 'android' targets
^KT-41641 Verification Pending
2021-11-15 16:15:16 +00:00
sebastian.sellmair db21bfe13b [Gradle, MPP] findAndroidTarget: Return null when missing
Prior to this change a 'Collection is empty.' error was reported
when the Android plugin was applied without an Android Kotlin target
being registered.

^KT-41641 Verification Pending
2021-11-15 16:15:16 +00:00
Igor Chevdar 03d8a3927b [gradle] Made KotlinToolRunner public to use in K/N build 2021-11-15 12:42:24 +05:00
Andrey Uskov 9826984c4a Report flag use-fir in Gradle statistics
#KT-49633 Fixed
2021-11-12 18:13:41 +03:00
Andrey Uskov b5456539aa More stable reporting of compilation in statistics 2021-11-12 18:13:40 +03:00
Andrey Uskov 2fe337f58a Fixed flakiness of BuildSessionLoggerTest 2021-11-12 18:13:39 +03:00
Igor Chevdar b474b570a4 [K/N][gradle] Supported friend modules for two stage compilation
Fixes https://youtrack.jetbrains.com/issue/KT-49248
2021-11-12 17:40:26 +05:00
Ilya Goncharov 3ef5e36425 [Gradle, JS] Use formal check of klibs in gradle plugin 2021-11-11 10:25:53 +00:00
Yahor Berdnikau 18ff64a28f Move jvm toolchain tests under jvm platform test tag.
^KT-45745 In Progress
2021-11-11 10:46:35 +01:00
sebastian.sellmair 1a0e2ad074 [Gradle][MPP] Composite metadata jar: Use "$sourceSetName-cinterop" directory for cinterops
This convention seems to be more robust against clashes against user
specified source set names. We could potentially foresee users to
use "cinterop" as source set name, but the pattern
 $sourceSetName-cinterop seems robust enough.

^KT-49596 Verification Pending
2021-11-09 16:34:33 +00:00
sebastian.sellmair ea669ce076 [Gradle][MPP] Assert sourceSetCInteropMetadataDirectory on deserialized older metadata files
^KT-49596 Verification Pending
2021-11-09 16:34:33 +00:00
sebastian.sellmair bd8aa8ae3d [Gradle][MPP] Include cinterop metadata directory in kotlin-project-structure-metadata.json
- Also increase the KotlinProjectStructureMetadata's format
version to 0.3.2

- Move new default location into /cinterop/{sourceSetName}

^KT-49596 Verification Pending
2021-11-09 16:34:32 +00:00
Alexander Udalov f5dd0abb76 Render JVM default flags in kotlinp 2021-11-09 15:09:29 +01:00
Hung Nguyen bd7c2ae6d7 KT-45777: Snapshot Java classes using ASM analysis directly
This is faster than the current approach which creates
`JavaClassDescriptor`s, converts them to protos, and then snapshots
these protos.

- Refactor unit tests to faciliate further changes
- moves test data to a directory that matches the tests' package name
- moves expected snapshots to a separate directory
- adds public and private fields/properties to sample class
- Compute changes between ASM-based Java class snapshots
- Don't collect members of an added Java class as changes
as it's enough to report the name of the added Java class as changed (we
also do that for added Kotlin classes and Kotlin/Java removed classes).
- Add unit tests for impact analysis in advance
- Compute impacted symbols of changed symbols
Also do not collect added classes/class members as they don't impact
recompilation.
-Use ClassId when computing Java class changes
It is more precise than JvmClassName, which can be ambiguous around the
`$` character (e.g., ClassId "com/example/A$B.C" and "com/example/A.B$C"
both have the same JvmClassName "com/example/A$B$C").
- Compute impacted set of changed symbols across Kotlin and Java
- Add unit tests for impact analysis across Kotlin and Java
- Compute supertypes of Kotlin classes during snapshotting
- Handle inner classes when computing list of changed symbols.
For the reported symbols, always check all options:
class member, inner class, top level class, top level member.

Test: IncrementalJavaChangeClasspathSnapshotIT.testAddingInnerClass
2021-11-09 13:57:56 +03:00
sebastian.sellmair 099a7525ab [Gradle][MPP] Improve error message for missing metadata extractor
^KT-46198
2021-11-08 16:43:54 +00:00
sebastian.sellmair e73273b139 [Gradle][MPP] Refine zipUtils.kt & implement ZipUtilsTest.kt
^KT-46198
2021-11-08 16:43:54 +00:00
sebastian.sellmair dea434b6d5 [Gradle][MPP] CompositeMetadataJar: Support omitted directory entries
^KT-46198
2021-11-08 16:43:54 +00:00
sebastian.sellmair 05364fa958 [Gradle][MPP] Implement CompositeMetadataJarTest
^KT-46198
2021-11-08 16:43:53 +00:00
sebastian.sellmair 911110188e [Gradle][MPP] Adjust CommonizerHierarchicalIT for published cinteorp metadata
^KT-46198
2021-11-08 16:43:53 +00:00
sebastian.sellmair 5f125006f7 [Gradle][MPP] MppCInteropDependencyTransformationIT
^KT-46198
2021-11-08 16:43:52 +00:00
sebastian.sellmair 86296a8ced [Gradle][MPP] Implement cinterop metadata dependency transformation
^KT-46198 Verification Pending
2021-11-08 16:43:52 +00:00
sebastian.sellmair 9e1fd37685 [Gradle][MPP] Include commonized cinterops in host specific metadata artifacts
^KT-46198
2021-11-08 16:43:51 +00:00
sebastian.sellmair 2dda5f6ed2 [Gradle][MPP] Bundle cinterop metadata in allMetadata klib
^KT-46198
2021-11-08 16:43:51 +00:00
sebastian.sellmair 94c68c99a0 [Gradle] Minor: KotlinNativeTargetConfigurator: Replace deprecated destinationDir
^KT-46198
2021-11-08 16:43:50 +00:00
sebastian.sellmair aee2894fa6 [Gradle] Minor: KotlinToolRunner: Replace deprecated 'setMain'
^KT-46198
2021-11-08 16:43:50 +00:00
sebastian.sellmair 78b168711c [Gradle] Minor: KotlinPlugin: Replace deprecated destinationDir
^KT-46198
2021-11-08 16:43:49 +00:00
sebastian.sellmair 5902e3d0fd [Gradle] Minor: Improve readability of GranularMetadataTransformation.kt
^KT-46198
2021-11-08 16:43:49 +00:00
sebastian.sellmair df7ab52505 [Gradle] Minor: Demote visibility of '.commonizeCInteropLibraries'
^KT-46198
2021-11-08 16:43:48 +00:00
sebastian.sellmair afa320a7b2 [Gradle] Minor: Move locateOrRegisterTask from CommonizerTasks.kt to TaskProviders.kt
^KT-46198
2021-11-08 16:43:48 +00:00
sebastian.sellmair 3bd36770cb [Gradle] Minor: Add return type for ModuleIds.fromDependency
^KT-46198
2021-11-08 16:43:48 +00:00
sebastian.sellmair 7c77ff83a7 [Gradle] Minor: Project.filesProvider add possibility to specify buildDependencies
^KT-46198
2021-11-08 16:43:47 +00:00
sebastian.sellmair 33e391583d [Gradle] Minor: Refactor AbstractCInteropCommonizerTask to extensions
^KT-46198
2021-11-08 16:43:47 +00:00
Michael Rittmeister 21a1582a83 Fix ExplicitApiMode.Disabled 2021-11-08 18:57:39 +03:00
Ilya Goncharov c464cabd44 [Gradle, JS] Use yarn.lock name by default 2021-11-08 17:54:15 +03:00
konstantin.tskhovrebov d9f5ef2f91 Add dSYMs to release XCFramework.
#KT-49484
2021-11-08 10:01:35 +00:00
Igor Laevsky 36d9001d54 [Wasm] Teach gradle plugin to run wasm unit tests for nodejs and Mocha 2021-11-03 16:23:02 +03:00
Yahor Berdnikau 5a11446c79 Migrate KotlinDaemonIT tests to new test dsl.
^KT-45745 In Progress
2021-11-03 13:34:52 +01:00
Yahor Berdnikau a6436adc17 Add KGPDaemonsBaseTest class as test base for daemons test.
This class will stop Gradle and Kotlin daemons after each test
execution.

^KT-45745 In Progress
2021-11-03 13:34:48 +01:00
Ilya Goncharov 540419a5d7 [Gradle, JS] Do not force dukat in separate dukat task
^KT-34014 fixed
^KT-49505 fixed
2021-11-03 09:53:54 +00:00
Ilya Goncharov 9c4aa8fe84 [Gradle, JS] Fix unit test after changes of test infrastructure 2021-11-03 09:53:54 +00:00