TL;DR
You can now upload your Android projects (AAR files) to packagecloud.io! Easily share them publicly or privately. Read on to find out the different ways to upload, download, and depend on AAR files.
How to upload AAR files
There are various ways to upload your Android project files to packagecloud.io. You can use Gradle/Maven (recommended), our CLI tool, or our API.
Gradle (recommended)
You can configure Gradle to upload Android AAR files by following the steps in our documentation for Gradle deploy.
Once configured, you can run uploadArchives
in your Gradle project to upload your Android AAR files to packagecloud.io.
Maven (recommended)
You can configure Maven to upload Android AAR files by following the steps in our documentation for Maven deploy.
Once configured, you can run deploy
in your Maven project to upload your Android AAR files to packagecloud.io.
CLI
You can also push your Android AAR file using our CLI. Make sure you are running version 0.2.41
or above.
In the case that we cannot detect the groupId
, version
, or artifactId
(the maven coordinates, or you wish to override the detected values, you’ll need to pass them in using the --coordinates=
option, like so:
API
You can also use the packages create API to upload AAR files. Similarly to the CLI, you might need to pass a package[coordinates]
parameter if we cannot detect it from the package itself.
How to depend on AAR files
Once your Android AAR file is uploaded, you can visit it’s package page on packagecloud.io to view the install instructions for Maven or Gradle. Depending on Android AAR files is similar to other dependencies, except they use a packaging of aar
.
Gradle
In Gradle, this is denoted using an trailing @
sign on your dependency. For example:
Example dependency definition in build.gradle
Maven
In Maven, this is denoted using <packaging>aar</packaging>
in your dependency. For example:
Example dependency definition in pom.xml
How to download Android AAR files
You can download the Android AAR files by visiting it’s package page and clicking the download button next to the artifact and checksum listing, as shown below.
Downloading Android AAR files
Conclusion
That’s it! Please report any bugs you find by emailing packagecloud support at support@packagecloud.io. Thanks!