Commit Graph

127 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
Alexander Shabalin e8202c3355 [K/N] Simplify dependencies around kotlin-native/ 2024-03-05 21:47:43 +00:00
Alexander Shabalin 24ede14e37 [K/N] Convert :kotlin-native:backend.native buildscript to kts
Use folder structure from the rest of the project and build it by
the bootstrap compiler.
2024-03-05 21:47:43 +00:00
Alexander Shabalin 0542b62430 [K/N] Extract :native:cli-native from kotlin-native/backend.native/cli.bc 2024-03-05 21:47:43 +00:00
Alexander Shabalin bce550dce4 [K/N] Move llvm interop generation to kotlin-native/llvmInterop/ 2024-03-05 21:47:43 +00:00
Alexander Shabalin ab62632a85 [K/N] Move files, env interop generation to kotlin-native/common/ 2024-03-05 21:47:43 +00:00
Alexander Shabalin 5c2017fa5f [K/N] Fix CC in Xcode usage ^KTI-1553
- Perform all calls to xcrun in XcodeValueSource.
- Use the fully computed Xcode instance as the current Xcode instance.
- Hide all of this inside a Gradle plugin and apply it to kotlin-native
  project.
2024-02-28 17:58:41 +00:00
Artem Olkov dd9332d9e1 Add kotlin runtime modulemap for swift export as part of kotlin-native dist #KT-65673 fixed
Co-authored-by: Alexander Shabalin <alexander.shabalin@ashabalin.me>

Merge-request: KT-MR-14493
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-02-26 12:51:57 +00:00
cristiangarcia 4a74498be7 Outputs are not serializable, FileCollection is
Required for KTI-1553
2024-02-09 19:10:03 +00:00
Alexander Shabalin 4468167a64 [K/N] Move kotlin-native/utilities/basic-utils to compiler/utils 2024-02-08 20:43:11 +00:00
Alexander Shabalin 77b9c40434 [K/N] Fix CrossDistBitcodeCopy task outputs 2024-02-08 11:50:21 +00:00
Svyatoslav Scherbina e6785c8dcd [K/N] Don't include RELEASE_NOTES.md into the bundle
This document is outdated and doesn't make much sense anymore, since
the relevant topics are also covered in the documentation.
2024-02-07 14:09:31 +00:00
Bogdan Mukvich 86fa4507d0 Publish native SBOMs with binaries to maven repository
^KTI-1569
2024-02-05 17:16:35 +00:00
Dmitriy Dolovov 478205e6e8 [build] Don't use dependencies on Native backend in KLIB tool
^KT-62340
2024-01-30 16:12:56 +00:00
Sebastian Sellmair e409c60780 [ObjCExport] Split ObjCExport into K1 and Analysis Api implementation
FL-23390
^KT-64168 Fixed
2024-01-08 15:25:19 +00:00
Bogdan Mukvich d5e4c1db50 [K/N] Filter archives by extension for artifact publication
^KTI-1479
2023-12-20 19:05:11 +00:00
Anastasiia Spaseeva 389095e8f7 [K/N]: Do not deploy files containing checksum strings to a Maven repo
^Related to KTI-1479
2023-12-20 00:23:39 +00:00
Bogdan Mukvich 926af575f9 Native: calculate and publish bundle artifacts' checksums
* Fix native publication creation

^Related to KTI-1479
2023-12-18 11:59:16 +00:00
Anastasiia Spaseeva 212b8487ee Native: calculate and publish bundle artifacts' checksums
^Related to KTI-1479
2023-12-17 20:46:46 +00:00
Pavel Punegov fc1d7df0bc [K/N][build] Simplify stdlib build
Build stdlib with a single task that also sets all supported targets
to the manifest file.
Remove manifest merging as it is not needed anymore.
2023-12-14 11:33:20 +00:00
Pavel Punegov 2d2714c8de [K/N] Move runtime bitcode files out of stdlib
Native bitcode files were moved out of the stdlib to the default
location of bitcode files in the dist.
Now it is possible to build stdlib separately and once as a klib
without bitcode files inside.
2023-12-14 11:33:20 +00:00
Ilya Gorbunov 35aa17e1d0 Pack K/N stdlib sources into single zip
With the directory structure similar to one of a multiplatform library,
where each source set sources are placed into the directory
named after this source set.

Do not use legacy projects for building relative paths
2023-12-13 15:40:25 +00:00
Alexander.Likhachev 5e51826050 [Build, K/N] Remove registration and usages of convention.plugins.platformInfo
The entire concept of conventions is deprecated in Gradle. Here it was making the build logic implicit and hard for understanding
^KTI-1473 In Progress
2023-12-07 18:31:07 +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
Sebastian Sellmair 0713866c1e [K/N] Modularise :kotlin-native:native.backend to extract objc header generation (2/2)
^KT-63905 Fixed
2023-12-04 18:52:08 +00:00
Pavel Punegov 9f9b4d1981 [K/N][publish] Publish kotlin-native-compiler-embeddable.jar
Add an ability to publish kotlin-native-compiler-embeddable.jar and
sources to maven. Adds necessary for that sourcesJar and javadocJar
tasks. Note that Native distribution uses this jar without a version postfix.
Also cleaned up the obsolete backend.native publication and renamed 
project to match its name.


Merge-request: KT-MR-12974
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-11-15 14:54:04 +00:00
Alexander Shabalin 4922223bec [K/N] Refactor :kotlin-native:dependencies
Move K/N dependencies handling logic into gradle plugins:

`NativeDependenciesDownloader` is instantiated in
`:kotlin-native:dependencies` and provides a single configuration that
contains all directories with the dependencies. The configuration has
a variant for each target.

`NativeDependencies` is instantiated by projects that require native
dependencies (i.e. previously used to depend on
`:kotlin-native:dependencies:update`). This plugin creates a configuration
that by default depends on `:kotlin-native:dependencies`. Its extension
provides `llvmDependency`, `libffiDependency`, `hostPlatformDependency`,
`targetDependency()` to depend on the parts needed for the project and
provides accessors `llvmPath`, `libffiPath`, `hostPlatform` that are
safe to use during configuration time, but which do not automatically
resolve those dependencies.

`llvmDir`, `*LibffiDir` properties on `:kotlin-native` are removed
completely, as their use is replaced by `NativeDependencies`. As a
consequence, `evaluationDependsOn(":kotlin-native:dependencies")` is
also gone.

All direct dependencies on `:kotlin-native:dependencies:update` are
replaced with dependencies on specific parts via `NativeDependencies`
2023-10-18 10:53:12 +00:00
Bogdan Mukvich 826297979d SBOM for native artifacts
^KTI-1240
2023-08-30 13:20:33 +00:00
Alexander Shabalin 3ec4f2e0ee [K/N] Remove jsinterop because K/N wasm32 target is removed ^KT-59008
See https://kotl.in/native-targets-tiers for details
2023-08-30 12:17:52 +00:00
Alexander Shabalin 18fb2ec476 [K/N] Don't build distribution for deprecated targets ^KT-59008 2023-08-23 11:46:59 +00:00
Dmitrii Krasnov ade88e2b0f Fixed konan.data.dir with caches
Removed TODOs after updating to kotlin bootstrap version with konan.data.dir gradle property changes

Fixed warning of incorrect passing -Xkonan-data-dir arg in konanc from KGP and fixed setting konan-data-dir in SetupConfiguration#setupCommonOptionsForCaches

#KT-60660 Fixed

Merge-request: KT-MR-11299
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-08-22 07:56:26 +00:00
Yahor Berdnikau 380062c511 [repo] Update the shadow version to 8.1.1 release
https://github.com/johnrengelman/shadow/releases/tag/8.1.1
2023-08-09 08:36:46 +00:00
Dmitrii Krasnov f2816a5531 Added property for overriding konan distribution location
#KT-50463 Fixed

Merge-request: KT-MR-10310
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-07-12 12:36:51 +00:00
cristiangarcia 46d113605b Adopt configuration-avoidance where possible
Before this change `./gradlew help` (with native enabled)
Created immediately: 1322
Created during configuration: 1541

after this change:
Created immediately: 596
Created during configuration: 1509

To know more about configuration avoidance: https://docs.gradle.org/current/userguide/task_configuration_avoidance.html
2023-06-06 14:27:42 +00:00
Alexander Shabalin d82a6f2fa2 [K/N] Fix default value of testTarget 2023-05-25 10:32:48 +00:00
Svyatoslav Scherbina 16acb72521 Native: don't pack endorsed libraries (namely kotlinx.cli) into dist
The overall concept of "endorsed" libraries is currently unmaintained
and non-reviewed.
kotlinx-cli is in its alpha, and is available from Maven.

See also KT-54098.
2023-05-15 10:10:56 +00:00
Dmitriy Dolovov 468d524a74 [PL][tests] Run K/N tests (old infra) with PL enabled 2023-04-08 20:46:38 +00:00
Vyacheslav Gerasimov 76c54a8ff3 Build: Fix usages of apis deprecated in Gradle 8 2023-03-20 19:45:39 +00:00
Pavel Punegov 395e3e0f81 [K/N][build] Composite build with build.tools-conventions plugin
Adds convention plugin instead of sources inclusion
inside the buildSrc, effectively reducing the amount
of the code to be compiled in buildSrc.

Merge-request: KT-MR-8898
2023-02-27 10:48:26 +00:00
Pavel Punegov cc258934c4 [K/N][build] Cleanup obsolete build tasks
* Remove obsolete reporting
* Remove old build tasks: BuildPusher and CollisionDetector
* Gradle build file cleanup
* Remove old wrappers

Merge-request: KT-MR-8788
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
(cherry picked from commit a9cae3fe87)
2023-02-16 11:56:34 +00:00
Nikolay Krasko 2ad567e14c Revert "[K/N][build] Cleanup obsolete build tasks"
This reverts commit a9cae3fe87.
2023-02-14 11:30:17 +00:00
Pavel Punegov a9cae3fe87 [K/N][build] Cleanup obsolete build tasks
* Remove obsolete reporting
* Remove old build tasks: BuildPusher and CollisionDetector
* Gradle build file cleanup
* Remove old wrappers

Merge-request: KT-MR-8788
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-02-13 14:02:28 +00:00
Nikita Bobko dff13ec584 Minor klib cleanups
Review: https://jetbrains.team/p/kt/reviews/8401

- Code style
- Drop unused properties in kotlin-native/build.gradle
- kotlin-native/build.gradle: drop unused import
- use final instead of open when possible

This is just a cleanup commit. It neither fixes any issue/bug, nor
introduces new behaviour.

Feel free to revert this commit if you find out that it breaks something
2023-02-01 15:13:34 +01:00
Pavel Punegov c9aeadd31f [K/N] Remove old Compiler and Meta Version ^KT-55677 Fixed
* Replace it with KotlinCompilerVersion
* K/N version should be set now with `deployVersion`.
* Cleanup deprecated functions in older versions
 of the Gradle plugin
* Cleanup tests for older versions of compiler downloader

Merge-request: KT-MR-8436
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-01-30 13:10:08 +00:00
Svyatoslav Scherbina 59663f4752 Native: add MinGW-w64 headers license
It covers mingw_* platform libraries that are generated from these
headers.
2022-12-27 13:39:27 +00:00
Alexander Shabalin ff2f163ac9 [K/N] Extract Module in CompileToBitcodePlugin ^KT-53776
Merge-request: KT-MR-7960
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-12-21 22:30:25 +00:00
Alexander Shabalin 41dbbd1fc8 [K/N] More idiomatic configurations usage for CompilationDatabasePlugin ^KT-53776 2022-12-16 13:48:30 +00:00
Alexander Shabalin f2835f3534 [K/N] Use Gradle configurations for CompileToBitcode modules ^KT-53776 2022-12-16 13:48:30 +00:00
Alexander Shabalin 01cabefea7 [K/N] Use configurations for interproject compdb deps ^KT-53776
Merge-request: KT-MR-7158
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-12-09 09:42:08 +00:00
Alexander Shabalin 314edd7066 [K/N] Add clangFormat task for automatic patch formatting ^KT-53776
Merge-request: KT-MR-7880
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-12-07 14:46:55 +00:00