Commit Graph

126 Commits

Author SHA1 Message Date
Vyacheslav Gerasimov 069c920a5c Build: Use jdk-release compiler option to build kotlin-stdlib
Use JDK11 with `-Xjdk-release=6` for kotlin-stdlib.
Use JDK11 with `-Xjdk-release=7` for kotlin-stdlib-jdk7.
This allows dropping JDK6 and JDK7 from our build completely and remove
`kotlin.build.isObsoleteJdkOverrideEnabled` #KTI-1220.

 #KT-57808
2024-03-19 12:32:39 +00:00
Ilya Gorbunov 7175680917 [stdlib] Specify EXACTLY_ONCE contract for useLines 2024-03-11 18:12:27 +00:00
Abduqodiri Qurbonzoda 65cfc578a8 Introduce constructor-like function for AutoCloseable #KT-66102 2024-02-27 20:52:49 +00:00
Abduqodiri Qurbonzoda 557ea32f87 Introduce kotlin.AutoCloseable typealias in K/JVM stdlib #KT-55777 2024-02-27 20:52:49 +00:00
Abduqodiri Qurbonzoda ae3c9dd9b9 Improve Path.walk/delete/copyToRecursively documentation 2024-02-09 17:20:15 +00:00
Abduqodiri Qurbonzoda f8c587ddcf Fix security vulnerability in Path recursive functions #KT-63103
* Prohibit files with name "." or ".."
* Detect cycles caused by files with name "/"
* Prohibit copy outside the target directory

The commit also moves zip-related tests to PathRecursiveFunctionsZipTest.
2024-02-09 17:20:15 +00:00
Ilya Gorbunov f07bf70aa7 Switch stdlib tests to KMP kotlin-test KT-61969 2023-12-13 15:40:25 +00:00
Ilya Gorbunov 2e030f213b [stdlib] Explicit visibility and return types: JVM 2023-11-22 18:04:34 +00:00
Abduqodiri Qurbonzoda 999b0f7099 Avoid allocating large buffers in File.writeText #KT-51058
Also fixes File.appendText and Path.write/appendText.


Merge-request: KT-MR-12804
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-11-08 11:18:56 +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
Abduqodiri Qurbonzoda 91f0c3c342 Clarify copyToRecursively doc about symlinks #SDP-1816
This MR is the result of the security audit that was conducted for Path recursive functions:
https://youtrack.jetbrains.com/issue/SDP-1816/Security-issues-of-Path-recursive-functions-in-StdLib#focus=Comments-27-7269144.0-0
Eliminates confusions regarding symbolic links.

Merge-request: KT-MR-10245
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-06-16 22:40:56 +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 2248f4ea33 Remove supportsNamedCapturingGroup flag in tests
Now it is true on all platforms
2023-04-26 10:44:21 +00:00
Ilya Gorbunov f8d001c21f KT-57298 createParentDirectories: handle already existing directory symlink 2023-04-08 15:21:12 +00:00
Ilya Gorbunov d2dc23d8bb Introduce Path.createParentDirectories function #KT-53263 2023-02-27 20:36:21 +00:00
Abduqodiri Qurbonzoda 80b48eed0b Fix Path.copyToRecursively when copying across file systems #KT-55935
Merge-request: KT-MR-8705
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-02-07 08:25:54 +00:00
Ilya Gorbunov b558382f17 Cleanup unneeded options in kotlin-stdlib-jdk7/8 compilations 2023-01-26 20:57:00 +00:00
Ilya Gorbunov 5a4eb22961 Move isolated addSuppressed extension test to jvm tests
Conditions for being isolated do not hold anymore:
it tested that addSuppressed extension could work without kotlin-stdlib-jdk7,
but now the latter is merged to kotlin-stdlib and thus always present

#KT-51907
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
Abduqodiri Qurbonzoda fff593492d Introduce Common AutoCloseable & use #KT-31066
Co-authored-by: Ilya Gorbunov <Ilya.Gorbunov@jetbrains.com>

Merge-request: KT-MR-8113
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2022-12-27 11:50:22 +00:00
Abduqodiri Qurbonzoda f38654740e Use Path.deleteRecursively() in the Path.cleanupRecursively() test util 2022-09-18 22:49:02 +00:00
Abduqodiri Qurbonzoda 90189f9c39 Provide Path.copyToRecursively() and Path.deleteRecursively() #KT-52928 2022-09-18 22:49:01 +00:00
Abduqodiri Qurbonzoda 7271de2642 Test Path.copyTo when source and target paths are the same file 2022-09-18 22:49:01 +00:00
Abduqodiri Qurbonzoda 6fde3391d3 Test that Path.copyTo() does not follow symlink in destination 2022-09-18 22:49:01 +00:00
Abduqodiri Qurbonzoda 6ddb0326bb Test that Path.copyTo() copies the source file access permissions 2022-09-18 22:49:01 +00:00
Abduqodiri Qurbonzoda f0da420b1f Move Path.tryCreateSymbolicLinkTo to AbstractPathTest.kt 2022-09-18 22:49:00 +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 12d3ef41dc Use older JDK toolchains for compiling stdlib and stdlib-jdk7
To prevent using newer JDK API in kotlin sources of these projects.
Note that java sources (of stdlib mainly) are still compiled with JDK 8.

#KT-51907
2022-09-01 16:52:36 +00:00
Abduqodiri Qurbonzoda 6c4777dcdd Fix JDK-dependent stdlib tests after advancing jvmTarget 2022-08-17 22:55:43 +03:00
Abduqodiri Qurbonzoda eb3bbc3265 Remove "-Xsuppress-deprecated-jvm-target-warning" compiler argument 2022-08-13 01:48:23 +03:00
Abduqodiri Qurbonzoda 34e50649e8 Switch JVM target of the standard libraries to 1.8 #KT-51907 2022-08-13 01:33:45 +03:00
Abduqodiri Qurbonzoda 78666e3ecb Provide visit extension functions for java.nio.file.Path #KT-52910 2022-06-28 00:52:43 +00:00
Abduqodiri Qurbonzoda e7b37b3497 Implement a walk extension function for java.nio.file.Path #KT-52909 2022-06-28 00:52:42 +00:00
Ilya Gorbunov cd9b36b4c3 Introduce OpenEndRange and make primitive ranges implement it
#KT-52932
2022-06-28 00:08:03 +00:00
Yahor Berdnikau af6f17c243 Unify kotlinCompilerClasspath for all projects
This will prevent spawning second Kotlin daemon during compilation
except 'buildSrc' compilation. Original change was introduced in
2e515f3945 commit.
2022-05-24 07:58:38 +00:00
Alexander Udalov 2e515f3945 Prohibit JVM target 1.6
But still compile stdlib, reflect, kotlin.test and scripting runtimes
with JVM target 1.6 to simplify migration from Kotlin 1.6 to 1.7.

 #KT-45165 Fixed
2022-04-19 22:54:40 +02:00
Alexander Likhachev 64aae756d1 [Build] Avoid project usages in jdk6 tests
#KT-44611 In Progress
2022-04-19 00:39:24 +03: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
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Dmitriy Novozhilov 0923d39215 [Build] Setup useFirForLibraries flag 2021-09-20 14:18:18 +03:00