-
-
Notifications
You must be signed in to change notification settings - Fork 197
Plugin variables #882
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We have a plugin that needs the app's id. Currently its manifest contains something like: <Manifest>
<Service id="SERVICE_NAME" />
</Manifest> Registering an intent service exposed through JavaScript API. If the service name is provided as plug-in variable, the app package.json will look like: {
"nativescript": {
"id": "com.nativescript.MyPlayground",
"UploadPlugin": {
"SERVICE_NAME": "com.nativescript.MyPlayground.UploadPluginService"
}
}
} Currently the plug-in is so designed that the service name is always expected to be the app id suffixed with the plugin name. It would be nice if I could simply use an expression like |
@PanayotCankov I've logged your case as separate issue #1026 for next release. |
This feature has so much potential 😁 I hope I'm not too late to the party! What if:
|
myPlugin's package.json:
Plugin add
{N} CLI will store all plugin variables and their values into project's package.json file:
Valid plugin commands:
tns plugin add myPlugin --var.APP_NAME myAppName
Invalid plugin commands:
tns plugin add myPlugin
tns plugin add myPlugin --var.APP_ID myNewAppId
Prepare
On prepare {N} CLI will replace all references of plugin variable with the specified value by plugin add command.
It seems that it will be enough to respect only
AndroidManifest.xml
andInfo.plist
file. But maybe in some cases {N} CLI should respect .java files as well.The text was updated successfully, but these errors were encountered: