-
Notifications
You must be signed in to change notification settings - Fork 412
Pin the plugin's Kotlin language level on 2.0 #1448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
```diff OLD: shadow-9.0.0-SNAPSHOT-before.jar NEW: shadow-9.0.0-SNAPSHOT-after.jar JAR │ old │ new │ diff ───────┼───────────┼───────────┼──────────── class │ 456 KiB │ 557.2 KiB │ +101.2 KiB other │ 14.4 KiB │ 14.4 KiB │ 0 B ───────┼───────────┼───────────┼──────────── total │ 470.4 KiB │ 571.6 KiB │ +101.2 KiB CLASSES │ old │ new │ diff ─────────┼──────┼──────┼───────────────── classes │ 76 │ 120 │ +44 (+45 -1) methods │ 1191 │ 1288 │ +97 (+197 -100) fields │ 201 │ 257 │ +56 (+58 -2) ``` ```diff 2,3c2,3 < @metadata(mv = {2, 2, 0}, k = 1, xi = 48, d1 = {"��\u0018\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\u0002\b&\u0018��2\b\u0012\u0004\u0012\u00020\u00020\u0001B\u0007¢\u0006\u0004\b\u0003\u0010\u0004J\u0010\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\u0002H\u0016¨\u0006\b"}, d2 = {"Lcom/github/jengelman/gradle/plugins/shadow/ShadowPlugin;", "Lorg/gradle/api/Plugin;", "Lorg/gradle/api/Project;", "<init>", "()V", "apply", "", "project", "shadow"}) < /* loaded from: shadow-9.0.0-SNAPSHOT-before.jar:com/github/jengelman/gradle/plugins/shadow/ShadowPlugin.class */ --- > @metadata(mv = {1, 8, 0}, k = 1, xi = 48, d1 = {"��\u0018\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\b&\u0018��2\b\u0012\u0004\u0012\u00020\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0003J\u0010\u0010\u0004\u001a\u00020\u00052\u0006\u0010\u0006\u001a\u00020\u0002H\u0016¨\u0006\u0007"}, d2 = {"Lcom/github/jengelman/gradle/plugins/shadow/ShadowPlugin;", "Lorg/gradle/api/Plugin;", "Lorg/gradle/api/Project;", "()V", "apply", "", "project", "shadow"}) > /* loaded from: shadow-9.0.0-SNAPSHOT-after.jar:com/github/jengelman/gradle/plugins/shadow/ShadowPlugin.class */ ```
e1791bd
to
c3457ea
Compare
build.gradle.kts
Outdated
apiVersion = KotlinVersion.KOTLIN_1_8 | ||
languageVersion = apiVersion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we go back to 1.8, something is wrong in the tests
* What went wrong:
A problem occurred configuring project ':main'.
> class com/github/jengelman/gradle/plugins/shadow/tasks/ShadowJar: inline fun relocate(): compile avoidance is not supported with public inline functions
https://scans.gradle.com/s/jisjgaaam5e22/tests/overview?outcome=FAILED
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CC @wolfs
If we can bump the lang level to KOTLIN_2_0
? Everything works well after that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. It is very hard to make a plugin written in Kotlin compatible with multiple Gradle versions for the reasons we are seeing here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The upcoming Gradle 9 requires KOTLIN_2_0
, and KOTLIN_1_8
is required by Gradle 8.x versions. But the only thing we rely on KOTLIN_2_0
is Kotlin enum's entries
, seems safe to merge this. This should fix your issue about Kotlin metadata.
https://docs.gradle.org/current/userguide/compatibility.html#kotlin
src/documentTest/kotlin/com/github/jengelman/gradle/plugins/shadow/DocCodeSnippetTest.kt
Outdated
Show resolved
Hide resolved
src/documentTest/kotlin/com/github/jengelman/gradle/plugins/shadow/DocCodeSnippetTest.kt
Outdated
Show resolved
Hide resolved
30520c2
to
93ff41d
Compare
Uh oh!
There was an error while loading. Please reload this page.