skip icon indicating copy to clipboard operation
skip copied to clipboard

Android namespace is the same for all aar files

Open eygraber opened this issue 9 months ago • 3 comments

All of the generated aar files output from running skip export are using the same namespace, but they are supposed to be unique. It looks like this is happening because each Gradle project is using group as String to set namespace. Since there is no group defined, I believe it falls back to the rootProject.name defined in settings.gradle.kts causing all of the outputs to use the same namespace.

eygraber avatar Mar 28 '25 19:03 eygraber

I've noticed Gradle warnings about this as well. Have you experienced any concrete problems as a result, or just the alarming warnings? I'd like to fix this – and I think we probably can by just adding something like group = swift-module-name to the generated build.gradle.kts – but I'm curious what the consequences of having all the modules share the same group name are.

(Note: I transferred this over to the skip repo from skip-bridge, since it affects all of Skip and not just native bridging)

marcprux avatar Mar 28 '25 20:03 marcprux

The namespace is used for resources and generated build configs, so it probably wouldn't cause a concrete issue with Skip. It would be nice to get rid of the warning though.

eygraber avatar Mar 28 '25 20:03 eygraber

I can confirm that this is an issue since when building, you get this warning:

Namespace 'naturitas.core' is used in multiple modules and/or libraries: naturitas.core:NaturitasCore:1.0.0-SNAPSHOT, naturitas.core:SkipAndroidBridge:1.0.0-SNAPSHOT, naturitas.core:SkipBridge:1.0.0-SNAPSHOT, naturitas.core:SkipFoundation:1.0.0-SNAPSHOT, naturitas.core:SkipKeychain:1.0.0-SNAPSHOT, naturitas.core:SkipLib:1.0.0-SNAPSHOT, naturitas.core:SkipUnit:1.0.0-SNAPSHOT. Please ensure that all modules and libraries have a unique namespace. For more information, See https://developer.android.com/studio/build/configure-app-module#set-namespace

piercifani avatar Jul 17 '25 14:07 piercifani