Skip to content

Building plugin and running demo app fails if plugins has a surrounding gradle build #4995

Closed
@madmas

Description

@madmas

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):

  • CLI: 6.0.3
  • Cross-platform modules: 6.0
  • Android Runtime: 6.0.2
  • iOS Runtime: 6.0.2
  • Plugin(s):

Describe the bug

When building an Plugin which uses gradle to encapsulate the NPM setup, running the demo app fails due to the error message:

FAILURE: Build failed with an exception.

  • What went wrong:
    Project directory '[...]/plugin/demo/platforms/tempPlugin/nativescript_plugin' is not part of the build defined by settings file '[...]/settings.gradle'. If this is an unrelated build, it must have its own settings file.

To Reproduce

  • Create a new plugin using the seed
  • add a surroungind gradle multi-module build that includes /plugin in the settings.gradle file
  • try to run the demo app in /plugin/demo

Expected behavior

  • Plugin can be built and demo runs flawlessly.

Additional context

I'll add a PR to solve this as it implies only adding a settings.gradle file to the gradle-plugin contained in nativescrip-cli .

Metadata

Metadata

Assignees

Labels

bugbuildDescribes issues related to build operationsos: android

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions