This message was deleted.
# community-support
s
This message was deleted.
e
app
resolves the transitive dependencies of
library
itself, the
repositories
in use by
library
are not exposed in any way
e
Is there any way to tell
app
to delegate to
library
for resolving the dependencies?
e
no
e
So I only need to add
repositories
to my top level projects?
g
Also is quite common to add private repo via init script if you don't want to bring it directly to your
settings.gradle[.kts]
(or
build.gradle[.kts]
). Many do so both on local developer workstations and ci servers. Another approach is to use settings plugin to externalize repo definition. I personally use this approach lately with my own plugin published to gradle plugin repo and private repo parameters in global
gradle.properties
file (or via command line parameters on GitHub Actions).
e
The issue with
artifact
is that the repo it lives in is authenticated by a secret that lives in the project itself (decrypted using ejson ). In my convention plugin I use an ejson library to decrypt the secret when adding the repository, but my understanding is that if I use
dependencyResolutionManagement
I won't be able to use the ejson library (because it isn't in the classpath yet). I'd rather not externalize this into a plugin or script.
e
you can add to the settings.gradle buildscript classpath if you want to use something in
dependencyResolutionManagement
just like in any other script
e
Oh interesting. I wasn't aware of that. Doing that results in `Using dependency catalogs requires the activation of the matching feature preview.`even though I have
enableFeaturePreview("VERSION_CATALOGS")
in
settings.gradle.kts
🤔
Oh looks like Android Studio showed the wrong error? I had to move
buildscript
below
pluginManagement