{"id":16558900,"url":"https://github.com/gmazzo/gradle-apklib-plugin","last_synced_at":"2025-06-15T21:33:29.182Z","repository":{"id":145163774,"uuid":"134443815","full_name":"gmazzo/gradle-apklib-plugin","owner":"gmazzo","description":"An Android-Gradle plugin for generate DEX classes and a APK from a Library module.","archived":false,"fork":false,"pushed_at":"2019-02-24T18:29:22.000Z","size":84,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T23:35:10.079Z","etag":null,"topics":["aar","android","apk","classloader","dagger2","dagger2-android","dex","gradle","gradle-plugin","kotlin","kotlin-android","library","serviceprovider"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/gmazzo.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":"2018-05-22T16:29:25.000Z","updated_at":"2023-12-18T09:07:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"53ca7bc3-0b3a-4047-920b-e2de3520f516","html_url":"https://github.com/gmazzo/gradle-apklib-plugin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gmazzo/gradle-apklib-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmazzo%2Fgradle-apklib-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmazzo%2Fgradle-apklib-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmazzo%2Fgradle-apklib-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmazzo%2Fgradle-apklib-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gmazzo","download_url":"https://codeload.github.com/gmazzo/gradle-apklib-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gmazzo%2Fgradle-apklib-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260053288,"owners_count":22951851,"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","apk","classloader","dagger2","dagger2-android","dex","gradle","gradle-plugin","kotlin","kotlin-android","library","serviceprovider"],"created_at":"2024-10-11T20:24:04.820Z","updated_at":"2025-06-15T21:33:29.173Z","avatar_url":"https://github.com/gmazzo.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gradle-apklib-plugin\nAn Android-Gradle plugin for generate DEX classes and a APK from a Library module.\n\n[![Plugins Site](https://img.shields.io/maven-metadata/v/https/plugins.gradle.org/m2/com/github/gmazzo/gradle-apklib-plugin/maven-metadata.xml.svg?label=gradle-plugins)](https://plugins.gradle.org/plugin/com.github.gmazzo.apklib)\n\n## Why?\nWell, if you reach this page, you are very likely looking for this.\nIn my case, I was on the need to perform hot-code Android updates pushed from my server without forcing the users to update the app from the *PlayStore*.\n\n## How it works\nThis library relies on the Android's build stack, and given a Library module:\n- Forces the assemble of the AAR package\n- Extracts the `classes.jar` and perform dexing on it using the `dx` tool.\n- Repackages the generated `classes.dex` along with all original Java resources from `classes.jar` into an `mymodule.lib.apk` file\n\nNote: This tool will allow you to push updates of Java (Android) code and Java resources. Android's resources (strings, drawables, etc) or any other Android specific component are not supported.\n\n## Usage\nOn your `build.gradle` add:\n```groovy\nplugins {\n    id 'com.github.gmazzo.apklib' version '0.3'\n}\n\napply plugin: 'com.android.library'\n```\n\nAfter applying the plugin, a task `bundleLibApk` per variant will be added to your build.\nOn a default configuration will be `bundleLibApkDebug` and `bundleLibApkRelease`.\n\n## What's next?\nCheck the provided `example-app` and `example-lib` for a full working example of this library with hot-code loading.\nYou may easily replace the content from the asset with the response from a web endpoint.\n\nThis repository also serves as an example of:\n- Building and publishing a **Gradle's plugin** (also linked to another plugin like Android's one in this case)\n- Full **Kotlin** + **Dagger 2** working code\n- Kotlin Android Layout Extensions working code (to **avoid findViewById()**)\n- **Dagger's Android module** working code\n- Android's **buildConfigField** usage\n- Gradle and Android **sourceSet specific dependencies** working code\n- Gradle's tasks **input** and **output** definition for proper **UP-TO-DATE** support on custom tasks\n- Gradle's tasks dependency (including cross-project linking) with **dependsOn** and **evaluationDependsOn**\n- Android's **assets generation** with Gradle's tasks\n- Gradle's **includeBuild** and **dependencySubstitution** working code, for in-build live plugin build and testing\n- Advanced ProGuard obfuscation like **-keep,allowobfuscation**, **-flattenpackagehierarchy** and **-adaptresourcefilecontents**\n- Exploration of Java backend concepts of **ClassLoader** and **ServiceLoader**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmazzo%2Fgradle-apklib-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgmazzo%2Fgradle-apklib-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgmazzo%2Fgradle-apklib-plugin/lists"}