Commit Graph

1091 Commits

Author SHA1 Message Date
Alexander Likhachev 9bbdee7817 [Gradle] Update Gradle API for the common sourceset to 7.6
The project isn't compilable at the moment
#KT-54634 In Progress
2022-12-02 16:37:36 +00:00
Alexander Likhachev f839d5d4c2 [Gradle] Add Gradle 7.6+ variant
#KT-54634 In Progress
2022-12-02 16:37:35 +00:00
Dmitriy Novozhilov fe81ad0bbe [Build] Fix configuration cache issues of miscCompilerTests 2022-12-01 07:29:40 +00:00
Yahor Berdnikau a14d0d148b Simplify Kotlin bootstrap application in the project
Move all the code to apply Kotlin bootstrap into settings script plugin
which does following:
- configures based either on the repo root 'local.properties' or on the
root project gradle properties or on the repo root 'gradle.properties'
current type of bootstrap
- automatically adds Kotlin bootstrap repository with
exclusive content, so bootstrap dependencies will not be by mistake
downloaded from other repository
- automatically forces all Kotlin plugins applied in the build to use
bootstrap version

This script should be applied only in project settings.gradle and then
it does all the configuration by itself.
2022-11-29 14:31:48 +00:00
Yahor Berdnikau 49a5e9b91d Allow to suppress kotlinOptions.freeCompiler args modification warning
It could be done via 'gradle.properties':
'kotlin.options.suppressFreeCompilerArgsModificationWarning=true'

^KT-54888 Fixed
2022-11-15 16:52:02 +00:00
Leonid Startsev dd985d8209 Add Binary Compatibility Validator to kotlinx-metadata projects
Initiate API dumps
2022-11-10 13:30:08 +00:00
Nikolay Krasko a4cd485f48 Remove native-platform 0.14 usage from the buildSrc
It looks like net.rubygrapefruit:native-platform:0.14 is not in
plugins.gradle.org repository anymore.

And it's not used anyway.

> Task :buildSrc:generateExternalPluginSpecBuilders FAILED

'''
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':buildSrc:generateExternalPluginSpecBuilders'.
> Could not resolve all files for configuration ':buildSrc:compileClasspath'.
   > Could not find native-platform-0.14.jar (net.rubygrapefruit:native-platform:0.14).
     Searched in the following locations:
         https://cache-redirector.jetbrains.com/plugins.gradle.org/net/rubygrapefruit/native-platform/0.14/native-platform-0.14.jar
'''

Can be reproduced with

```gradle --refresh-dependencies -i tasks -Pkotlin.native.enabled=true```

KTI-986
2022-11-08 21:31:43 +01:00
Dmitriy Dolovov 271341419a [Native][tests] Fix: Always configure JUnit platform for unit tests 2022-11-07 12:44:39 +00:00
Bogdan Mukvich fce8b877c8 Remove unused WriteCopyrightToFile gradle task
#KTI-758
2022-11-07 08:24:19 +00:00
Dmitriy Dolovov 9cefa346bd [K/N][build] Fix trove4j dependency for K/N tests 2022-11-04 10:10:52 +00:00
mvicsokolova e7f2e2cccb [Native][tests] Optionally, run tests with the dependency on K/N platform libs 2022-11-04 10:10:51 +00:00
Dmitriy Dolovov 09c6746d64 [Native][tests] Use lazy properties for K/N test infra to avoid premature resolve of Gradle configurations 2022-11-04 10:10:50 +00:00
mvicsokolova 775db55539 [Native][tests] Support passing custom (external) KLIBs as -l dependencies to Kotlin/Native compiler invocation 2022-11-04 10:10:50 +00:00
Dmitriy Dolovov 753ad9f29c [Native][tests] Minor: Mark TestProperty as private, it should not be used outside of the file 2022-11-04 10:10:49 +00:00
mvicsokolova 2f85b4928e Moved nativeTest constructor to buildSrc 2022-11-04 10:10:48 +00:00
Sergej Jaskiewicz 37b32907ab Fix a compatibility issue with AnnotationDescriptor
The `getSourceForArgument` method should be in the interface,
but adding it is a breaking change for Java usages,
since the module is not built with -Xjvm-default (KT-54749).

Move the method to an extension. This doesn't change the behavior,
since it was only ever called on LazyAnnotationDescriptor.
2022-11-02 11:07:07 +00:00
Dmitriy Novozhilov af8b9e6700 [Build] Remove K/Native modules from projectsWithDisabledFirBootstrap list
^KT-54123 Fixed
2022-11-02 10:11:27 +02:00
Jerome Prinet 74ba175255 Update Gradle Enterprise plugin to 3.11.2 2022-10-19 12:41:51 +02:00
Jerome Prinet 3b7b36bcc1 Update Gradle Enterprise plugins 2022-10-19 12:41:51 +02:00
Mikhail Glukhikh 31b3d8f859 Update info about K/N modules which do not pass FIR bootstrap
After we have advanced bootstrap to 1.8.20-dev-649,
some K2 problems inside K/N were fixed.
However, some other are still alive.

Related to KT-54123
2022-10-13 09:45:06 +00:00
Nikolay Krasko f43ad1cb7a Remove packed stdlib from Kotlin compiler plugin artefacts
Remove annotations, kotlin-stdlib-common, kotlin-stdlib.

Packing those libraries is wrong and probably unexpected. It leads to
artifacts size increase. Can be dangerous because of bad classpath.
And also have a reproducibility issue because of caching tricks around
KotlinVersionCurrentValue class.

KTI-942
2022-10-12 13:44:30 +00:00
Nikolay Krasko cfd79c87a6 Minor: fix spelling in the comment 2022-10-12 08:20:25 +00:00
Nikolay Krasko e7074e8a92 Fix flaky TARGET_JVM_VERSION_ATTRIBUTE presence in gradle plugins
For some reason TARGET_JVM_VERSION_ATTRIBUTE was not always set in the
resulting artifacts for runtimeElementsConfigurationName and
apiElementsConfigurationName variants

It could be reproduced locally with by executing
`gradle kotlin-allopen:publishToMavenLocal`

The fix can be checked via
`gradle kotlin-allopen:outgoingVariants`

^KTI-920 Fixed
2022-10-06 13:43:19 +00:00
Dmitriy Novozhilov 9b63dde1c3 Add error-level OptIn on safeAs, cast and assertedCast functions in addToStdlib
Usage of this function is unsafe because it does not have native compiler
  support. This means that compiler won't report UNCHECKED_CAST,
  CAST_NEVER_SUCCEED or similar diagnostics in case of error cast
  (which can happen immediately or after some refactoring of class hierarchy)
2022-10-06 06:57:07 +00:00
Mikhail Glukhikh 41c9ffb060 Native: add three new modules to K2 build 2022-09-29 15:32:01 +00:00
Yahor Berdnikau 5924a80ec8 Use Task.doNotTrackState api
This api is faster replacement for 'task.outputs.upToDateWhen { false }'
 approach.

^KT-52624 Fixed
2022-09-28 09:07:27 +00:00
Yahor Berdnikau c198d4d90d Simplify cache-redirector script apply method
Now it could be only be applied inside settings file pluginManagement
block. This will update both settings repositories and all projects in
the repo with cache redirection settings.
2022-09-27 14:04:43 +00:00
Nikolay Krasko 54c7efe1cb Refactorings for toolchains 2022-09-27 12:49:55 +00:00
Nikolay Krasko 076125282d Define default build JVM toolchain 2022-09-27 12:49:54 +00:00
Nikolay Krasko 13a68b0e2d Explicitly define the set of environment variables needed for tests 2022-09-27 12:49:54 +00:00
Simon Ogorodnik 8799b9b751 Build: Add auto-setup of JDKs for tests based on Gradle Java Toolchains 2022-09-27 12:49:54 +00:00
Alexander Udalov c410c5d3cd Do not reset freeCompilerArgs for some kotlin-native modules
Otherwise common compiler arguments which are set for all modules in the
project in `buildSrc/src/main/kotlin/common-configuration.gradle.kts`
are not applied. The most interesting of those are `-Xuse-k2` (if K2 is
enabled) and `-Xjvm-default=all`.
2022-09-27 11:04:31 +00:00
Nikolay Krasko cb0fc0aa6f Downgrade logger level for hacky disabling NPM/Yarn tasks 2022-09-27 07:38:23 +00:00
Yahor Berdnikau 309c57f860 Update Gradle plugins common Gradle API version to 7.5
^KT-54142 Fixed
2022-09-23 15:36:53 +00:00
Nikolay Krasko 1630386712 Move to JDK_X_Y variables 2022-09-21 22:53:19 +00:00
Alexander Udalov a19fc4650b Workaround a problem in publishing kotlin-backend-native-for-ide 2022-09-20 03:55:13 +02:00
Sebastian Sellmair 8189d7b254 [Gradle] Implement kotlin-gradle-plugin-annotations module
This will include Internal* and *Experimental annotations for the
Kotlin Gradle Plugin. The separate module is proposed, so that
additional modules can use those annotations without
a dependency to the full kotlin-gradle-plugin-api module
(see -idea modules)

^KT-54029 WIP
2022-09-19 16:03:44 +00:00
Yahor Berdnikau e94c1ea0ed Update Kotlin repo for bootstrap update
^KT-27301 Fixed
2022-09-19 12:30:42 +02:00
Yahor Berdnikau 37c66837ee Make 'generateGradleOptions' task visible
Makes all generate* tasks easier to discover.

^KT-27301 In Progress
2022-09-19 12:30:38 +02:00
Anže Sodja 17cd0d7dbc [Assign plugin] Add Gradle plugin and IDE dependencies for Assignment compiler plugin 2022-09-16 10:12:41 +03:00
Alexander Udalov b158ece232 Tweak module exclusion filter for -Xjvm-default=all
- Remove obsolete exclusion of core & stdlib modules, since they are now
  compiled with JVM target 1.8, but leave `:core:descriptors` because of
  an issue in Proguard.
- Remove binary-compatibility-validator and update test data instead.
- Replace some "contains" checks with equality for clarity.
- Remove modules from -Werror filter which no longer use the deprecated
  compatibility mode.
2022-09-14 14:40:39 +02:00
Mikhael Bogdanov c168a19a58 Build compiler with -Xjvm-default=all + @JvmDefaultCompatibility when needed 2022-09-14 14:40:37 +02:00
Vyacheslav Gerasimov 15d797b5b5 Build: Use protobuf from kotlin-dependencies repo
#KTI-892
2022-09-01 19:28:16 +02:00
Nikolay Krasko 01f567a16d Disable yarn and npm tasks from the build when tests are not active
Kotlin build shouldn't depend on npm during while deploy artefacts tasks

^KTI-887 Fixed
^KT-53687 Related
2022-08-30 22:15:16 +00:00
Nikita Bobko 62cadde3e6 Drop kotlin-reflect -> kotlin-reflect-api dependency substitution
Review: https://jetbrains.team/p/kt/reviews/6753

This dependency substitution was introduced in
5c99243c10 as a way to fight against
non-incremental compilations. Now it's not needed anymore as the
dependency on kotlin-reflect was changed to binary dependency just a few
commits ago.
2022-08-22 15:43:59 +02:00
Nikita Bobko 0a6dadd04d 4/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
2022-08-22 15:43:53 +02:00
Alexander Likhachev b5491177c9 [Gradle] Add Gradle 7.5+ variant 2022-08-16 08:47:31 +00:00
Nikolay Krasko 48e8c0020d Update dokka to 1.7.0
This should fix reproducibility
(https://youtrack.jetbrains.com/issue/KT-52069/Dokka-resulting-htmls-are-not-stable)

^KTI-893 Fixed
2022-08-15 12:18:12 +00:00
Abduqodiri Qurbonzoda eb3bbc3265 Remove "-Xsuppress-deprecated-jvm-target-warning" compiler argument 2022-08-13 01:48:23 +03:00
Abduqodiri Qurbonzoda 983c7adb1e Remove :libraries:tools:stdlib-compiler-classpath project
It was used as a workaround to allow jvmTarget=1.6 in stdlib.
2022-08-13 01:42:43 +03:00