Recorrido por las carpetas generadas
Para qué sirve cada módulo y directorio de la plantilla
Recorrido por las carpetas generadas es una lección gratuita de Kotlin Multiplatform Academy en CoddyKit. Esta es la lección 4 de 4. Puedes leer la lección completa abajo gratuitamente — luego la practicas en el navegador con un editor de código integrado y un tutor de IA 24/7. Forma parte de la ruta de aprendizaje de Kotlin Multiplatform Academy, y tu progreso se sincroniza en la web y la app de CoddyKit. El curso de Kotlin Multiplatform Academy incluye 4 lecciones en total.
Partes de esta lección aún no han sido traducidas y se muestran en inglés.
Know Where Things Live
The template looks busy at first. Once you learn what each folder is for, you will always know where your code belongs. 🗺️
The shared Module
The shared module is the heart of KMP. The Kotlin you write here is reused by both the Android and iOS apps.
commonMain
Inside shared, commonMain holds platform-independent Kotlin. Code here must compile for every target you chose.
androidMain
androidMain is for shared code that needs Android-only APIs. It is your place for platform-specific actual implementations.
iosMain
iosMain mirrors androidMain for the Apple side. It holds Kotlin that touches iOS-only frameworks and platform details.
The Android App Module
The androidApp module is a normal Android project. It depends on the shared module and contains the Android UI and entry point.
The iOS App Folder
The iosApp folder is an Xcode project. You open it in Xcode, and it links the framework built from your shared module.
Gradle Files
The build.gradle.kts files configure each module. The shared one declares your targets and dependencies, so you will edit it often.
settings.gradle.kts
settings.gradle.kts lists which modules belong to the build. It is how Gradle knows shared and androidApp are part of one project.
gradle.properties
gradle.properties holds project-wide flags, like JVM memory and KMP options. Small tweaks here affect the whole build.
A Mental Map
Shared code goes in the shared module, platform UI lives in the app modules, and Gradle files glue it all together. That map carries you far.
Quick Check
Where should you put Kotlin code that must work on every target?
Recap
You toured the layout: the shared module with commonMain, androidMain and iosMain, the two app modules, and the Gradle files that bind them. ✅
Preguntas frecuentes
¿La lección «Recorrido por las carpetas generadas» es gratis?
Sí — el texto completo de «Recorrido por las carpetas generadas» es gratis para leer aquí en la web. Para practicarla de forma interactiva (editor de código integrado y tutor de IA 24/7) y desbloquear el resto del curso de Kotlin Multiplatform Academy, actualiza a CoddyKit PRO. El curso de Kotlin Multiplatform Academy incluye 4 lecciones en total.
¿Qué aprenderé en «Recorrido por las carpetas generadas»?
Para qué sirve cada módulo y directorio de la plantilla Practicas Kotlin Multiplatform Academy con código real que ejecutas directamente en el navegador, y un tutor de IA 24/7 responde tus preguntas mientras trabajas en la lección.
¿Necesito experiencia previa para empezar Kotlin Multiplatform Academy?
No se requiere experiencia previa. Kotlin Multiplatform Academy en CoddyKit está estructurado para principiantes hasta estudiantes avanzados, así que puedes empezar aquí o desde el inicio y avanzar a tu ritmo. Esta es la lección 4 de 4.
¿Cuánto tiempo toma la lección «Recorrido por las carpetas generadas»?
La mayoría de las lecciones de CoddyKit toman alrededor de 5–10 minutos. Cada una es compacta e interactiva, así que avanzas constantemente y retomas exactamente por donde dejaste en la web y la app.
¿Puedo escribir y ejecutar código en esta lección de Kotlin Multiplatform Academy?
Sí. Cada lección de Kotlin Multiplatform Academy incluye un editor de código integrado, así que escribes y ejecutas código real directamente en tu navegador y obtienes retroalimentación instantánea de IA — sin configuración local necesaria.
Todas las lecciones de este curso
- JDK, Android Studio y el plugin de KMP
- Xcode y CocoaPods para el lado de iOS
- Genere un proyecto con el asistente de KMP
- Recorrido por las carpetas generadas