Describe the bug
The generated resource String 'default_web_client_id' is only available on the main application module, breaking modularization.
My app module depends on say login feature module. Inside login module, I handle the connection stuff.
Inside the app module, I can use getString(R.string.default_web_client_id).
Inside the login module, I can't because it's not generated for my module.
To Reproduce
Steps to reproduce the behavior:
1/ Try to implement the firebase-auth inside a library module instead of an application module
2/ Fail
Expected behavior
We should be able to modularize our application.
Desktop (please complete the following information):
- Gradle version: 8.6
- AGP: 8.4.0
- Plugin name and version: google-services
Additional context
This is my setup:
build.gradle.kts (root):
plugins {
...
alias(libs.plugins.googleServices) apply false
}
gradle/libs.versions.toml:
[versions]
googleServicesVersion = "4.4.1"
...
[plugins]
googleServices = { id = "com.google.gms.google-services", version.ref = "googleServicesVersion " }
app/build.gradle.kts (module):
plugins {
...
alias(libs.plugins.googleServices)
}
Note: If I apply the plugin in the login/build.gradle.kts to try to generate the resource String in my module, it says The google-services Gradle plugin needs to be applied on a project with com.android.application or com.android.dynamic-feature. so either way I'm doomed 🤷
Describe the bug
The generated resource String 'default_web_client_id' is only available on the main application module, breaking modularization.
My
appmodule depends on sayloginfeature module. Insideloginmodule, I handle the connection stuff.Inside the
appmodule, I can usegetString(R.string.default_web_client_id).Inside the
loginmodule, I can't because it's not generated for my module.To Reproduce
Steps to reproduce the behavior:
1/ Try to implement the firebase-auth inside a library module instead of an application module
2/ Fail
Expected behavior
We should be able to modularize our application.
Desktop (please complete the following information):
Additional context
This is my setup:
build.gradle.kts (root):
gradle/libs.versions.toml:
app/build.gradle.kts (module):
Note: If I apply the plugin in the login/build.gradle.kts to try to generate the resource String in my module, it says
The google-services Gradle plugin needs to be applied on a project with com.android.application or com.android.dynamic-feature.so either way I'm doomed 🤷