Skip to content

Conversation

@Goooler
Copy link
Contributor

@Goooler Goooler commented Jan 31, 2025

https://kotlinlang.org/docs/gradle.html#dependency-on-the-standard-library

Run diff gcpbuildcache-1.0.0.module.before gcpbuildcache-1.0.0.module.after:

28,36d27
<       "dependencies": [
<         {
<           "group": "org.jetbrains.kotlin",
<           "module": "kotlin-stdlib",
<           "version": {
<             "requires": "2.0.21"
<           }
<         }
<       ],
109,115d99
<         },
<         {
<           "group": "org.jetbrains.kotlin",
<           "module": "kotlin-stdlib",
<           "version": {
<             "requires": "2.0.21"
<           }

@Goooler
Copy link
Contributor Author

Goooler commented Jan 31, 2025

kotlin.compilerOptions.apiVersion should also be constrainted, like https://github.com/GradleUp/shadow/blob/d64ef3787ca0298addd7cb4dbd4beb49814b2bee/build.gradle.kts#L23-L24

@trietbui85
Copy link

Is there any blocker to merge this PR?

@Goooler
Copy link
Contributor Author

Goooler commented Sep 26, 2025

CC @liutikas

@liutikas
Copy link
Member

This is not a safe change. We do require kotlin-stdlib to run, so we should be declaring that we use it and we tested it at a specific version.

https://kotlinlang.org/docs/gradle.html#dependency-on-the-standard-library seems to be a dead link

it kind of sounds like the request in the linked issues to go to a lower version to support older versions of Gradle. Is that the goal?

https://kotlinlang.org/docs/gradle.html#dependency-on-the-standard-library

Run ` diff gcpbuildcache-1.0.0.module.before gcpbuildcache-1.0.0.module.after`:

```diff
28,36d27
<       "dependencies": [
<         {
<           "group": "org.jetbrains.kotlin",
<           "module": "kotlin-stdlib",
<           "version": {
<             "requires": "2.0.21"
<           }
<         }
<       ],
109,115d99
<         },
<         {
<           "group": "org.jetbrains.kotlin",
<           "module": "kotlin-stdlib",
<           "version": {
<             "requires": "2.0.21"
<           }
```
@Goooler Goooler force-pushed the exclude-kotlin-stdlib branch from 041f9bf to 04b1555 Compare September 27, 2025 02:06
@Goooler
Copy link
Contributor Author

Goooler commented Sep 27, 2025

https://kotlinlang.org/docs/gradle-configure-project.html#dependency-on-the-standard-library

This plugin relies on Kotlin and Gradle integrates Kotlin stdlibs, so what we can do is pin the kotlin.languageVersion and omit the plugin's transitive Kotlin version.

it kind of sounds like the request in the linked issues to go to a lower version to support older versions of Gradle. Is that the goal?

Yeah, it is.

@liutikas
Copy link
Member

#72 we'll do the following to bring to down to Gradle 8.4

@liutikas liutikas closed this Sep 29, 2025
@Goooler Goooler deleted the exclude-kotlin-stdlib branch September 29, 2025 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kotlin stdlib does not match Gradle's embedded Kotlin version

3 participants