Nuke.Cola
Loading...
Searching...
No Matches
IHavePlugin.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Threading.Tasks;
5using Nuke.Common.IO;
6
8
9/// <summary>
10/// Implementation of this plugin must provide one build plugin which can be
11/// compiled to a .NET DLL which the intermediate script can reference.
12/// Plugins must expose .NET interfaces with default implementations as build
13/// components. Non default-implemented interface members will cause compile
14/// errors. It may seem strange but it is one intended feature of NUKE.
15/// </summary>
16public interface IHavePlugin
17{
18 /// <summary>
19 /// This should be called before attempting to gather resulting types from
20 /// the plugin.
21 /// </summary>
22 void Compile(BuildContext context);
23
24 /// <summary>
25 /// List of build interfaces which are found in the plugin.
26 /// </summary>
27 IEnumerable<Importable> BuildInterfaces { get; }
28
29 /// <summary>
30 /// Original source path of the plugin (can be either a script or a project file)
31 /// </summary>
32 AbsolutePath SourcePath { get; }
33}
Implementation of this plugin must provide one build plugin which can be compiled to a ....
void Compile(BuildContext context)
This should be called before attempting to gather resulting types from the plugin.
AbsolutePath SourcePath
Original source path of the plugin (can be either a script or a project file)
IEnumerable< Importable > BuildInterfaces
List of build interfaces which are found in the plugin.
record class BuildContext(AbsolutePath Temporary, AbsolutePath Root)
Local paths for plugin discovery and compilation.