{"id":15018478,"url":"https://github.com/nativescript/nativescript-dev-bazel","last_synced_at":"2026-03-04T13:30:49.557Z","repository":{"id":141978416,"uuid":"169616830","full_name":"NativeScript/nativescript-dev-bazel","owner":"NativeScript","description":"Plugin that allows you to build NativeScript applications with Bazel","archived":false,"fork":false,"pushed_at":"2019-02-10T15:34:51.000Z","size":20,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T15:51:54.785Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NativeScript.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-02-07T18:00:10.000Z","updated_at":"2022-02-06T15:18:02.000Z","dependencies_parsed_at":"2023-07-20T04:02:06.559Z","dependency_job_id":null,"html_url":"https://github.com/NativeScript/nativescript-dev-bazel","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.11111111111111116","last_synced_commit":"f8399ac2372144ac98cd1628d7011003f1b9317b"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fnativescript-dev-bazel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fnativescript-dev-bazel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fnativescript-dev-bazel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NativeScript%2Fnativescript-dev-bazel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NativeScript","download_url":"https://codeload.github.com/NativeScript/nativescript-dev-bazel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237163243,"owners_count":19265234,"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":[],"created_at":"2024-09-24T19:52:00.909Z","updated_at":"2025-10-19T16:31:03.252Z","avatar_url":"https://github.com/NativeScript.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nativescript-dev-bazel\n\nPlugin that allows you to build [NativeScript](https://www.nativescript.org/) applications with [Bazel](https://bazel.build/).\n\n\u003e NOTE: This is just POC. You should not use this for your production builds.\n\n## Prerequisites\nYou need to install the following tooling:\n1. [NativeScript CLI](https://www.npmjs.com/package/nativescript)\n2. [Bazel](https://docs.bazel.build/versions/master/install.html)\n3. [Android Studio](https://developer.android.com/studio/install) with the following SDK components installed:\n  - Android SDK 28 or later\n  - Android SDK Build-Tools 28 or later\n  - Android SDK Platform-Tools 28 or later\n  - Android SDK Tools 26 or later\n  - NDK 19 or later\n4. [Git](https://git-scm.com/downloads)\n\n## Installation and usage\n\nYou can add the plugin to your existing NativeScript applications by executing:\n\n```\nnpm i --save-dev https://github.com/NativeScript/nativescript-dev-bazel/tarball/master\n```\n\nAfter that you have to prepare the project with:\n```\ntns prepare android\n```\n\nAnd now you can build it with:\n```\nbazel build //platforms/android:android\n```\n\n## Limitations\n* Currently you can build NativeScript applications for Android only.\n* In case you are using some plugins that require maven libraries, you may have to add some additional `gmaven` artifacts in the `\u003cproject dir\u003e/platforms/android/BUILD.bazel` file.\n* You still need to use NativeScript CLI to prepare the project, i.e. you need to execute `tns prepare android` before rebuilding the application.\n\n## FAQ\n* `How to install built application on Android device?` \u003c/br\u003e\nYou can use `bazel` command to directly install the application on emulator (NOTE: the command will also build the app if required):\n```\nbazel mobile-install //platforms/android:android\n```\nAnother way is to use the `adb` located at `$ANDROID_HOME/platform-tools/adb` and install the built application with it. The command should be:\n```\n$ANDROID_HOME/platform-tools/adb install -r bazel-bin/platforms/android/android.apk\n```\n\n* `I'm unable to install the application on Android emulator.` \u003c/br\u003e\nProbably your emulator is using x86 architecture. the default build operation strips this architecture. In order to use emulator, you have to pass `--fat_apk_cpu=x86` arg to `build`/`mobile-install` bazel commands:\n```\nbazel mobile-install //platforms/android:android --fat_apk_cpu=x86\n```\n\n* `How can I use Angular's AOT?`\u003c/br\u003e\nCurrently the Bazel rules for Angular applications are not included in the Bazel rules for building NativeScript application. So, one way to use AOT is by including the Angular rules in the BUILD.bazel file in `\u003cproject dir\u003e/platforms/android`. This is not an easy task, but in case you succeed, feel free to open PR to this repo, so other people will be able to use the rules.\u003c/br\u003e\nAnother way to use AOT is by preparing your application with the following command: `tns prepare android --bundle --env.aot`. This way NativeScript CLI will use the Angular compiler to prepare the application's code. After that you can build the app with `bazel build //platforms/android:android`\n\n## Contribution\nYou are more than welcome to contribute to this project. Just clone the repo and you are ready to start.\nYou can search for `# TODO` in the code for the places where we've identified something needs to be implemented/fixed or just check the logged issues.\n\n## License\n\nThis software is licensed under the Apache 2.0 license, quoted \u003ca href=\"LICENSE\" target=\"_blank\"\u003ehere\u003c/a\u003e.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript%2Fnativescript-dev-bazel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnativescript%2Fnativescript-dev-bazel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnativescript%2Fnativescript-dev-bazel/lists"}