It looks like 1.0.26 accidentally raised the jvmTa...
# ksp
z
It looks like 1.0.26 accidentally raised the jvmTarget to 11 from 8. https://github.com/square/moshi/pull/1900
j
And to be clear I don't care that much about the change itself, mostly just that it probably deserves a minor version bump. Although it seems like probably some new features were launched in the 25 patch versions prior to this patch version, so i'm not quite sure what would even cause a minor version bump.
t
It is an undesired change as a side effect of bumping AGP version. Let me see if I can work it around.
Luckily, we don't have a strong dependency on the newer AGPs. Here is the fix. I'd really appreciate if you could review it.
+ @ansman
a
It wasn’t accidental, it was due to AGP. I’m fine with this but note that it will make it impossible to support new AGP features.
t
I guess we'd have to release variants or use reflection if the need comes in the future.
a
I don't think raising it to 11 is unreasonable. But we could probably lower the byte code version to target 8 while keeping AGP?
Also, only the Gradle plugin needs to target 11, not the KSP API artifact
☝️ 1
t
I tried, but AGP 8.7 doesn't come with Java 8 variant so I cannot target Java 8 and use AGP 8.7 simultaneously. They don't compile together.
z
Yah I’m a little confused on what the KSP api itself depends on AGP, I would expect only the gradle plugin to
t
Got it. Sounds like changing KSP's Gradle plugin to 11 is less of a concern. On the other hand, if the proposed solution (build and test with different AGP) doesn't have significant drawbacks, I'm going to stay with it for now, because it seem to provide the best compatibility. When we need to depend on features in newer AGP, I'll make only KSP's Gradle plugin target 11.
z
in general you should only compileOnly other gradle plugin deps anyway from a gradle plugin 👍
a
Compile only would still force using Java 11
z
🤔
a
Apparently using < Java 17 with Gradle is deprecated
2
z
well, that too 🙂
a
But it does support down to 8
j
compileOnly is only needed for people using plugins API and it's F-ed up classpath garbage. Build script classpath works fine with normal deps
t
OK, merged. Thanks a lot for the reviews and discussions! I'll try to fix the regressions and aim to do another release next week.