Target JVM 11 bytecode instead of 17 - #209
Merged
Merged
Conversation
Revert sourceCompatibility/targetCompatibility and kotlinOptions.jvmTarget from 17 back to 11 across all modules (undoing the 2024 "Use Java Version 17" sweep). stream-result emitted JVM 17 bytecode since 1.3.3, which JVM 11 consumers cannot inline its inline functions from — breaking stream-chat (JVM 11) on any bump past 1.3.2. Targeting 11 is the compatible floor: consumable by both JVM 11 (Chat) and JVM 17 (Video) modules. The JDK 17 build toolchain is unchanged; only the emitted bytecode target is lowered.
aleksandar-apostolov
marked this pull request as ready for review
August 7, 2026 08:41
gpunto
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes AND-1372
🎯 Goal
stream-result has emitted JVM 17 bytecode since 1.3.3 (the 2024-09-30 "Use Java Version 17" sweep). Kotlin can't inline JVM-17
inlinefunctions (Result.map/flatMap,Errorhelpers) into a JVM-11 compilation, so JVM-11 consumers fail to compile — blocking stream-chat-android on any bump past 1.3.2 (surfaced wiring the AND-1367 bump to 1.4.0).Every Stream product SDK is JVM 11 — Chat, Core, Feeds, and Video (the released
stream-video-android-core-1.29.0.aaris Java 11 bytecode) — and nothing ever consumed the JVM-17 builds, so lowering the target realigns stream-result with all of its consumers.🛠 Implementation details
sourceCompatibility/targetCompatibilityandkotlinOptions.jvmTargetfrom17back to11across all modules (build.gradle.kts,stream-result,stream-result-call,stream-result-call-retrofit,app).commonMainKMP with zero dependencies, so nothing requires Java 17.GenericError.codeslot already on develop.🧪 Testing
./gradlew apiCheck spotlessCheckpass across all modules.Error.classis class major version 55 (Java 11) — was 61 (Java 17) in 1.4.0.☑️Contributor Checklist
General