Skip to content

Commit

Permalink
Merge pull request #1247 from anusreelakshmi934/localLsp4ijPathIssue
Browse files Browse the repository at this point in the history
Fixed the retrieval of the local LSP4IJ path.
  • Loading branch information
anusreelakshmi934 authored Feb 12, 2025
2 parents 5d1f4b9 + 7f1b8d5 commit b798331
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ jobs:
if: ${{ inputs.useLocalPlugin == true }}
working-directory: ./lsp4ij
run: bash ./gradlew buildPlugin
# This step is retained to support the 24.0.9 tag running in the cron job, as it requires an unzipped LSP4IJ.
- name: 'Unzip lsp4ij file'
if: ${{ inputs.useLocalPlugin == true }}
working-directory: ./lsp4ij/build/distributions
Expand Down
13 changes: 9 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,15 @@ dependencies {
create(providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion"))
bundledPlugins providers.gradleProperty("platformBundledPlugins").orElse("").get().split(',').toList()

def lsp4ij = providers.gradleProperty('useLocal') && providers.gradleProperty('useLocal') == 'true' ?
file("../lsp4ij/build/distributions/LSP4IJ/") :
'com.redhat.devtools.lsp4ij:' + lsp4ijVersion
plugins lsp4ij
// Locate the LSP4IJ ZIP file in the distributions directory
def lsp4ijZip = file("../lsp4ij/build/distributions").listFiles()?.findAll { it.name.endsWith(".zip") }?.first()

// If the 'useLocal' Gradle property is set to 'true', use the locally built LSP4IJ plugin;
// otherwise, use the specified version in the build.gradle file.
providers.gradleProperty("useLocal").get() == 'true' ?
localPlugin(lsp4ijZip.absolutePath) :
plugin('com.redhat.devtools.lsp4ij', lsp4ijVersion)

pluginVerifier()
zipSigner()
instrumentationTools()
Expand Down

0 comments on commit b798331

Please sign in to comment.