Pro Android with Kotlin
CHAPTER 10: Development
Download 5.42 Mb. Pdf ko'rish
|
@de android telegram Pro Android with Kotlin Developing Modern Mobile
264 CHAPTER 10: Development Using the Library Once you invoke Build ➤ Rebuild Project, you can find the Android library inside this folder of the module. build/outputs/aar To use it from clients, create a new module in the client project via New ➤ New Module, choose Import .JAR/.AAR Package, and navigate to the .aar file generated by the library project. Caution This procedure copies the .aar file. If you have a new version of the library, you can either remove the library project inside the client project and import it again or copy the .aar file manually from the library project to the client project. To use the library in the client, you just add import com.example.regularexpressionlib.* to the header, and henceforth you can apply the new matching constructs as shown in the previous test. Publishing the Library So far we have used the library locally, which means you have the library project somewhere on your development machine and can use it from other projects on the same machine. You can also publish libraries, meaning make them available for other developers inside a corporate environment if you have a corporate repository at hand or make them truly public for libraries you want to provide to the community. Unfortunately, the process of publishing libraries is rather complex and involves altering the build files in several places and using third party plug-ins and repository web sites. This makes the process of publishing libraries a complex and brittle task, and a detailed description of one possible publishing process might easily be outdated when you read this book. I therefore ask you to do your own research. Entering publishing android libraries in your favorite search engine will readily point you to online resources that will help you. If you find several processes that might suit your needs, a general rule of thumb is to use one that has a large supporting community and is as easy as possible. Also, make sure for corporate projects you have the allowance to use public repositories if you want to use one of them. If you cannot use public repositories, installing a corporate repository is not an overly complex task. To establish a corporate Maven repository, you can use the software suite Artifactory. |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling