Skip to content

Commit

Permalink
Use CompileContracts task in Build target for Solidity projects.
Browse files Browse the repository at this point in the history
  • Loading branch information
allisterb committed Nov 20, 2024
1 parent bc41b90 commit dc561ae
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class CompileContracts : Task

public override bool Execute()
{
Log.LogMessage("{0}", Contracts.Select(c => c.ItemSpec));
Log.LogMessage(MessageImportance.High, "{0}", Contracts.Select(c => c.ItemSpec).ToArray());
return true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<ConfigurationFile>$solidityconfigfile$</ConfigurationFile>
</PropertyGroup>
<ItemGroup>
<None Include="SmartContract1.sol" />
<Contract Include="SmartContract1.sol" />
<None Include="$solidityconfigfile$" />
<None Include="package.json" />
</ItemGroup>
Expand Down
5 changes: 3 additions & 2 deletions src/Stratis.VS.StratisEVM/BuildSystem/Solidity.targets
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@
<Exec Command='$(RunCommand) "$(MSBuildProjectDirectory)\$(StartItem)" $(RunCommandArguments)' WorkingDirectory="$(RunWorkingDirectory)" />
</Target>

<Target Name="Build" >
<Message Text="Hello build" />
<UsingTask TaskName="CompileContracts" AssemblyFile="$(LocalAppData)\CustomProjectSystems\Solidity\Tools\Stratis.VS.SolidityProjectBuildTasks.dll"/>
<Target Name="Build">
<CompileContracts Contracts="@(Contract)" />
</Target>

<Target Name="Rebuild">
Expand Down

0 comments on commit dc561ae

Please sign in to comment.