Commit Graph

49 Commits

Author SHA1 Message Date
Vyacheslav Gerasimov bc2f0936bd Build: Rename commonDep -> commonDependency 2021-12-16 21:48:19 +03:00
Igor Chevdar fed76a87af Revert "[K/N][build] Refactored K/N tool runner"
This reverts commit fa587a61fd.
2021-11-26 14:04:06 +05:00
Igor Chevdar 4b53a8e3c7 Revert "[K/N][gradle][interop] Refactored ToolConfig"
This reverts commit d9c1b1f6f7.
2021-11-26 14:01:40 +05:00
Igor Chevdar 031d92e21f Revert "[K/N][gradle] Automatic cleaning of the class loaders map"
This reverts commit 874b442a13.
2021-11-26 14:00:30 +05:00
Igor Chevdar 874b442a13 [K/N][gradle] Automatic cleaning of the class loaders map 2021-11-25 23:42:10 +05:00
Igor Chevdar d9c1b1f6f7 [K/N][gradle][interop] Refactored ToolConfig
Added possibility to create different strategies for loading libclang
2021-11-25 23:42:10 +05:00
Igor Chevdar fa587a61fd [K/N][build] Refactored K/N tool runner 2021-11-25 23:42:09 +05:00
Nikolay Krasko af8faadca5 Update internal project junit dependency 4.12 -> 4.13.2 2021-11-24 19:35:31 +03:00
Pavel Punegov c5a02902a7 [K/N][build] Add artifacts depending on input in library task
Depending on noPack option compiler produces file or directory.
Artifact field that contains .klib file can't use @OutputDirectory
annotation. The same applies for @OutputFile with directory.
To workaround make an artifact field internal and use two optional
fields that return either file or directory depending on noPack option.
2021-11-19 11:29:53 +00:00
Pavel Punegov e3ac2b661a [K/N][build] Remove artifact overriding in library task
Depending on noPack option compiler produces file or directory.
Artifact field that contains .klib file can't use @OutputDirectory
annotation. The same applies for @OutputFile with directory.
2021-11-19 11:29:53 +00:00
Pavel Punegov cc7768e38f [K/N] Konan: override artifact property to use with OutputDirectory 2021-11-19 11:29:52 +00:00
Pavel Punegov f7e2572ccc [K/N][build] Add noPack option to Konan plugin
Make plugin aware of -nopack compiler option to correctly set outputs
without .klib suffix.
2021-11-19 11:29:52 +00:00
Pavel Punegov 83d31526cc [K/N][build] Fix args in klib runner task 2021-11-11 12:16:27 +00:00
Pavel Punegov 197d55e045 [K/N][build] Add common sources setting to Konan plugin
Used for stdlib build
2021-11-11 12:16:26 +00:00
Pavel Punegov e07fa31784 [K/N][build] Move KLibInstall to Konan gradle plugin 2021-11-11 12:16:26 +00:00
Pavel Punegov e9b1f7cca1 [K/N][build] Move stdlib build to runtime project
Build stdlib with konan plugin in runtime project
2021-11-11 12:16:21 +00:00
Ilya Matveev 8ff1d66ec9 [K/N][build] Fix up-do-date checks for cache tasks
A name of a cache directory produced by the compiler for a library is
based on the unique name of this library. The cache task, when
declaring its outputs, assumes that this unique name is equal to the
name of the library file/directory. If this is not the case, the
up-to-date check works inconsistently and Gradle doesn't rerun
the task.

This patch fixes this issue by obtaining the real unique name of
the library.
2021-11-08 11:51:42 +07:00
Pavel Punegov 56d34bfd53 [K/N][build] KonanCacheTask: get rid of lateinit in input directory 2021-10-22 09:29:22 +00:00
Pavel Punegov a003d804d2 [K/N][build] Use Map for cached libraries 2021-10-22 09:29:21 +00:00
Pavel Punegov 567dac0719 [K/N][build] Small fixes to KonanCacheTask 2021-10-22 09:29:21 +00:00
Pavel Punegov ac5e818c26 [K/N][build] Put get to input annotations 2021-10-22 09:29:20 +00:00
Pavel Punegov 42aa8b1337 [K/N][build] the field was protected but why 2021-10-22 09:29:19 +00:00
Pavel Punegov bc89921fdd [K/N][build] Fix cache location 2021-10-22 09:29:19 +00:00
Pavel Punegov 634812f96f [K/N][build] Split stdlib and endorsed libraries build and caching
Due to the usage of dist as an input and output at the same time by
different tasks Gradle issued warning about Execution optimizations
turning off. The fix is to split inputs and outputs in the build and
cache tasks of stdlib and endorsed libs.
2021-10-22 09:29:19 +00:00
Vyacheslav Gerasimov af541dc6d3 Build: Fix usages of deprecated ConfigureUtil in kotlin-native
Required for Gradle 7+ #KTI-559
2021-09-26 23:36:40 +03:00
Mikhail Glukhikh 3febabe977 Use OPT_IN instead of EXPERIMENTAL in diagnostic names 2021-09-10 16:29:13 +03:00
Dmitriy Novozhilov d46e2dd749 Fix OVERRIDE_DEPRECATION warnings in project code 2021-09-02 15:04:07 +03:00
Pavel Punegov 73bb6d5d34 [Native] Move JavaLauncher property from global scope to the KonanPlugin 2021-08-03 10:15:08 +00:00
Pavel Punegov 6bbfe0d503 [Native] Add project property that holds JavaLauncher provider
This property is initialized once to make ToolRunner do not query for
the launcher. Also set JDK 11 as a default in case of an unavailable JDK
set as the toolchain, like JDK 17 that is not available in the auto mode
in Gradle and requires environment variable to be set.
2021-08-03 10:15:08 +00:00
Pavel Punegov ba5bd0b069 [Native] Add java plugin dependency to Konan plugin
Change required version of Gradle to 6.7
2021-08-03 10:15:07 +00:00
Pavel Punegov afa8e16c25 [Native] JDK toolchains in KonanToolRunner
Use JDK toolchains in KonanToolRunner to make build able to change JDK
Use JDK 17 for MacOS aarch64 hosts
2021-08-03 10:15:06 +00:00
Sergey Bogolepov 84d06f35e9 [K/N] Update usages of LLVM bin directory on Windows 2021-08-03 05:42:09 +00:00
Pavel Punegov 789799ac17 Revert simpleOsName in HostManager
Support old naming in simpleOsName.
Introduce new platformName method for the new archive naming.
2021-06-02 18:30:52 +03:00
Vasily Levchenko c2a46baa77 [build][kotlin-native][test] fix dist dependencies for test targets 2021-05-11 05:47:17 +00:00
Elena Lepilkina 393aaac2b9 [Native] Removed old gradle properties for kotlin repo and versions 2021-04-02 05:42:13 +00:00
Ilya Matveev e56ac775ca [K/N][tests] Do not propagate user.dir property to compiler/cinterop
In a Gradle process, the user.dir property is set to the directory
where the build was started. By default, if we start a child process
via project.javaexec, Gradle sets its working directory to the
directory of the current project. But passing Gradle's value of user.dir
to that process overrides this setting.

This makes tools started in a such way sensitive to directory the build
is started from. Thus a test using relative paths may fail if it is
started from a wrong directory.

This patch fixes this issue for Kotlin/Native tests.
2021-03-26 12:38:27 +03:00
Alexander Udalov 3f16f84d0d Fix warnings in buildSrc 2021-03-01 19:47:24 +01:00
Pavel Punegov 7ad656ea7f Fix cyclic dependency in run task configuration. 2021-02-26 12:51:51 +01:00
Vasily Levchenko 905c0c3dd3 [build] version of kotlin native stored in resouces 2021-02-26 12:51:51 +01:00
Vasily Levchenko 8a4b5efa9e [build][native] don't ever fix dist, take it with API 2021-02-24 11:07:17 +01:00
Vasily Levchenko 840c1e612c [build] joint (step 2)
- dist:
  - compiler
  - tools(cinterop,klib)
  - stdlib
  - cache
2021-02-24 11:07:13 +01:00
Vasily Levchenko c85c3ac123 [build] joint (step 1)
(cherry picked from commit 7d0775f7e69ab900200bcf1fa78b94d68e6bd4f6)
2021-02-24 11:04:59 +01:00
Vasily Levchenko 8b2f0d644b [build] kotlin.*Compile: -Xskip-prerelease-check
(cherry picked from commit 57172ac6ead928b565fefaf49d8405a07c856e25)
2021-02-01 16:54:15 +01:00
Pavel Punegov 8a48609823 Lazy task creation in konan plugin using Gradle Providers API.
Removes obsolete CMake task and IDE model.

Use Provider API for klib files. Replace findAll with matching to make tasks configure lazily

Make some test tasks use lazy configuration

Fix adding tasks to lists. Add it. to all fields to improve IDEA navigation

Remove obsolete IDE model from the task

Remove tooling model tests

Fix aggregate task dependency

Fix run tasks. Cleanup

Review fixes
2021-02-01 16:54:14 +01:00
Sergey Bogolepov 9c082775e6 Support caches on ios_arm64 2020-12-14 15:25:37 +01:00
Vasily Levchenko 09ebfc1b6f [gradle plugin] adoption 52c22d891f
MPP plugin: add expectedBy deps to api configuration
2020-12-14 15:25:36 +01:00
Sergey Bogolepov 20931eebe1 [KT-43276] Add watchos_x64 target 2020-11-28 21:07:20 +01:00
Ilya Gorbunov bf4e53ae06 Use Files API for creating temp files and directories
(cherry picked from commit b9df8591d043c79f2032b782efc7539c747c2625)
2020-11-28 21:01:56 +01:00
Stanislav Erokhin f624800b84 Move everything under kotlin-native folder
I was forced to manually do update the following files, because otherwise
they would be ignored according .gitignore settings. Probably they
should be deleted from repo.

Interop/.idea/compiler.xml
Interop/.idea/gradle.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_1_0_3.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_0_3.xml
Interop/.idea/modules.xml
Interop/.idea/modules/Indexer/Indexer.iml
Interop/.idea/modules/Runtime/Runtime.iml
Interop/.idea/modules/StubGenerator/StubGenerator.iml
backend.native/backend.native.iml
backend.native/bc.frontend/bc.frontend.iml
backend.native/cli.bc/cli.bc.iml
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2NativeCompilerArguments.kt
backend.native/tests/link/lib/foo.kt
backend.native/tests/link/lib/foo2.kt
backend.native/tests/teamcity-test.property
2020-10-27 21:00:28 +03:00