Mohsin Ali’s Post

View profile for Mohsin Ali, graphic

Android Software Developer

Explain dependency configs for Android projects 1. implementation - This configuration is used to declare dependencies that are required for compiling the production source code of your app or library module. - Dependencies in this configuration are exposed to consumers of your library module (transitive dependencies). 2. api - Similar to implementation, but dependencies in this configuration are also exposed to consumers of your library module with their transitive dependencies. - Use this configuration when you want to expose a dependency and its transitive dependencies to other modules that depend on your module. 3. compileOnly - Declares dependencies that are required for compiling the production source code but should not be included in the packaged output (e.g., APK). - Useful for dependencies that are provided by the runtime environment, like the Android framework itself. 4. runtimeOnly - Declares dependencies that are not required for compiling the production source code but are required for running the packaged output. - Useful for dependencies that are dynamically loaded at runtime, like a logging framework. 5. testImplementation - Declares dependencies that are required for compiling and running local unit tests (tests in the test source set). 6. androidTestImplementation - Declares dependencies that are required for compiling and running instrumented tests (tests in the androidTest source set) on an Android device or emulator. 7. debugImplementation - Declares dependencies that are only required for the debug build type of your app or library module. - Useful for including debugging tools or libraries that should not be included in release builds. 8. releaseImplementation - Declares dependencies that are only required for the release build type of your app or library module. - Useful for including libraries or tools specific to release builds, like obfuscation or optimization tools. #gradle #android #androiddev #androidstudio #kotlin

  • No alternative text description for this image

To view or add a comment, sign in

Explore topics