{"id":17652877,"url":"https://github.com/mirceanis/multi-flavor-lib-demo","last_synced_at":"2026-03-12T21:31:45.489Z","repository":{"id":97927918,"uuid":"138180173","full_name":"mirceanis/multi-flavor-lib-demo","owner":"mirceanis","description":"how to use jitpack to publish multi-flavor android libraries","archived":false,"fork":false,"pushed_at":"2020-03-13T10:48:21.000Z","size":161,"stargazers_count":30,"open_issues_count":1,"forks_count":15,"subscribers_count":1,"default_branch":"multi-lib","last_synced_at":"2025-10-10T23:08:15.482Z","etag":null,"topics":["android","android-library","flavors","gradle","jitpack","library","multilib"],"latest_commit_sha":null,"homepage":"https://stackoverflow.com/questions/50951938/publish-android-libraries-with-flavors","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mirceanis.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","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},"funding":{"patreon":"mirceanis@gmail.com","ko_fi":"mirceanis","liberapay":"mirceanis","issuehunt":"mirceanis"}},"created_at":"2018-06-21T14:20:41.000Z","updated_at":"2024-05-23T10:39:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"25340823-519d-43e1-84ad-c59d539c11d4","html_url":"https://github.com/mirceanis/multi-flavor-lib-demo","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/mirceanis/multi-flavor-lib-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirceanis%2Fmulti-flavor-lib-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirceanis%2Fmulti-flavor-lib-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirceanis%2Fmulti-flavor-lib-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirceanis%2Fmulti-flavor-lib-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mirceanis","download_url":"https://codeload.github.com/mirceanis/multi-flavor-lib-demo/tar.gz/refs/heads/multi-lib","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mirceanis%2Fmulti-flavor-lib-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30445030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T21:31:01.033Z","status":"ssl_error","status_checked_at":"2026-03-12T21:30:43.161Z","response_time":114,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["android","android-library","flavors","gradle","jitpack","library","multilib"],"created_at":"2024-10-23T11:49:11.366Z","updated_at":"2026-03-12T21:31:45.458Z","avatar_url":"https://github.com/mirceanis.png","language":"Kotlin","funding_links":["https://patreon.com/mirceanis@gmail.com","https://ko-fi.com/mirceanis","https://liberapay.com/mirceanis","https://issuehunt.io/r/mirceanis"],"categories":[],"sub_categories":[],"readme":"# Publish multi-flavor android libraries with [jitpack.io](https://jitpack.io/)\n\nThis project demonstrates how to publish multi-flavor android libraries to jitpack.\n\n[![Release](https://jitpack.io/v/mirceanis/multi-flavor-lib-demo.svg)](https://jitpack.io/#mirceanis/multi-flavor-lib-demo)\n\nThe gist of it is using [dcendents gradle plugin](https://github.com/dcendents/android-maven-gradle-plugin)\nand understanding that jitpack calls \"./gradlew install\" if left to auto-config\n\n### What's here:\n\n* on the [multi-lib branch](https://github.com/mirceanis/multi-flavor-lib-demo/tree/multi-lib)\n  * a project that publishes 2 libraries (matterlib and energylib) each with their own flavors\n  * a demoapp that gets to use the libs\n* on the [single-lib branch](https://github.com/mirceanis/multi-flavor-lib-demo/tree/single-lib)\n  * just one library with flavors\n  * the demoapp that uses it\n\nThere's a difference in the way jitpack names the artifacts for single vs multiple library repositories.\n\n### Flavor coordinates on jitpack\n\n#### Single library project\n\nIf the project includes a single library, the repository name gets to be the artifactId, even if you specify otherwise.\n\nTo include a flavor as a dependency:\n\n```groovy\nimplementation \"com.github.\u003cUSER\u003e:\u003cREPO\u003e:\u003cgit-tag\u003e:\u003cflavor-name\u003e@aar\"\n```\n\nIf the library has a `defaultPublishConfig`, there should be an artifact with the normal jitpack coordinates:\n\n```groovy\nimplementation \"com.github.\u003cUSER\u003e:\u003cREPO\u003e:\u003cgit-tag\u003e\"\n```\nAn example for this setup is in the [single-lib](https://github.com/mirceanis/multi-flavor-lib-demo/tree/single-lib)\nbranch of this project.\n\n#### multi-lib project\n\nIf the project produces multiple libraries, the coordinates change a little.\n\nWhen working with a flavor of the library, include it like this:\n```groovy\nimplementation \"com.github.\u003cUSER\u003e.\u003cREPO\u003e:\u003clibrary-module\u003e:\u003cgit-tag\u003e:\u003cflavor-name\u003e@aar\"\n``` \n\nAnd if the library has a `defaultPublishConfig`, there should be an artifact with the following coordinates:\n\n```groovy\nimplementation \"com.github.\u003cUSER\u003e.\u003cREPO\u003e:\u003clibrary-module\u003e:\u003cgit-tag\u003e\"\n```\n\nAn example for this setup is in the [multi-lib](https://github.com/mirceanis/multi-flavor-lib-demo/tree/multi-lib)\nbranch of this project.\n\n\n\n**jitpack.io is great for OSS.**\n\n\n### Note\n\nYou can see the build logs for this sample library here: https://jitpack.io/#mirceanis/multi-flavor-lib-demo\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirceanis%2Fmulti-flavor-lib-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmirceanis%2Fmulti-flavor-lib-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmirceanis%2Fmulti-flavor-lib-demo/lists"}