Skip to content
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

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

Closed
madmas opened this issue Aug 30, 2019 · 3 comments · Fixed by #4996
Closed

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

madmas opened this issue Aug 30, 2019 · 3 comments · Fixed by #4996
Assignees
Labels
bug build Describes issues related to build operations os: android
Milestone

Comments

@madmas
Copy link
Contributor

madmas commented Aug 30, 2019

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 .

madmas added a commit to madmas/nativescript-cli that referenced this issue Aug 30, 2019
Solves NativeScript#4995 

Adding an settings.gradle file marks the gradle build as a independent build and avoids conflicts with other gradle build
@KristianDD
Copy link
Contributor

Hi @madmas ,
Thanks for logging this issue and for the effort of creating a PR.

Could you please attach a sample project/archive that represents the setup you are using to reproduce the issue, so that we can verify the fix.

@madmas
Copy link
Contributor Author

madmas commented Oct 8, 2019

Hi @KristianDD ,

finally I could set it up: https://github.com/madmas/NativeScriptPluginSampleGradleBuild

please have a look at it and let me know if I can help

@rosen-vladimirov rosen-vladimirov added this to the 6.2.0 milestone Oct 9, 2019
@rosen-vladimirov rosen-vladimirov added bug build Describes issues related to build operations os: android labels Oct 9, 2019
@rosen-vladimirov
Copy link
Contributor

rosen-vladimirov commented Oct 9, 2019

Hey @madmas ,
Thank you for the sample project. We've merged your PR and we'll use the project to test it on our side.
Meanwhile, you can take a look at this blog post for information how you can use your contribution to participate in the Hacktoberfest initiative.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug build Describes issues related to build operations os: android
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants