Skip to content

Commit

Permalink
Merge pull request #25 from lukeribchester/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
lukeribchester authored Jan 22, 2024
2 parents 6adc3e6 + 2281703 commit 3c60a5c
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 17 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<!-- Plugin description -->
This plugin provides support for [Kadena's](https://kadena.io/) Pact smart contract language to the IntelliJ Platform.

_**Warning:** While effort is made to ensure a stable and reliable user experience, this plugin is under heavy
development and includes features based on the experimental IntelliJ Platform Language Server API._

## What is Kadena?
Kadena is the industry’s only truly scalable Layer-1 Proof-of-Work blockchain. More to the point, it’s the only
blockchain scalable enough to fully replace the global financial system β€” and other legacy centralized systems β€”
Expand Down Expand Up @@ -51,9 +54,11 @@ Smart contracts are the next generation of legal contracts. And Pact is the next
Please refer to the [documentation](https://github.com/kadena-io/pact-lsp/tree/main#supported-features) for a full list
of supported features.

_**Note:** Support for Language Server Protocol features on the IntelliJ Platform is currently experimental._

### Native (IntelliJ Platform)

- Coming soon
- In progress

## Roadmap

Expand Down Expand Up @@ -84,8 +89,10 @@ brew install kadena-io/pact/pact

### 2. Pact Language Server (LSP)

Install the [Pact Language Server](https://github.com/kadena-io/pact-lsp) by downloading a
[prebuilt binary](https://github.com/kadena-io/pact-lsp/releases/latest) from the latest release or by
The latest [Pact Language Server](https://github.com/kadena-io/pact-lsp) releases for macOS, Linux, and Windows are included with this plugin.

Alternatively you can install a different version by downloading a
[prebuilt binary](https://github.com/kadena-io/pact-lsp/releases/latest) or by
[building from source](https://github.com/kadena-io/pact-lsp#building-from-source).

## Installation
Expand Down
41 changes: 27 additions & 14 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.intellij.IntelliJPluginExtension

// Include generated sources
sourceSets["main"].java.srcDirs("src/main/gen")
Expand Down Expand Up @@ -71,21 +72,25 @@ koverReport {
}
}

// Bundle the Pact Language Server (LSP) executables
val bundleExecutables by tasks.registering(Copy::class) {
val source = "${layout.projectDirectory}/bundled"

val sandboxDir = project.extensions.getByType((IntelliJPluginExtension::class.java)).sandboxDir.get()
val pluginName = properties("pluginName").get()
val destination = "${sandboxDir}/plugins/${pluginName}"

from(source)
into(destination)
}

tasks {
prepareSandbox {
// Bundle the Pact and Pact Language Server executables
doLast {
val destinationPath = "${destinationDir.path}/${properties("pluginName").get()}/language-server"
fileTree("${project.projectDir}/language-server").forEach { file ->
if (file.isFile && (file.name.startsWith("pact"))) {
file.setExecutable(true)
}
}
copy {
from("${project.projectDir}/language-server")
into(destinationPath)
}
}
finalizedBy(bundleExecutables)
}

buildSearchableOptions {
mustRunAfter("bundleExecutables")
}

wrapper {
Expand All @@ -102,7 +107,7 @@ tasks {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"

with (it.lines()) {
with(it.lines()) {
if (!containsAll(listOf(start, end))) {
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
}
Expand All @@ -124,6 +129,10 @@ tasks {
}
}

runIde {
mustRunAfter("bundleExecutables")
}

// Configure UI tests plugin
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
runIdeForUiTests {
Expand All @@ -133,6 +142,10 @@ tasks {
systemProperty("jb.consents.confirmation.enabled", "false")
}

verifyPlugin {
mustRunAfter("bundleExecutables")
}

signPlugin {
certificateChain = environment("CERTIFICATE_CHAIN")
privateKey = environment("PRIVATE_KEY")
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 3c60a5c

Please sign in to comment.