-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Package the jar analyzers #5290
Changes from all commits
84f5491
33cd1a5
0ff7199
23b8efb
b9bf67c
6ed48af
a25f166
72c34b4
cbed6ee
c164af4
2c57a4b
16ecbb7
93d2ac3
df77e95
b49be27
a9d570f
4a3095f
22869ef
54ba0cc
a01b9e1
7dd3a1c
5c3e755
e604db8
5cba472
68bef62
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Project> | ||
<!-- ************************************************************** --> | ||
<!-- Common MSBuild targets --> | ||
<!-- ************************************************************** --> | ||
<!-- We aren't importing any of the standard MS targets/SDKs, so we need to define these targets | ||
so we can clean and rebuild from the command line as normal. --> | ||
<Target Name="Clean" /> | ||
<Target Name="Rebuild" DependsOnTargets="Clean;Build" /> | ||
|
||
<!-- No-op. Called by MSBuild when building other projects that reference this one. | ||
The empty targets don't seem to be needed when building inside VS, but command | ||
line builds fail if they are not defined (even though there are no explicit | ||
<ProjectReferences> to this project. --> | ||
<Target Name="BuiltProjectOutputGroup" /> | ||
<Target Name="BuiltProjectOutputGroupDependencies" /> | ||
<Target Name="GetCopyToOutputDirectoryItems" /> | ||
<Target Name="SatelliteDllsProjectOutputGroup" /> | ||
<Target Name="DebugSymbolsProjectOutputGroup" /> | ||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<Project DefaultTargets="Build" ToolsVersion="Current"> | ||
<PropertyGroup> | ||
<ProjectGuid>{2BB16C6F-BF06-4225-99A0-F1CFE70CBE44}</ProjectGuid> | ||
</PropertyGroup> | ||
<Import Project="$(MSBuildThisFileDirectory)CommonMSBuild.targets" /> | ||
<Import Project="$(MSBuildThisFileDirectory)CopyDependencies.targets" /> | ||
<ItemGroup> | ||
<None Include="CommonMSBuild.targets" /> | ||
<None Include="CopyDependencies.targets" /> | ||
</ItemGroup> | ||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<Project> | ||
<Import Project="..\..\src\EmbeddedSonarAnalyzer.props" /> | ||
|
||
<Target Name="Build"> | ||
<CallTarget Targets="ClearDirs" /> | ||
<CallTarget Targets="CopyJars" /> | ||
</Target> | ||
|
||
<PropertyGroup> | ||
<JarDownloadDir>$(LOCALAPPDATA)\SLVS_Build_DownloadedJars</JarDownloadDir> | ||
<EmbeddedJarDir>..\..\src\Integration.Vsix\DownloadedJars</EmbeddedJarDir> | ||
</PropertyGroup> | ||
|
||
|
||
<Target Name="ClearDirs"> | ||
<RemoveDir Directories="$(EmbeddedJarDir)" /> | ||
</Target> | ||
|
||
<Target Name="CopyJars"> | ||
<ItemGroup> | ||
<SourceJars Include="$(JarDownloadDir)\sonar-cfamily-plugin-$(EmbeddedSonarCFamilyAnalyzerVersion).jar" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this fail if it can't find any of those files? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, and I believe it's desired behaviour. |
||
<SourceJars Include="$(JarDownloadDir)\sonar-csharp-plugin-$(EmbeddedSonarAnalyzerVersion).jar" /> | ||
<SourceJars Include="$(JarDownloadDir)\sonar-vbnet-plugin-$(EmbeddedSonarAnalyzerVersion).jar" /> | ||
<SourceJars Include="$(JarDownloadDir)\sonar-javascript-plugin-$(EmbeddedSonarJSAnalyzerVersion).jar" /> | ||
<SourceJars Include="$(JarDownloadDir)\sonar-text-plugin-$(EmbeddedSonarSecretsJarVersion).jar" /> | ||
</ItemGroup> | ||
<Copy SourceFiles ="@(SourceJars)" DestinationFolder="$(EmbeddedJarDir)" /> | ||
</Target> | ||
</Project> |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -280,7 +280,13 @@ | |||
<IncludeInVSIX>true</IncludeInVSIX> | ||||
<Link>THIRD-PARTY-NOTICES</Link> | ||||
</Content> | ||||
</ItemGroup> | ||||
|
||||
<ItemGroup Label="Sloop Dependencies"> | ||||
<Content Include="$(MSBuildThisFileDirectory)$(JarsFolderName)\*.jar"> | ||||
<IncludeInVSIX>True</IncludeInVSIX> | ||||
<VSIXSubPath>$(JarsFolderName)</VSIXSubPath> | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this somehow related?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see how these can be related. The one you referred is about loading assemblies, we are not interested in that here. |
||||
</Content> | ||||
</ItemGroup> | ||||
|
||||
<ItemGroup> | ||||
|
@@ -388,6 +394,7 @@ | |||
<PluginUrl>https://binaries.sonarsource.com/CommercialDistribution/sonar-cfamily-plugin/sonar-cfamily-plugin-$(EmbeddedSonarCFamilyAnalyzerVersion).jar</PluginUrl> | ||||
|
||||
<CFamilyFolderName>lib</CFamilyFolderName> | ||||
<JarsFolderName>DownloadedJars</JarsFolderName> | ||||
|
||||
<!-- Folder the embedded files should be copied to. This folder should be excluded from source code control. --> | ||||
<CFamilyTargetDirectory>$(MSBuildThisFileDirectory)$(CFamilyFolderName)</CFamilyTargetDirectory> | ||||
|
@@ -565,5 +572,5 @@ | |||
|
||||
<WriteLinesToFile File="$(BaselineWithStrongNames)" Overwrite="true" WriteOnlyWhenDifferent="true" Encoding="UTF-8" Lines="$(NewSignedBaseLineText)" /> | ||||
</Target> | ||||
|
||||
</Project> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1533,6 +1533,9 @@ | |
"Microsoft.VisualStudio.Interop": "17.0.31902.203" | ||
} | ||
}, | ||
"copydependencies": { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is it lowercase? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no idea it's auto generated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some other stuff is also lowercase (e.g. "sonarqube.client"). Since it doesn't affect anything other than cosmetics on an auto-generated file I don't consider it as a problem. |
||
"type": "Project" | ||
}, | ||
"SonarLint.VisualStudio.CFamily": { | ||
"type": "Project", | ||
"dependencies": { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we somehow centralize the list of dependencies between this and DownloadDependencies task? Currently, if we ever add another analyzer, we would need to modify these 2 targets + EmbeddedSonarAnalyzer.props file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll add another ticket for this and we can tackle it if we have time in this sprint or we can handle it in a hardening sprint.