material-components_materia.../docs/building-from-source.md
Haruki Hasegawa 0d26a3502a [Document] Remove outdated notes about android-maven-gradle-plugin
Resolves https://github.com/material-components/material-components-android/pull/1822

GIT_ORIGIN_REV_ID=15dbe27b5ff3b5b6e3412c7c371100c19defea6d
PiperOrigin-RevId: 339478116
2020-10-29 15:17:19 -04:00

1.6 KiB
Raw Permalink Blame History

Building From the Latest Source

If you'll be contributing to the library, or need a version newer than what has been released, Material Components for Android can also be built from source. To do so:

Clone the repository:

git clone https://github.com/material-components/material-components-android.git

Then, build the library's AARs using Gradle:

./gradlew publish -PmavenRepoUrl="file://localhost/<path_to_aars>"

This will output AARs and Maven artifacts for each of the library's modules to the path on your machine, e.g., $HOME/Desktop/material_aars.

To use the AARs in your app locally, copy the output from your AAR directory into your local Maven repository (~/.m2/repository). Then add mavenLocal() as a repository in your project's top-level build.gradle file. Finally, add the Design Library dependency as you would normally, using the version specified as mdcLibraryVersion in the library's top-level build.gradle file.