This class contains the main entry point for builds supporting plugins.
More...
|
| static int | Execute< T > (MainExecute< T > defaultExecute) |
| | Use this instead of the regular Execute method in your main function if you want to support build plugins.
|
| |
|
|
static ? string | GetCSharpName (Type type) |
| |
|
static bool | AttemptReuseCompiledPlugins () |
| |
| static int | ExecuteExternal (AbsolutePath dllPath) |
| |
This class contains the main entry point for builds supporting plugins.
Definition at line 24 of file Plugins.cs.
◆ Execute< T >()
| static int Nuke.Cola.BuildPlugins.Plugins.Execute< T > |
( |
MainExecute< T > | defaultExecute | ) |
|
|
static |
Use this instead of the regular Execute method in your main function if you want to support build plugins.
- Parameters
-
| defaultExecute | If no build plugins are found, the provided delegate will be executed instead |
- Template Parameters
-
| T | The type of the main build class |
- Returns
- The error code or 0 on success
If plugins are found they're collected into an intermediate C# script which defines a build class inheriting from the provided main build class and implementing all the build interfaces defined by each plugin. This however also means build interfaces cannot have non-default-implemented members, so they behave more like composition in this case.
The main NUKE execute method is then called from within this intermediate class. These plugins can then interact with the main build targets if they can reference to the main build assembly, either directly or more elegantly through a Nuget package.
Use --ReuseCompiledPlugins argument or `REUSE_COMPILED
Definition at line 59 of file Plugins.cs.
◆ ExecuteExternal()
| static int Nuke.Cola.BuildPlugins.Plugins.ExecuteExternal |
( |
AbsolutePath | dllPath | ) |
|
|
staticprivate |
◆ ExecuteWithPlugins
| const string Nuke.Cola.BuildPlugins.Plugins.ExecuteWithPlugins = nameof(ExecuteWithPlugins) |
|
staticprivate |
◆ OutputBuildClass
| const string Nuke.Cola.BuildPlugins.Plugins.OutputBuildClass = nameof(OutputBuildClass) |
|
staticprivate |
◆ ReuseCompiled
| const string Nuke.Cola.BuildPlugins.Plugins.ReuseCompiled = nameof(ReuseCompiled) |
|
staticprivate |
The documentation for this class was generated from the following file:
- /home/runner/work/md.Nuke.Cola/md.Nuke.Cola/md.Nuke.Cola/BuildPlugins/Plugins.cs