-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
Signed-off-by: Uladzislau <leksilonchikk@gmail.com>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Build | ||
|
||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
build-intellij: | ||
runs-on: ubuntu-latest | ||
# Changing WORKING_DIRECTORY, don't forget to change defaults.run.working-directory | ||
env: | ||
WORKING_DIRECTORY: intellij-plugin | ||
defaults: | ||
run: | ||
working-directory: ./intellij-plugin | ||
steps: | ||
|
||
- name: Checkout the plugin GitHub repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: zulu | ||
java-version: 17 | ||
|
||
- name: Setup Gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
with: | ||
gradle-home-cache-cleanup: true | ||
|
||
- name: Check repository content | ||
shell: bash | ||
run: pwd && ls -la | ||
|
||
- name: Test plugin | ||
shell: bash | ||
run: ./gradlew test | ||
|
||
- name: Build plugin | ||
shell: bash | ||
run: ./gradlew buildPlugin | ||
|
||
- name: Prepare Plugin Artifact | ||
id: artifact | ||
shell: bash | ||
run: | | ||
cd ${{ github.workspace }}/${{ env.WORKING_DIRECTORY }}/build/distributions | ||
FILENAME=`ls *.zip` | ||
unzip "$FILENAME" -d content | ||
echo "filename=${FILENAME:0:-4}" >> $GITHUB_OUTPUT | ||
echo "zip artifact name:" | ||
echo "$FILENAME" | ||
- name: Publish built plugin to artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ steps.artifact.outputs.filename }} | ||
path: ./${{ env.WORKING_DIRECTORY }}/build/distributions/content/*/* |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
.vscode/* | ||
!.vscode/extensions.json | ||
!.vscode/launch.json | ||
!.vscode/tasks.json | ||
node_modules/ | ||
dist/ | ||
out/ | ||
**/src/generated | ||
**/syntaxes/pli.merged.json | ||
*.tsbuildinfo | ||
*.vsix |
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
.gradle | ||
build/ | ||
!gradle/wrapper/gradle-wrapper.jar | ||
!**/src/main/**/build/ | ||
!**/src/test/**/build/ | ||
|
||
### IntelliJ IDEA ### | ||
.idea/modules.xml | ||
.idea/jarRepositories.xml | ||
.idea/compiler.xml | ||
.idea/libraries/ | ||
*.iws | ||
*.iml | ||
*.ipr | ||
out/ | ||
!**/src/main/**/out/ | ||
!**/src/test/**/out/ | ||
|
||
### Eclipse ### | ||
.apt_generated | ||
.classpath | ||
.factorypath | ||
.project | ||
.settings | ||
.springBeans | ||
.sts4-cache | ||
bin/ | ||
!**/src/main/**/bin/ | ||
!**/src/test/**/bin/ | ||
|
||
### NetBeans ### | ||
/nbproject/private/ | ||
/nbbuild/ | ||
/dist/ | ||
/nbdist/ | ||
/.nb-gradle/ | ||
|
||
### VS Code ### | ||
.vscode/ | ||
|
||
### Mac OS ### | ||
.DS_Store |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!-- | ||
This program and the accompanying materials are made available under the terms of the | ||
Eclipse Public License v2.0 which accompanies this distribution, and is available at | ||
https://www.eclipse.org/legal/epl-v20.html | ||
SPDX-License-Identifier: EPL-2.0 | ||
Copyright IBA Group 2024 | ||
--> | ||
|
||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Package plugin" type="GradleRunConfiguration" factoryName="Gradle"> | ||
<ExternalSystemSettings> | ||
<option name="executionName" /> | ||
<option name="externalProjectPath" value="$PROJECT_DIR$" /> | ||
<option name="externalSystemIdString" value="GRADLE" /> | ||
<option name="scriptParameters" value="" /> | ||
<option name="taskDescriptions"> | ||
<list /> | ||
</option> | ||
<option name="taskNames"> | ||
<list> | ||
<option value="buildPlugin" /> | ||
</list> | ||
</option> | ||
<option name="vmOptions" /> | ||
</ExternalSystemSettings> | ||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess> | ||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess> | ||
<DebugAllEnabled>false</DebugAllEnabled> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<component name="ProjectRunConfigurationManager"> | ||
<configuration default="false" name="Run Plugin" type="GradleRunConfiguration" factoryName="Gradle"> | ||
<log_file alias="idea.log" path="$PROJECT_DIR$/build/idea-sandbox/system/log/idea.log" /> | ||
<ExternalSystemSettings> | ||
<option name="executionName" /> | ||
<option name="externalProjectPath" value="$PROJECT_DIR$" /> | ||
<option name="externalSystemIdString" value="GRADLE" /> | ||
<option name="scriptParameters" value="--stacktrace" /> | ||
<option name="taskDescriptions"> | ||
<list /> | ||
</option> | ||
<option name="taskNames"> | ||
<list> | ||
<option value="runIde" /> | ||
</list> | ||
</option> | ||
<option name="vmOptions" value="" /> | ||
</ExternalSystemSettings> | ||
<ExternalSystemDebugServerProcess>true</ExternalSystemDebugServerProcess> | ||
<ExternalSystemReattachDebugProcess>true</ExternalSystemReattachDebugProcess> | ||
<DebugAllEnabled>false</DebugAllEnabled> | ||
<RunAsTest>false</RunAsTest> | ||
<method v="2" /> | ||
</configuration> | ||
</component> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# PL/I Language Support plug-in for IntelliJ IDEA™ | ||
|
||
## Prerequisites | ||
|
||
- Java v17 | ||
- Node.js v18 and later | ||
- IntelliJ v2023.2 | ||
|
||
## How to run (user) | ||
|
||
- Open the folder with the project, run `./gradlew buildPlugin` (for Unix-like) or `.\gradlew.bat buildPlugin` (for Windows) to build the plugin (or run "Package plugin" configuration) | ||
- The built plug-in will be at the `build/distributions` in .zip format, install it with Settings -> Plugins -> Install plugin from disk | ||
- Reload your IDE | ||
|
||
## How to run (developer) | ||
|
||
- Open the folder with the project, run "Run plugin" configuration, wait for the other instance of IDE to run |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/* | ||
* Copyright (c) 2024 IBA Group. | ||
* | ||
* This program and the accompanying materials are made available under the terms of the | ||
* Eclipse Public License v2.0 which accompanies this distribution, and is available at | ||
* https://www.eclipse.org/legal/epl-v20.html | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* IBA Group | ||
* Zowe Community | ||
*/ | ||
|
||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | ||
|
||
fun properties(key: String) = providers.gradleProperty(key) | ||
|
||
plugins { | ||
id("java") | ||
id("org.jetbrains.kotlin.jvm") version "1.9.21" | ||
id("org.jetbrains.intellij") version "1.16.1" | ||
id("org.jetbrains.kotlinx.kover") version "0.8.1" | ||
} | ||
|
||
group = properties("pluginGroup").get() | ||
version = properties("pluginVersion").get() | ||
val lsp4ijVersion = "0.7.0" | ||
val kotestVersion = "5.9.1" | ||
val mockkVersion = "1.13.11" | ||
val junitVersion = "1.10.2" | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
// Configure Gradle IntelliJ Plugin | ||
// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html | ||
intellij { | ||
version.set(properties("platformVersion").get()) | ||
// pluginsRepositories { | ||
// custom("https://plugins.jetbrains.com/plugins/nightly/23257") | ||
// } | ||
plugins.set(listOf("org.jetbrains.plugins.textmate", "com.redhat.devtools.lsp4ij:$lsp4ijVersion")) | ||
} | ||
|
||
dependencies { | ||
// ===== Test env setup ===== | ||
// Kotest | ||
testImplementation("io.kotest:kotest-runner-junit5:$kotestVersion") | ||
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion") | ||
// MockK | ||
testImplementation("io.mockk:mockk:$mockkVersion") | ||
// JUnit Platform (needed for Kotest) | ||
testImplementation("org.junit.platform:junit-platform-launcher:$junitVersion") | ||
// ========================== | ||
} | ||
|
||
tasks { | ||
// Set the JVM compatibility versions | ||
withType<JavaCompile> { | ||
sourceCompatibility = JavaVersion.VERSION_17.toString() | ||
targetCompatibility = JavaVersion.VERSION_17.toString() | ||
} | ||
withType<KotlinCompile> { | ||
kotlinOptions.jvmTarget = JavaVersion.VERSION_17.toString() | ||
} | ||
|
||
patchPluginXml { | ||
version = properties("pluginVersion") | ||
sinceBuild = properties("pluginSinceBuild") | ||
untilBuild = properties("pluginUntilBuild") | ||
} | ||
|
||
test { | ||
useJUnitPlatform() | ||
testLogging { | ||
events("passed", "skipped", "failed") | ||
} | ||
finalizedBy("koverHtmlReport") | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib | ||
kotlin.stdlib.default.dependency = false | ||
|
||
# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html | ||
org.gradle.configuration-cache = true | ||
|
||
# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html | ||
org.gradle.caching = true | ||
|
||
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension | ||
platformVersion = 2024.1 | ||
|
||
# SemVer format -> https://semver.org | ||
pluginVersion = 0.0.1 | ||
pluginGroup = org.zowe | ||
|
||
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html | ||
pluginSinceBuild = 232 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |