maven publish with aar dependency Could not resolve all files for configuration ':app:debugRuntimeClasspath'

I’m trying to deploy my module to maven central. I need to include an aar module required for the library and i managed to uploaded in, but when i try to include it on sample project i get error

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not find modulename:tmxb:unspecified. Searched in the following locations: - - -

I have followed steps from here Error building Android library: Direct local .aar file dependencies are not supported

I have created a new module on project passing the aar file and on build.gradle file i have added the following: configurations.maybeCreate("default") artifacts.add("default", file('moduleName.aar'))

On project settings i have included the new module and on project build gradle i passed it like this

api project(":moduleName")

I’m using maven-publish plugin.

Can anyone help me? am i missing anything?