Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions packages/intellij/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,38 @@ repositories {
// Configure Gradle IntelliJ Plugin
// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
intellij {
version.set("2022.1.4")
version.set("2024.1")
type.set("IC") // Target IDE Platform

plugins.set(listOf(/* Plugin Dependencies */))
plugins.set(
listOf(
"org.jetbrains.plugins.textmate"
)
)
}

tasks {
val copyVscodeTextMateBundle by registering(Copy::class) {
from("../vscode/")
include("package.json")
include("language-configuration.json")
include("syntaxes/bruno.tmLanguage.json")
into(layout.buildDirectory.dir("resources/main/textmate/bruno-bundle"))
}

processResources {
dependsOn(copyVscodeTextMateBundle)
}

// Set the JVM compatibility versions
withType<JavaCompile> {
sourceCompatibility = "11"
targetCompatibility = "11"
Comment on lines 41 to 42
Copy link

@martinsefcik martinsefcik Jul 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably it would be fine to upgrade it to v17 as there is the following warning:
The Java configuration specifies sourceCompatibility=11 but IntelliJ Platform 2024.1 requires sourceCompatibility=17.
during building plugin.

}

patchPluginXml {
sinceBuild.set("221")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not compatible with this version anymore ?

untilBuild.set("231.*")
sinceBuild.set("241")
untilBuild.set("241.*")
}

signPlugin {
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package com.usebruno.plugin.textmate;

import com.intellij.openapi.application.PathManager;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.plugins.textmate.api.TextMateBundleProvider;

import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.Objects;

public class BrunoTextMateBundleProvider implements TextMateBundleProvider {
@NotNull
@Override
public List<PluginBundle> getBundles() {
try {
Path brunoBundleTmpDir = Files.createTempDirectory(Path.of(PathManager.getTempPath()), "textmate-bruno");
for (String fileToCopy : List.of("package.json", "language-configuration.json", "syntaxes/bruno.tmLanguage.json")) {
URL resource = BrunoTextMateBundleProvider.class.getClassLoader().getResource("textmate/bruno-bundle/" + fileToCopy);
try (InputStream resourceStream = Objects.requireNonNull(resource).openStream()) {
Path target = brunoBundleTmpDir.resolve(fileToCopy);
Files.createDirectories(target.getParent());
Files.copy(resourceStream, target);
}
}
PluginBundle brunoBundle = new PluginBundle("Bruno", Objects.requireNonNull(brunoBundleTmpDir));
return List.of(brunoBundle);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
3 changes: 2 additions & 1 deletion packages/intellij/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@
<!-- Product and plugin compatibility requirements.
Read more: https://plugins.jetbrains.com/docs/intellij/plugin-compatibility.html -->
<depends>com.intellij.modules.platform</depends>
<depends>org.jetbrains.plugins.textmate</depends>

<!-- Extension points defined by the plugin.
Read more: https://plugins.jetbrains.com/docs/intellij/plugin-extension-points.html -->
<extensions defaultExtensionNs="com.intellij">
<codeStyleSettingsProvider implementation="resources/bruno.tmLanguage.json"/>
<textmate.bundleProvider implementation="com.usebruno.plugin.textmate.BrunoTextMateBundleProvider"/>
</extensions>
</idea-plugin>
45 changes: 0 additions & 45 deletions packages/intellij/src/main/resources/bruno.tmLanguage.json

This file was deleted.

103 changes: 0 additions & 103 deletions packages/intellij/src/main/resources/request.bru

This file was deleted.