Commit Graph

1104 Commits

Author SHA1 Message Date
Alexander.Likhachev 7bcfa45c49 [Build] Add gradle-warnings-detector plugin for integration tests
#KT-55972 In Progress
2023-01-23 17:21:16 +00:00
Ilya Goncharov d7c31f79a8 Do not suppress NPM related tasks, but be aware about checking of them in task graph 2023-01-19 13:43:57 +00:00
Bogdan Mukvich c34ae23465 Fix file permissions affecting build reproducibility
File permissions affect reproducibility
on different platforms and system settings (umask, etc.)
KTI-1094
2023-01-17 16:47:52 +00:00
Mikhail Glukhikh 13502abab9 Fix FIR bootstrap in version 2.0 2023-01-16 18:16:07 +01:00
Yahor Berdnikau f90b447c7f Add task to generate Kotlinlang reference
Based on the template from
https://github.com/JetBrains/kotlin-web-site/tree/master/dokka-templates.
Template itself is updated frequently and should be added by CI
configuration.

Generated reference has versioning support. Older generated references
should put into:
<project_dir>/<build_dir>/dokka/kotlinlangDocumentationOld

^KT-55520 Fixed
2023-01-13 16:16:09 +00:00
Yahor Berdnikau d3ecb9a75f Allow to reference Gradle API javadoc in generated documentation
^KT-55520 In Progress
2023-01-13 16:16:09 +00:00
Yahor Berdnikau 4de60879f0 Explicitly enable Dokka javadocs generation
Actually we don't need javadoc generation for our internal stuff like
':kotlin-gradle-plugin'. But ':kotlin-gradle-plugin-api' is a public api
 and should have properly generated javadocs.

^KT-55520 In Progress
2023-01-13 16:16:08 +00:00
Yahor Berdnikau 18e9496ea4 Update dokka to 1.7.20 version
^KT-55520 In Progress
2023-01-13 16:16:08 +00:00
Yahor Berdnikau 464005aebc Add check to validate related project are added into kotlin plugins bom
^KT-54691 Fixed
2023-01-05 18:26:28 +00:00
Yahor Berdnikau b9aac83135 Add Kotlin Gradle plugins bom
This should help with failed variants selection between different Kotlin
 Gradle plugins versions.

 ^KT-54691 In Progress
2023-01-05 18:26:27 +00:00
Sergej Jaskiewicz e4d32f3615 Bump kotlin-build-gradle-plugin version to 0.0.39
This is so that the new APIs added in
d50c072af0 could be used in subprojects
that depend on kotlin-build-gradle-plugin
2023-01-05 10:13:38 +00:00
Vyacheslav Gerasimov 1fa7c7119b Build: Fix caching of some ShadowJar tasks in the project
To be cacheable relocated shadow jars should not include manifest with
build number. Instead, we repack relocated shadow jar in default jar
task with proper manifest.
2023-01-04 16:31:48 +00:00
Alexander Likhachev b5482b3812 [Gradle] Add Gradle 7.4 variant
#KT-52490 In Progress
2023-01-02 12:33:10 +00:00
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