Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module name in camelCase #7

Open
boguszpawlowski opened this issue Jul 28, 2020 · 1 comment
Open

Module name in camelCase #7

boguszpawlowski opened this issue Jul 28, 2020 · 1 comment

Comments

@boguszpawlowski
Copy link

I am using AutoModule v0.12 with android gradle plugin v4.0.0

settings.gradle.kts:

plugins {
    id("com.pablisco.gradle.automodule") version "0.12"
}

Code generated in modules.kt for module with name common-db:

val commonDb: CommonDb = CommonDb
object CommonDb : AutoModuleDependency by autoModuleDependency(":common-db")

Used in app level build.gradle (groovy dsl):

Implementation project(autoModules.commonDb)

Error:
Project with path ':commonDb' could not be found in project ':app'.

Thus my question: are module names converted to camelCase, or maybe im using it in wrong way?
Let me know if you need more info ;)

@boguszpawlowski boguszpawlowski changed the title Module name in cameCase Module name in camelCase Jul 28, 2020
@pablisco
Copy link
Owner

pablisco commented Jul 29, 2020

Oh, that's a good one. In groovy, I was being lazy and just take the name of the property:
https://github.com/pablisco/auto-module/blob/master/plugin/src/main/kotlin/com/pablisco/gradle/automodule/GroovyAutoModuleDependency.kt#L13

I'll see how to fix it in a more future proof way.

In the meantime, you should be able to import it by doing:

implementation project(autoModules.'common-db')

I haven't tested it but should do the trick for now 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants