# Build Setup: Targets, Source Sets and buildSrc for tvOS in a Compose Multiplatform Fork

DevFeed: [Build Setup: Targets, Source Sets and buildSrc for tvOS in a Compose Multiplatform Fork](<https://devfeed.tech/articles/build-setup-targets-source-sets-and-buildsrc-for-tvos-in-a-compose-multiplatform-fork-22943.md>)

Original publisher: [Read original article](<https://proandroiddev.com/build-setup-targets-source-sets-and-buildsrc-for-tvos-in-a-compose-multiplatform-fork-4d9caafa30a8?source=rss----c72404660798---4>)

Author: Sajid Ali

Published: 2026-09-14T04:24:43Z

Content type: tutorial

Language: en

Sources: [ProAndroidDev - Medium](<https://devfeed.tech/sources/proandroiddev-medium.md>)

Topics: [compose-multiplatform](<https://devfeed.tech/topics/compose-multiplatform.md>), [tvOS](<https://devfeed.tech/topics/tvos.md>), [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [Gradle](<https://devfeed.tech/topics/gradle.md>)

Tags: [apple](<https://devfeed.tech/tags/apple.md>), [build](<https://devfeed.tech/tags/build.md>), [compiler](<https://devfeed.tech/tags/compiler.md>), [compose-multiplatform](<https://devfeed.tech/tags/compose-multiplatform.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [gradle-plugin](<https://devfeed.tech/tags/gradle-plugin.md>), [ios](<https://devfeed.tech/tags/ios.md>), [jetbrains](<https://devfeed.tech/tags/jetbrains.md>), [multiplatform](<https://devfeed.tech/tags/multiplatform.md>), [source](<https://devfeed.tech/tags/source.md>)

## AI overview

This tutorial explains the build setup for adding tvOS support to a Compose Multiplatform fork. It covers Kotlin Multiplatform targets, source-set organization shared between iOS and tvOS, and the build-layer work used to identify missing modules and dependencies.

## Source excerpt

Compose Multiplatform on tvOS This series: Compose Multiplatform on tvOS My Journey Making Compose Multiplatform Work on tvOS, and What I Learned Build Setup: Targets, Source Sets and buildSrc for tvOS in a Compose Multiplatform Fork (this post) Rendering (coming soon) Siri Remote input (coming soon) Siri Remote trackpad (coming soon) Screen density and text input (coming soon) Porting tv-material (coming soon) The Gradle plugin and third-party libraries (coming soon) Maintaining the fork (coming soon) Building a real app on it (coming soon) Part 1 was why this fork exists. This one is the build layer, and it comes before any Compose code, because in Kotlin Multiplatform a target is not a flag you flip at the end. It decides which source sets compile, which dependencies resolve, which klibs get published, which linker flags get passed. Until the build knows about tvosArm64, nothing tells you what is missing. So the first commits were build files. Once the targets were on, the compiler listed what was missing, module by module, and I worked through that list. Source set layout on the tvos branch I started on a branch called tvos, based on upstream. Back then JetBrains called iOS "uikit" in this repository and the source set was uikitMain. Because tvOS is also UIKit underneath, it made sense to have a common source parent for both iOS and tvOS. But iOS was already being called uikit, so I chose uiKitCommonMain as the source set name and moved all the UIKit files there, keeping only the iOS specific files in uikitMain and putting the tvOS specific files in a new source set, tvosMain. The problem with this approach was how to keep up with upstream. I tried a symlink to the uikit source set, and then overriding the tvOS files in a separate target. The override worked but complicated the process. At that time my goal was to make it runnable on tvOS however possible, so we would have a proof of concept. So I did a lot of hacks in the tvos branch to make it runnable, and af