Skip to content

Commit

Permalink
Refactor: Cleanup & reorder (#10)
Browse files Browse the repository at this point in the history
* Refactor: Synchronize naming across codebase

* Refactor: Cleanup a bit

* Refactor: Adjust logos

* Refactor: Fix tests

* Refactor: Fix tests

* Graphics: Add repository card

* Refactor: Remove backend test as they are broken on Unix
  • Loading branch information
seclerp authored Sep 25, 2023
1 parent 7002872 commit aca4c5e
Show file tree
Hide file tree
Showing 44 changed files with 343 additions and 361 deletions.
1 change: 1 addition & 0 deletions .idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions .run/Run Verifications.run.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess>
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess>
<DebugAllEnabled>false</DebugAllEnabled>
<method v="2">
<option name="Gradle.BeforeRunTask" enabled="true" tasks="clean" externalProjectPath="$PROJECT_DIR$" vmOptions="" scriptParameters="" />
</method>
<RunAsTest>false</RunAsTest>
<method v="2" />
</configuration>
</component>
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img alt="Logo" src="./img/logo.svg" width="100">
<h2>MSBuild DevKit for Rider</h2>

<a href="https://plugins.jetbrains.com/plugin/18147-entity-framework-core-ui"><img src="https://img.shields.io/jetbrains/plugin/v/18147.svg?label=Rider&logoColor=black&colorB=0A7BBB&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cmVjdCB3aWR0aD0iMjMuOTUxIiBoZWlnaHQ9IjIzLjk1MiIgc3R5bGU9InN0cm9rZS13aWR0aDogMHB4OyBzdHJva2U6IHJnYigyNTUsIDI1NSwgMjU1KTsgcGFpbnQtb3JkZXI6IGZpbGw7IGZpbGw6IHJnYigyNTUsIDI1NSwgMjU1KTsiLz4KICA8cGF0aCBkPSJNMCAwdjI0aDI0VjB6bTcuMDMxIDMuMTEzQTQuMDYzIDQuMDYzIDAgMCAxIDkuNzIgNC4xNGEzLjIzIDMuMjMgMCAwIDEgLjg0IDIuMjhBMy4xNiAzLjE2IDAgMCAxIDguNCA5LjU0bDIuNDYgMy42SDguMjhMNi4xMiA5LjlINC4zOHYzLjI0SDIuMTZWMy4xMmMxLjYxLS4wMDQgMy4yODEuMDA5IDQuODcxLS4wMDd6bTUuNTA5LjAwN2gzLjk2YzMuMTggMCA1LjM0IDIuMTYgNS4zNCA1LjA0IDAgMi44Mi0yLjE2IDUuMDQtNS4zNCA1LjA0aC0zLjk2em00LjA2OSAxLjk3NmMtLjYwNy4wMS0xLjIzNS4wMDQtMS44NDkuMDA0djYuMDZoMS43NGEyLjg4MiAyLjg4MiAwIDAgMCAzLjA2LTMgMi44OTcgMi44OTcgMCAwIDAtMi45NTEtMy4wNjR6TTQuMzE5IDUuMXYyLjg4SDYuNmMxLjA4IDAgMS42OC0uNiAxLjY4LTEuNDQgMC0uOTYtLjY2LTEuNDQtMS43NC0xLjQ0ek0yLjE2IDE5LjVoOVYyMWgtOVoiLz4KPC9zdmc+" alt="Version"></a>
<a href="https://plugins.jetbrains.com/plugin/PLACEHOLDER-msbuild-devkit"><img src="https://img.shields.io/jetbrains/plugin/v/18147.svg?label=Rider&logoColor=black&colorB=0A7BBB&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cmVjdCB3aWR0aD0iMjMuOTUxIiBoZWlnaHQ9IjIzLjk1MiIgc3R5bGU9InN0cm9rZS13aWR0aDogMHB4OyBzdHJva2U6IHJnYigyNTUsIDI1NSwgMjU1KTsgcGFpbnQtb3JkZXI6IGZpbGw7IGZpbGw6IHJnYigyNTUsIDI1NSwgMjU1KTsiLz4KICA8cGF0aCBkPSJNMCAwdjI0aDI0VjB6bTcuMDMxIDMuMTEzQTQuMDYzIDQuMDYzIDAgMCAxIDkuNzIgNC4xNGEzLjIzIDMuMjMgMCAwIDEgLjg0IDIuMjhBMy4xNiAzLjE2IDAgMCAxIDguNCA5LjU0bDIuNDYgMy42SDguMjhMNi4xMiA5LjlINC4zOHYzLjI0SDIuMTZWMy4xMmMxLjYxLS4wMDQgMy4yODEuMDA5IDQuODcxLS4wMDd6bTUuNTA5LjAwN2gzLjk2YzMuMTggMCA1LjM0IDIuMTYgNS4zNCA1LjA0IDAgMi44Mi0yLjE2IDUuMDQtNS4zNCA1LjA0aC0zLjk2em00LjA2OSAxLjk3NmMtLjYwNy4wMS0xLjIzNS4wMDQtMS44NDkuMDA0djYuMDZoMS43NGEyLjg4MiAyLjg4MiAwIDAgMCAzLjA2LTMgMi44OTcgMi44OTcgMCAwIDAtMi45NTEtMy4wNjR6TTQuMzE5IDUuMXYyLjg4SDYuNmMxLjA4IDAgMS42OC0uNiAxLjY4LTEuNDQgMC0uOTYtLjY2LTEuNDQtMS43NC0xLjQ0ek0yLjE2IDE5LjVoOVYyMWgtOVoiLz4KPC9zdmc+" alt="Version"></a>
<a href="https://github.com/seclerp/rider-efcore/actions/workflows/build.yml"><img src="https://img.shields.io/github/actions/workflow/status/JetBrains/rider-efcore/build.yml?logo=github" alt="Build"></a>
</div>

Expand Down
28 changes: 13 additions & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,15 @@ fun File.writeTextIfChanged(content: String) {
writeBytes(bytes)
}
}
val pluginId: String by project
val pluginVersion: String by project

group = properties("pluginGroup").get()
version = properties("pluginVersion").get()

val pluginName: String by project
val pluginGroup: String by project
val pluginFullName = "$pluginGroup.$pluginName"
group = pluginId
version = pluginVersion

// Folder that contains sources for Rider-specific plugin's .NET backend
val dotnetSrcDir = File(projectDir, "src/dotnet")
val dotnetPluginNamespace: String by project
val pluginNamespace: String by project
val dotnetBuildConfiguration = ext.properties["dotnetBuildConfiguration"] ?: "Debug"

// Rd protocol library configuration
Expand Down Expand Up @@ -80,7 +78,7 @@ kotlin {

// Configure Gradle IntelliJ Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
intellij {
pluginName = properties("pluginName")
pluginName = rootProject.name
version = properties("platformVersion")
type = properties("platformType")

Expand Down Expand Up @@ -114,8 +112,8 @@ koverReport {
// Configure Rd model generation
configure<RdGenExtension> {
val modelDir = file("$projectDir/protocol/src/main/kotlin/model")
val csOutput = file("$projectDir/src/dotnet/$dotnetPluginNamespace/Rd")
val ktOutput = file("$projectDir/src/main/kotlin/${pluginGroup.replace('.','/').lowercase()}/rd")
val csOutput = file("$projectDir/src/dotnet/$pluginNamespace/Rd")
val ktOutput = file("$projectDir/src/main/kotlin/${pluginId.replace('.','/').lowercase()}/rd")

verbose = true
classpath({
Expand All @@ -129,15 +127,15 @@ configure<RdGenExtension> {
language = "kotlin"
transform = "asis"
root = "com.jetbrains.rider.model.nova.ide.IdeRoot"
namespace = "$pluginGroup.$pluginName.rd"
namespace = "$pluginId.rd"
directory = "$ktOutput"
}

generator {
language = "csharp"
transform = "reversed"
root = "com.jetbrains.rider.model.nova.ide.IdeRoot"
namespace = "$dotnetPluginNamespace.Rd"
namespace = "$pluginNamespace.Rd"
directory = "$csOutput"
}
}
Expand Down Expand Up @@ -240,10 +238,10 @@ tasks {
prepareSandbox {
dependsOn(dotnetCompile)

val outputFolder = file("$dotnetSrcDir/$dotnetPluginNamespace/bin/$dotnetPluginNamespace/$dotnetBuildConfiguration")
val outputFolder = file("$dotnetSrcDir/$pluginNamespace/bin/$pluginNamespace/$dotnetBuildConfiguration")
val backendFiles = listOf(
"$outputFolder/$dotnetPluginNamespace.dll",
"$outputFolder/$dotnetPluginNamespace.pdb"
"$outputFolder/$pluginNamespace.dll",
"$outputFolder/$pluginNamespace.pdb"
)

for (f in backendFiles) {
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html

pluginGroup = com.github.seclerp.msbuildrunner
pluginName = msbuild-runner
dotnetPluginNamespace = Msbuild.Runner
pluginId = me.seclerp.msbuild.devkit
pluginName = MSBuild DevKit
pluginNamespace = MSBuild.DevKit
dotnetBuildConfiguration = Debug
pluginRepositoryUrl = https://github.com/seclerp/rider-plugin-template
pluginRepositoryUrl = https://github.com/seclerp/rider-msbuild-devkit
# SemVer format -> https://semver.org
pluginVersion = 1.0.0

Expand Down
Binary file added img/card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
135 changes: 135 additions & 0 deletions img/card.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
116 changes: 31 additions & 85 deletions img/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions protocol/src/main/kotlin/model/rider/MsBuildRunnerModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ object MsBuildRunnerModel : Ext(SolutionModel.Solution) {
}

init {
setting(CSharp50Generator.Namespace, "Msbuild.Runner.Rd")
setting(Kotlin11Generator.Namespace, "com.github.seclerp.msbuildrunner.rd")
setting(CSharp50Generator.Namespace, "MSBuild.DevKit.Rd")
setting(Kotlin11Generator.Namespace, "me.seclerp.msbuild.devkit.rd")

call("getTargets", MsBuildProjectInfo, immutableList(MsBuildTargetInfo))
}
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ pluginManagement {
}
}

rootProject.name = "msbuild-runner"
rootProject.name = "msbuild-devkit"

include("protocol")
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ ProjectSection(SolutionItems) = preProject
nuget.config = nuget.config
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Msbuild.Runner", "Msbuild.Runner\Msbuild.Runner.csproj", "{EC3C8004-EA0A-46E1-AE45-4A7A1FBDF35A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Msbuild.Runner.Tests", "Msbuild.Runner.Tests\Msbuild.Runner.Tests.csproj", "{783A4250-0B5B-4B56-8EE0-A2ECB4639CA7}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MSBuild.DevKit", "MSBuild.DevKit\MSBuild.DevKit.csproj", "{EC3C8004-EA0A-46E1-AE45-4A7A1FBDF35A}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -32,9 +30,5 @@ Global
{EC3C8004-EA0A-46E1-AE45-4A7A1FBDF35A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC3C8004-EA0A-46E1-AE45-4A7A1FBDF35A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EC3C8004-EA0A-46E1-AE45-4A7A1FBDF35A}.Release|Any CPU.Build.0 = Release|Any CPU
{783A4250-0B5B-4B56-8EE0-A2ECB4639CA7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{783A4250-0B5B-4B56-8EE0-A2ECB4639CA7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{783A4250-0B5B-4B56-8EE0-A2ECB4639CA7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{783A4250-0B5B-4B56-8EE0-A2ECB4639CA7}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
using JetBrains.Application.BuildScript.Application.Zones;
using JetBrains.Platform.RdFramework.Actions.Backend;
using JetBrains.ProjectModel.ProjectsHost.SolutionHost;
using JetBrains.ReSharper.Feature.Services.Daemon;
using JetBrains.ReSharper.Psi;
using JetBrains.ReSharper.Psi.CSharp;

namespace Msbuild.Runner;
namespace MSBuild.DevKit;

[ZoneDefinition]
public interface IMSBuildRunnerZone : IPsiLanguageZone,
public interface IMsBuildDevKitZone : IPsiLanguageZone,
IRequire<ILanguageCSharpZone>,
IRequire<DaemonZone>,
IRequire<IRdActionsBackendZone>
IRequire<IRdActionsBackendZone>,
IRequire<IHostSolutionZone>
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@
using JetBrains.ReSharper.Feature.Services.LiveTemplates.Templates;
using JetBrains.ReSharper.LiveTemplates.Resources;

namespace Msbuild.Runner;
namespace MSBuild.DevKit;

[ShellComponent]
public class MSBuildDefeaultSettingsStream : IHaveDefaultSettingsStream
public class MsBuildDefaultSettingsStream : IHaveDefaultSettingsStream
{
public MSBuildDefeaultSettingsStream()
public MsBuildDefaultSettingsStream()
{
TemplateImage.Register("MSBuildTaskImage", LiveTemplatesCSharpThemedIcons.ScopeCS.Id);
}

public Stream GetDefaultSettingsStream(Lifetime lifetime)
{
var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Msbuild.Runner.FileTemplates.MSBuildFileTemplates.xml");
var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("MSBuild.DevKit.FileTemplates.MSBuildFileTemplates.xml");
lifetime.AddDispose(stream);
return stream;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
using JetBrains.Rd.Tasks;
using JetBrains.ReSharper.Feature.Services.Protocol;
using JetBrains.ReSharper.Resources.Shell;
using Msbuild.Runner.Rd;
using MSBuild.DevKit.Rd;

namespace Msbuild.Runner;
namespace MSBuild.DevKit;

[SolutionComponent]
public class MsBuildTargetsProviderHost
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
using JetBrains.Platform.RdFramework;
using JetBrains.ProjectModel;

namespace Msbuild.Runner;
namespace MSBuild.DevKit;

[ZoneMarker]
public class ZoneMarker
: IRequire<IMSBuildRunnerZone>, IRequire<IProjectModelZone>, IRequire<IRdFrameworkZone>
public class ZoneMarker : IRequire<IMsBuildDevKitZone>
{
}
Loading

0 comments on commit aca4c5e

Please sign in to comment.