Commit Graph

99 Commits

Author SHA1 Message Date
Ilya Gorbunov fc13ae7b4d [stdlib] Specify AT_MOST_ONCE contract for default-value-like functional parameters KT-54879 2024-03-11 18:12:27 +00:00
Ilya Gorbunov f07bf70aa7 Switch stdlib tests to KMP kotlin-test KT-61969 2023-12-13 15:40:25 +00:00
Ilya Gorbunov 48ce45e22f [stdlib] Fix outdated documentation in Kotlin-Java Duration conversions
Add tests for documentation statements
2023-11-07 16:25:06 +00:00
Yahor Berdnikau 7bfe59253f [repo] Migrate 'manifestAttributes()' into buildSrc 2023-07-04 19:26:38 +00:00
Yahor Berdnikau db1086f005 [repo] Migrate 'configureFrontendIr()' into buildSrc 2023-07-04 19:26:38 +00:00
Yahor Berdnikau 73a757c105 [repo] Migrate Groovy build scripts to use 'publish()' directly from buildSrc 2023-07-04 19:26:38 +00:00
Yahor Berdnikau d7fc4a1d27 [repo] Migrate Groovy build scripts to use 'sourcesJar()' directly from buildSrc 2023-07-04 19:26:38 +00:00
Yahor Berdnikau 6d5f1c84a7 [repo] Migrate Groovy build scripts to use 'javadocJar()' directly from buildSrc 2023-07-04 19:26:38 +00:00
Bogdan Mukvich 303b01b89b Add SBOM configuration for all published artifacts by default 2023-06-06 13:27:26 +00:00
Vyacheslav Gerasimov e0a477f16d Build: Refactor sbom configuration & wire it with main publication 2023-06-06 13:27:25 +00:00
Bogdan Mukvich 18f52832f5 Configure SBOM maven publishing for stdlib 2023-06-06 13:27:25 +00:00
Abduqodiri Qurbonzoda 175566fe56 KT-51908 Common MatchGroupCollection.get(name) extension function 2023-04-26 10:44:21 +00:00
Ilya Gorbunov b558382f17 Cleanup unneeded options in kotlin-stdlib-jdk7/8 compilations 2023-01-26 20:57:00 +00:00
Ilya Gorbunov 8b68234528 Include all jvm stdlib tests into kotlin-stdlib project test
JVM stdlib tests are compiled against JDK 8 so there's no need to divide them by modules anymore

#KT-51907
2023-01-26 20:57:00 +00:00
Abduqodiri Qurbonzoda ba2833b90f Mark Base64 API with ExperimentalEncodingApi 2023-01-16 11:24:50 +00:00
Ilya Gorbunov b8728c18cb Fix Optional.asSequence docs 2022-11-25 14:09:09 +00:00
Yahor Berdnikau e07e92c945 Raise 'kotlin.jvm.target.validation.mode' default value to 'error'.
Now target check intentionally runs always - even when Java sources are
empty. Java part configures publication 'org.gradle.jvm.version'
attribute which affect  published artifact consumers and should be the
same as Kotlin jvmTarget value.

^KT-54993 Fixed
2022-11-18 10:42:00 +00:00
Nikolay Krasko 1630386712 Move to JDK_X_Y variables 2022-09-21 22:53:19 +00:00
Ilya Gorbunov 75e1effbc5 Make Optional extensions stable since 1.8
KT-51907, KT-53277
2022-09-17 22:52:46 +00:00
Ilya Gorbunov b76854eddf Simplify signatures of Optional extensions getOrDefault and getOrElse
Two generic types are not need to cover the same use cases.

KT-50484
2022-09-17 22:52:46 +00:00
Ilya Gorbunov 18e4d9e16c Deprecate modules of the empty artifacts to discourage their usage
#KT-51907
2022-09-15 15:38:33 +00:00
Ilya Gorbunov 1b6a462057 Move contents of stdlib-jdk7/8 into stdlib
#KT-51907
2022-09-15 15:38:32 +00:00
Abduqodiri Qurbonzoda f3e8816dc3 Do not generate JVM 1.8+ annotation targets in stdlib, -jdk7, -jdk8, reflect
See #KT-53712
2022-09-02 14:59:24 +00:00
Ilya Gorbunov cd9b36b4c3 Introduce OpenEndRange and make primitive ranges implement it
#KT-52932
2022-06-28 00:08:03 +00:00
Mads Ager a2e8ed0032 Do not use ThreadLocalRandom on Android until upcoming SDK 34.
On Android devices starting SDK 25, ThreadLocalRandom accidentally
started out from the same seed on all application starts. This
means that the same sequence of numbers is returned whenever the
application is started.

This will be fixed in SDK 34. We should avoid using
ThreadLocalRandom until then.

^KT-52618 Fixed
2022-06-15 14:52:09 +00:00
Alexander Likhachev 64aae756d1 [Build] Avoid project usages in jdk6 tests
#KT-44611 In Progress
2022-04-19 00:39:24 +03:00
Kevin Bierhoff 9fe6e97cb8 Extensions for java.util.Optional (KT-50484)
Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com>
2022-04-13 14:34:06 +03:00
Abduqodiri Qurbonzoda 1cb5cab28f [K/N and WASM] Fix ESCAPE and COMMENTS modes 2022-04-05 15:21:31 +00:00
Abduqodiri Qurbonzoda c3f5d03b36 [JS] Support named capture groups in Regex #KT-51775 2022-04-05 15:21:25 +00:00
Ilya Gorbunov 2954769296 KT-50059 Stop publishing artifacts with 'modular' classifier 2021-12-29 17:43:56 +00:00
Ilya Gorbunov eba6a4a000 KT-44089 Reflect Android SDK version to determine whether platform implementatoins are eligible
SDK version sanity check, suppress all reflection errors, duplicate SDK reflection code for more robustness
2021-12-06 12:24:45 +03:00
Ilya Gorbunov 9c90d4e471 KT-50033 Add missing public API packages to module-info and setup a test
The test checks that new packages are not accidentally non-exported,
so each new stdlib package must be either exported or specified in that
test's expected non-exported package list.
2021-12-06 00:58:51 +00:00
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Ilya Gorbunov 21a9198fff Bring back Duration construction extensions KT-46229
Return the extension properties for constructing Duration from numbers,
but this time place them in Duration.Companion rather than on top-level.

- provide the new set of construction extension properties
  in companion of Duration
- leave top-level extension properties experimental,
  increase their deprecation level to ERROR,
  propose the extension properties in companion instead.
- leave Duration companion static factory functions experimental,
  deprecate them and propose the extension properties in companion instead.
2021-09-24 16:17:53 +00:00
Ilya Gorbunov 96611de344 Stabilize Duration, DurationUnit and related top-level functions KT-46784
Co-authored-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2021-09-24 16:17:53 +00:00
Dmitriy Novozhilov 0923d39215 [Build] Setup useFirForLibraries flag 2021-09-20 14:18:18 +03:00
Mikhail Glukhikh ffbd574a08 Use -opt-in instead of -Xopt-in in comments and scripts 2021-09-08 23:43:55 +03:00
Alexander Udalov 98be418245 Uncomment new SinceKotlin and remove obsolete warning suppressions 2021-08-30 19:36:32 +02:00
Alexander Udalov 3bc0eaff59 Fix warnings in stdlib samples and test modules 2021-08-10 17:57:50 +02:00
Alexander Udalov 0925e1b497 Enable JVM IR for stdlib/reflect/test libraries
Changes in Gradle integration tests are needed because:
- in new-mpp-android, kotlin-stdlib-jdk8 is used, and JVM IR generates
  JDK 8-specific bytecode (invokedynamic). D8 needs to be configured to
  desugar it with source/target versions set to 1.8, otherwise it
  reports an error.
- in AndroidExtensionsManyVariants and AndroidIcepickProject, D8 fails
  with assertions enabled if AGP < 4.0.0 is used because of
  https://issuetracker.google.com/issues/148661132. The tests which use
  old AGP versions are probably not relevant anymore anyway.

Changes in kotlin-stdlib-runtime-merged.txt are caused by a slightly
different generation scheme of collection subclasses in JVM IR, and are
harmless.

(Previous attempt was at 15e978dbd311c2ba78ec32b394c21acde9811ccb.)
2021-08-05 12:36:35 +02:00
Alexander Udalov 3636118743 Introduce typealias JvmRepeatable for j.l.a.Repeatable
#KT-12794 Fixed
2021-07-30 19:53:44 +02:00
Alexander Udalov 91c39ed01c Build: remove obsolete compiler arguments
These compiler arguments enable features which are enabled by default in
the current Kotlin anyway.

The only exception is in :compiler:cli which uses an old language
version.
2021-07-27 13:35:38 +02:00
Yahor Berdnikau 7789054547 Migrate repo to use JVM toolchains Gradle feature.
^KT-46972 Fixed
2021-07-05 14:11:12 +00:00
Yahor Berdnikau 08d831934a Revert "Build: add temporary option to suppress jdkHome warning"
This reverts commit 1dfcec3a93.
2021-07-05 14:11:11 +00:00
Alexander Udalov 1dfcec3a93 Build: add temporary option to suppress jdkHome warning 2021-05-28 15:41:17 +02:00
Ilya Gorbunov fa7460ba48 Store Duration value as a multi-range Long
Now precision loss happens at bigger durations.

This changes the binary API due different underlying type of Duration.
2021-04-02 17:43:20 +03:00
Ilya Gorbunov a7fda66fa1 Suggest duration static factories instead of number extension properties
Introduce Duration companion functions to convert numbers to Duration.
Deprecate number extension properties and propose to use these
new functions instead.
2021-03-10 13:23:32 +03:00
Dmitriy Novozhilov bc3b791cd8 [TMP] Remove :kotlin-coroutines-experimental-compat module 2021-01-28 13:19:34 +03:00
Ilya Gorbunov 8f4e4a4d40 Specify common sources for stdlib test compilation tasks
Some multiplatform tests are compiled in single-platform projects:
- in kotlin-stdlib-jdk7
- in kotlin-stdlib-jdk8
- in kotlin-stdlib-js-ir. The latter is technically MPP but with a
single platform, so its common sources are not considered as common.

Pass information about common sources to test compilation tasks in order
to use OptionalExpectation annotations there.

Co-authored-by: Svyatoslav Scherbina <svyatoslav.scherbina@jetbrains.com>
2020-12-14 19:03:04 +03:00
Alexander Udalov d326d6a693 Specify module name via moduleName option instead of freeCompilerArgs
This allows to get rid of warnings about duplicate module name in some
of the modules.
2020-11-06 19:27:32 +01:00