I am trying to build an arr package in Android Studio. This package contains dependecies for Zendesk:
allprojects {
repositories {
maven { url 'https://zendesk.artifactoryonline.com/zendesk/repo' }
}
}
compile (group: 'com.zendesk', name: 'sdk', version: '1.7.0.1') {
transitive = true
}
compile (group: 'com.zopim.android', name: 'sdk', version: '1.3.1.1') {
transitive = true
}
I want to build this package for a Unity3d project. This package should contain all dependecies for Zendesk (the transitive = true property). When I open the aar file there is no dependencies for Zendesk. What is wrong?
A variant of a component can have dependencies on other modules to work properly, so-called transitive dependencies. Releases of a module hosted on a repository can provide metadata to declare those transitive dependencies. By default, Gradle resolves transitive dependencies automatically.
To add a dependency to your project, specify a dependency configuration such as implementation in the dependencies block of your module's build.gradle file.
For example the testImplementation configuration extends the implementation configuration. The configuration hierarchy has a practical purpose: compiling tests requires the dependencies of the source code under test on top of the dependencies needed write the test class.
flatDir(configureClosure) Adds an configures a repository which will look for dependencies in a number of local directories. flatDir(args) Adds a resolver that looks into a number of directories for artifacts. The artifacts are expected to be located in the root of the specified directories.
By default AARs do not include any dependencies. If you want to include them you have to copy these libs from artifactory/your cache folder into your package, either by doing it manually or this task might help you: https://stackoverflow.com/a/33539941/4310905
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With