{"id":21997690,"url":"https://github.com/osfunapps/os_android_apk_builder-py","last_synced_at":"2025-09-08T20:36:37.984Z","repository":{"id":54512396,"uuid":"196639913","full_name":"osfunapps/os_android_apk_builder-py","owner":"osfunapps","description":"This module will create an Android apk/app bundle programmatically (dynamically), from an Android project, faster and without Android Studio","archived":false,"fork":false,"pushed_at":"2021-02-14T11:42:35.000Z","size":67,"stargazers_count":22,"open_issues_count":0,"forks_count":5,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-03T15:44:03.994Z","etag":null,"topics":["android","apk","assemble-release","automation","create","gradle","osfunapps","pre-publish","python","release"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osfunapps.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-12T20:13:10.000Z","updated_at":"2025-03-29T01:48:41.000Z","dependencies_parsed_at":"2022-08-13T18:20:14.980Z","dependency_job_id":null,"html_url":"https://github.com/osfunapps/os_android_apk_builder-py","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/osfunapps/os_android_apk_builder-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfunapps%2Fos_android_apk_builder-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfunapps%2Fos_android_apk_builder-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfunapps%2Fos_android_apk_builder-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfunapps%2Fos_android_apk_builder-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osfunapps","download_url":"https://codeload.github.com/osfunapps/os_android_apk_builder-py/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osfunapps%2Fos_android_apk_builder-py/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231507,"owners_count":25245601,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","apk","assemble-release","automation","create","gradle","osfunapps","pre-publish","python","release"],"created_at":"2024-11-29T22:17:42.533Z","updated_at":"2025-09-08T20:36:37.484Z","avatar_url":"https://github.com/osfunapps.png","language":"Python","readme":"Introduction\n------------\n\nThis module will create an Android APK/App Bundle programmatically (dynamically), from an Android project, faster and without Android Studio.\n\n## Installation\nInstall via pip:\n\n```python \npip install os-android-apk-builder\n```\n\n## Usage       \n    \nFirst, define your KeyStore and version properties:\n\n```python\nfrom os_android_apk_builder.objs.KeyStoreProperties import KeyStoreProperties\nfrom os_android_app_version_changer.objs.VersionProperties import VersionProperties\n\n\n# set your KeyStore properties\nkey_store_props = KeyStoreProperties(key_store_file_path='/path/to/keystore/file.jks',\n                                     store_password='StorePassword123',\n                                     key_alias='alias name',\n                                     key_password='KeyPassword123',\n                                     v1_signing_enabled=True,\n                                     v2_signing_enabled=True)\n\n# set the version properties (version code and version name)\nversion_props = VersionProperties(new_version_code=VersionProperties.RAISE_VERSION_BY_ONE,\nnew_version_name=\"1.0.3\")\n```\nNOTICE: each of the version properties can also hold, apart from specific versions, ```VersionProperties.KEEP_OLD_VERSION``` or ```VersionProperties.RAISE_VERSION_BY_ONE```.\n\nNow, generate an apk or app bundle below:\n    \n# Generate APK\n```python\nfrom os_android_apk_builder import apk_builder\n\napk_builder.build_apk(project_path='/path/to/android/project',\n                      apk_dst_dir_path='/path/to/apk/output/directory',\n                      key_store_properties=key_store_props,\n                      version_properties=version_props)\n```\n\n# Generate AppBundle\n```python\nfrom os_android_apk_builder import apk_builder\n\napk_builder.build_app_bundle(project_path='/path/to/android/project',\n                             app_bundle_dst_dir_path='/path/to/app/bundle/output/directory',\n                             key_store_properties=key_store_props,\n                             version_properties=version_props)\n```\n\n## Advanced Usage\nYou can save your Key Store properties in a file, to avoid supplying them again with each binary build.\n\nTodo so, create a json file (or copy this [sign_in_example.json](os_android_apk_builder/examples/properties_example.json) file): \n```json\n{\n  \"storeFile\": \"path/to/keystore_file.keystore\",\n  \"storePassword\": \"myCoolKeyStorePass\",\n  \"keyAlias\": \"myAliasName\",\n  \"keyPassword\": \"myAliasPassword\",\n  \"v1SigningEnabled\": true,\n  \"v2SigningEnabled\": true\n}\n```\n\nThen build the KeyStoreProperties base on the link to the file: \n\n```python\nkey_store_props = KeyStoreProperties.build_from_file(file_path= 'path/to/json/file.xml')\n```    \n\n# Alternative Gradle Path\nBy default, the program will use your project's gradle wrapper.\n\nIf, for some reason, the gradle wrapper isn't good enough, you can set a custom path to an alternative gradle. Just supply its path when creating the apk/app bundle with the argument: \n```python\ngradle_path='path/to/gradle'\n```\nIf you want to use your system's gradle, set:\n```python\ngradle_path='gradle'\n```\n(you can write just 'gradle' if it's already recognized by your environment variables).\n\n## Links\nIf you all about automation, why use Android Studio?:  \n* [os-play-console-automation](https://github.com/osfunapps/os-android-play-console-automation-py) Will publish your apk/app bundle to the store in a jiffy\n* More Android and iOS automation tools can be found in [my profile](https://github.com/osfunapps)\n\n## Licence\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosfunapps%2Fos_android_apk_builder-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosfunapps%2Fos_android_apk_builder-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosfunapps%2Fos_android_apk_builder-py/lists"}