{"id":20566234,"url":"https://github.com/telkomdev/local-aar","last_synced_at":"2025-12-06T11:01:06.460Z","repository":{"id":107252225,"uuid":"387296842","full_name":"telkomdev/local-aar","owner":"telkomdev","description":"This repository contains gradle script for localizing your gradle module","archived":false,"fork":false,"pushed_at":"2021-07-26T07:47:20.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-16T20:19:03.303Z","etag":null,"topics":["aar","android","gradle","localization","script"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/telkomdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-19T00:33:20.000Z","updated_at":"2021-07-26T07:47:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"62714b6d-d6b5-4256-977b-870f954691b0","html_url":"https://github.com/telkomdev/local-aar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telkomdev%2Flocal-aar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telkomdev%2Flocal-aar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telkomdev%2Flocal-aar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/telkomdev%2Flocal-aar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/telkomdev","download_url":"https://codeload.github.com/telkomdev/local-aar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242179259,"owners_count":20084940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aar","android","gradle","localization","script"],"created_at":"2024-11-16T04:40:41.771Z","updated_at":"2025-12-06T11:01:02.371Z","avatar_url":"https://github.com/telkomdev.png","language":null,"readme":"# local-aar\nLocalize your android library module using AAR and define which module to use during your app development.\n\n## Why Localize library module\nAfter android projects grew bigger and implement modularization, there's certain issue that rises with it. By implementing localization, you can *improve gradle build time* as you're not really using the library module but the published version of it as aar.\u003cbr/\u003e\n\nThat's basically like telling gradle to leave your library module as-is and don't run anything on it when building apk, or even just trying to run your app.\n\n## Requirement\nBefore using this gradle script, your library modules **need to**:\n - Doesn't have any maven publication configuration\n - Have a debug build variant\n \n## Implementation\nFollow this steps to start using this gradle scripts:\n - [Adding scripts to all library modules](#adding-scripts-to-all-library-modules)\n - [Configuration consumer modules](#configuration-consumer-modules)\n - [`settings.gradle` configuration](#settingsgradle-configuration)\n - [Publish library modules](#publish-library-modules)\n - [`local.properties` configuration](#localproperties-configuration)\n\n\n### Adding scripts to all library modules\nYou may have more than one library modules in your project, add this line in all your library modules's `build.gradle`:\n```groovy\napply from: 'https://raw.githubusercontent.com/telkomdev/local-aar/main/publish.gradle'\n```\n\u003cbr/\u003e\n\n### Configuration consumer modules\nYour app module or even your modules now might use the localized AAR, add this line to all your aar consumer's `build.gradle`:\n```groovy\napply from: 'https://raw.githubusercontent.com/telkomdev/local-aar/main/local-aar.gradle'\n```\nThen change your library module declaration from:\n```groovy\nimplementation project(':library-a')\n```\nTo this:\n```groovy\nimplementation modulePath(':library-a')\n```\n\u003cbr/\u003e\n\n### `settings.gradle` configuration\nIn your project's `settings.gradle`, we will define ability to swap certain module during development. Configure it like this:\n```groovy\n// Add gradle script\napply from: 'https://raw.githubusercontent.com/telkomdev/local-aar/main/local-aar.gradle'\n\nrootProject.name = 'SampleApp'\ninclude ':app'\n\n// For your library modules, use includeIfEnabled\nincludeIfEnabled(':library-a')\nincludeIfEnabled(':library-b')\nincludeIfEnabled(':feature-a')\n```\n\u003cbr/\u003e\n\n### Publish library modules\nBefore start developing, you'll have to publish all your library modules first as aar. Do that by running this command:\n```shell\ngradlew publish\n```\nIf build successful, you should see `mavenLocal` folder in your root directory.\n\u003e You might want to add `mavenLocal` folder inside your `.gitignore` file.\n\u003cbr/\u003e\n\n### `local.properties` configuration\nWe'll be using `local.properties` to define does you want to run your app with library module as AAR and what module you want to work with right now. Add this variable:\n```groovy\n// Build with AAR?\nuseAAR=true\n\n// Modules you're working with right now, separated by space\nmodules=:app :some-modules-a :some-modules-b\n```\nGradle sync, and that's it!\n\n\u003cbr/\u003e\n\n## Reference\n[How We Improved Performance and Build Times in Android Studio](https://medium.com/gojekengineering/how-we-improved-performance-and-build-times-in-android-studio-306028166b79)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelkomdev%2Flocal-aar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftelkomdev%2Flocal-aar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftelkomdev%2Flocal-aar/lists"}