1using System.Reflection;
11 private List<Importable> _buildInterfaces = [];
14 public AbsolutePath
SourcePath { init;
get; } = (AbsolutePath)
"/";
18 var compiledRoot = context.Temporary /
"CSharpScriptOutput";
20 var assembly = Assembly.LoadFrom(
24 _buildInterfaces = [.. assembly.GetBuildInterfaces(
SourcePath,
true)];
Encapsulates a C# script file (*.csx) which contains build interfaces.
IEnumerable< Importable > BuildInterfaces
List of build interfaces which are found in the plugin.
AbsolutePath SourcePath
Original source path of the plugin (can be either a script or a project file)
void Compile(BuildContext context)
This should be called before attempting to gather resulting types from the plugin.
static AbsolutePath CompileScript(AbsolutePath scriptPath, AbsolutePath outputDirIn)
Compiles a C# script into a DLL with dotnet-script, which needs to be installed at least into the con...
Implementation of this plugin must provide one build plugin which can be compiled to a ....
record class BuildContext(AbsolutePath Temporary, AbsolutePath Root)
Local paths for plugin discovery and compilation.