0

Currently, we have a buildscript{} block in all our build.Gradle files which use our custom plugin.

Is there a provision to configure buildscript block globally instead of each build.Gradle file?

For eg: I have a plugin say "MyPlugin" . This plugin has a dependency to certain jars. If this plugin is used by 100 projects, all of these 100 projects need to specify the dependency using buildscript{}

Instead, Can I do this programmatically in settings.gradle or in init.gradle ? Like if the project is using "MyPlugin" , then add the relevant dependencies as done using build script.

Rebse
  • 10,307
  • 2
  • 38
  • 66
lives
  • 1,243
  • 5
  • 25
  • 61

1 Answers1

0

Below is the solution . We can define the build script in different place and reuse across projects

https://discuss.gradle.org/t/usage-of-apply-from-in-buildscript-scope/1844

lives
  • 1,243
  • 5
  • 25
  • 61