Custom plugin with aar library

Hi, I’m new to capacitor and I’m trying to create a plugin that relies on a aar library.
I generated the plugin with capacitor cli and managed to make it work on the plugin project (it does recognize the aar library)
However, when i do the npm link and npm install of the plugin, the aar es not recognized:

node_modules/capacitor-plugin-custom/android/build.gradle' line: 61
A problem occurred evaluating project ':capacitor-plugin-continuousspeech'.
> Project with path ':kaldi-android-5.2' could not be found in project ':capacitor-plugin-custom'.

Line 61 is implementation project(':kaldi-android-5.2')

dependencies {
	implementation fileTree(include: ['*.jar'], dir: 'libs')
	implementation project(':capacitor-android')
	testImplementation "junit:junit:$junitVersion"
	androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
	androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
	implementation project(':kaldi-android-5.2')
	implementation 'androidx.appcompat:appcompat:1.2.0'

However, the kaldi-android-5-2 folder is present and its build.gradle imports the kaldi-android-5.2.aar

Any ideas on what I’m doing wrong?