mikepenz/Android-Iconics

Document how to use "aar" artifacts with version catalogs

Closed this issue · 2 comments

About this issue

The documentation doesn't cover how to use the libraries with Gradle version catalogs. Ordinarily this would be straightforward, but it's made more complicated because Gradle version catalogs don't support the "aar" artifact type.

So if you have something like this in libs.versions.toml:

[versions]
# ...
material-iconics = "5.4.0"
material-typeface-outlined = "4.0.0.1-kotlin"
# ...

[libraries]
# ...
material-iconics = { module = "com.mikepenz:iconics-core", version.ref="material-iconics" }
material-typeface-outlined = { module = "com.mikepenz:google-material-typeface-outlined", version.ref = "material-typeface-outlined" }
# ...

You must add { artifact { type = "aar" } } after the relevant implementation, like this:

    implementation(libs.material.iconics)
    implementation(libs.material.typeface.outlined) { artifact { type = "aar" } }

Hope that's helpful.

Checklist

Thank you for bringing this up.

I believe strictly speaking it is better if we look into removing the dependency of the font to the typeface-api module from the pom so the @aar won't be required.

It's been a while since I last updated this project, as it is no longer as relevant in a world of compose and proper VectorDrawable support :D

All typeface libs will have been updated to the latest version of iconcis. so as soon as those are available the @aar wouldn't be required at this time.

Will add an example to the readme of:

implementation(libs.material.typeface.outlined) { artifact { type = "aar" } }