Skip to content

Commit

Permalink
Package the SLOOP (#5298)
Browse files Browse the repository at this point in the history
Fixes #5293
  • Loading branch information
ugras-ergun-sonarsource committed Apr 3, 2024
1 parent 8b16926 commit d59a958
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,5 @@ $RECYCLE.BIN/
/build/DownloadDependencies/tmp
/**/launchSettings.json
/src/Rules/Embedded
/src/Integration.Vsix/DownloadedJars
/src/Integration.Vsix/DownloadedJars
/src/Integration.Vsix/Sloop
15 changes: 14 additions & 1 deletion build/CopyDependencies/CopyDependencies.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@
<Target Name="Build">
<CallTarget Targets="ClearDirs" />
<CallTarget Targets="CopyJars" />
<CallTarget Targets="CopySloop" />
</Target>

<PropertyGroup>
<VsixDir>..\..\src\Integration.Vsix</VsixDir>
<JarDownloadDir>$(LOCALAPPDATA)\SLVS_Build_DownloadedJars</JarDownloadDir>
<EmbeddedJarDir>..\..\src\Integration.Vsix\DownloadedJars</EmbeddedJarDir>
<EmbeddedJarDir>$(VsixDir)\DownloadedJars</EmbeddedJarDir>
<SloopDowloadDir>$(LOCALAPPDATA)\SLVS_Build_SLOOP\sonarlint-backend-cli-$(EmbeddedSloopVersion)-windows_x64</SloopDowloadDir>
<EmbeddedSloopDir>$(VsixDir)\Sloop</EmbeddedSloopDir>
</PropertyGroup>


<Target Name="ClearDirs">
<RemoveDir Directories="$(EmbeddedJarDir)" />
<RemoveDir Directories="$(EmbeddedSloopDir)" />
</Target>

<Target Name="CopyJars">
Expand All @@ -26,4 +31,12 @@
</ItemGroup>
<Copy SourceFiles ="@(SourceJars)" DestinationFolder="$(EmbeddedJarDir)" />
</Target>

<Target Name="CopySloop">
<ItemGroup>
<SloopSource Include="$(SloopDowloadDir)\**\*.*"/>
</ItemGroup>
<Message Text="$(SloopDowloadDir)\**\*" Importance="high" />
<Copy SourceFiles="@(SloopSource)" DestinationFolder="$(EmbeddedSloopDir)\%(RecursiveDir)" />
</Target>
</Project>
7 changes: 5 additions & 2 deletions src/Integration.Vsix/Integration.Vsix.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,11 @@
</ItemGroup>

<ItemGroup Label="Sloop Dependencies">
<Content Include="$(MSBuildThisFileDirectory)$(JarsFolderName)\*.jar">
<Content Include="$(JarsFolderName)\*.jar">
<IncludeInVSIX>True</IncludeInVSIX>
</Content>
<Content Include="$(SloopFolderName)\**\*">
<IncludeInVSIX>True</IncludeInVSIX>
<VSIXSubPath>$(JarsFolderName)</VSIXSubPath>
</Content>
</ItemGroup>

Expand Down Expand Up @@ -395,6 +397,7 @@

<CFamilyFolderName>lib</CFamilyFolderName>
<JarsFolderName>DownloadedJars</JarsFolderName>
<SloopFolderName>Sloop</SloopFolderName>

<!-- Folder the embedded files should be copied to. This folder should be excluded from source code control. -->
<CFamilyTargetDirectory>$(MSBuildThisFileDirectory)$(CFamilyFolderName)</CFamilyTargetDirectory>
Expand Down

0 comments on commit d59a958

Please sign in to comment.