hello, im bit stuck on how to define "aar" or "zip...
# gradle
j
hello, im bit stuck on how to define "aar" or "zip" dependency with dependencies constraints (using github/android/plaid -like structure) with
dependencies { constraints { api("${Libs.LIBRARY}:${version}@aar") } }
and using
implementation(Libs.LIBRARY)
in my :app gradle this dependency fails to resolve im sure there is some parameter which could be used to define extensions, but i cant seem to figure out how to do it
o
From what I understand, I don't think you can define a constraint with extensions, as dependencies don't actually care about extensions, that's used to determine the artifact that is selected after resolving the dependency in this case I would constrain the version, and do
implementation("${Libs.LIBRARY}@aar")
ref https://docs.gradle.org/current/userguide/declaring_dependencies.html#sec:resolve_specific_artifacts_from_dependency
The
@
character separates the dependency’s coordinates from the artifact’s file extension.
j
oh wow, thank you. i was stuck thinking i had to use
@aar
after version number. I'll try CI build, local one seems good 👍