Overview
Plugins in Android Code Studio come in two forms:- Project Modules - Additional modules within your Android project
- Build System Plugins - Gradle plugins and custom build logic
This guide focuses on project modules and Gradle plugins. Android Code Studio doesn’t currently support IDE plugins like IntelliJ IDEA or Android Studio.
Project Modules
Multi-module projects help organize code and improve build times.Module Types
The IDE supports these module types:- Android Library
- Java Library
- Dynamic Feature
Reusable Android code libraries:Use for:
library/build.gradle.kts
- Shared UI components
- Common utilities
- Feature modules
- Library distribution
Creating Modules
Choose Module Type
Select:
- Android Library - For Android-specific code
- Java Library - For pure Java/Kotlin code
Configure Module
Set:
- Module name - e.g.,
library,feature-login - Package name - e.g.,
com.example.library - Language - Java or Kotlin
Module Structure
Module Dependencies
Reference modules inbuild.gradle.kts:
app/build.gradle.kts
Gradle Plugins
Gradle plugins extend build functionality.Android Gradle Plugin (AGP)
The core plugin for Android development:build.gradle.kts
Kotlin Plugin
For Kotlin support:build.gradle.kts
Common Plugins
Applying Plugins
- Kotlin DSL
- Groovy
app/build.gradle.kts
Custom Build Logic
Create custom Gradle logic:buildSrc Module
For build configuration:buildSrc/src/main/kotlin/Dependencies.kt
app/build.gradle.kts
Version Catalogs
Modern dependency management:gradle/libs.versions.toml
app/build.gradle.kts
Template System
Android Code Studio includes a template system for project creation.Available Templates
From the source code analysis:templates-impl/
Template Structure
Template API
Creating Custom Templates
While the IDE doesn’t expose custom template creation in the UI, you can create module templates:- Create a template module
- Configure as needed
- Copy/paste for similar modules
Plugin Configuration
Configure plugin behavior:Android Plugin
app/build.gradle.kts
Kotlin Plugin
app/build.gradle.kts
Module Communication
Share code between modules:Expose APIs
library/src/main/kotlin/Library.kt
Consume APIs
app/src/main/kotlin/MainActivity.kt
Dependency Management
Module Dependencies
app/build.gradle.kts
Repository Configuration
settings.gradle.kts
Build Variants
Configure per-module variants:library/build.gradle.kts
Best Practices
Modularize by Feature
Organize modules by features, not layers. This improves build times and team collaboration.
Use API Dependencies
Use
api instead of implementation when dependencies must be transitive.Keep Modules Focused
Each module should have a single, well-defined purpose.
Version Consistently
Use version catalogs or buildSrc to maintain consistent dependency versions.
Troubleshooting
Module Not Found
Module Not Found
Error:
Project ':module' not foundSolution:- Check
settings.gradle.ktsincludes the module: - Verify the module directory exists
- Run File → Sync Project with Gradle Files
Circular Dependencies
Circular Dependencies
Error:
Circular dependency between...Solution:- Review module dependency graph
- Extract shared code to a common module
- Use dependency inversion principle
Plugin Version Conflicts
Plugin Version Conflicts
Error:
Plugin version mismatchSolution:
Ensure all modules use compatible versions:Resource Conflicts
Resource Conflicts
Error:
Duplicate resourcesSolution:
Add resource prefixes:Next Steps
- Build your modular app
- Configure environment variables for modules
- Debug module issues
- Use the AI Agent to generate module code