Skip to content

Commit

Permalink
chore: updated with IntelliJ Platform Plugin Template v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ceclin committed Aug 10, 2022
1 parent aaa3aa2 commit 0bbc844
Show file tree
Hide file tree
Showing 11 changed files with 72 additions and 51 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,21 +33,27 @@ jobs:
changelog: ${{ steps.properties.outputs.changelog }}
steps:

# Free GitHub Actions Environment Disk Space
- name: Maximize Build Space
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3

# Validate wrapper
- name: Gradle Wrapper Validation
uses: gradle/[email protected]

# Setup Java 11 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
cache: gradle

# Set environment variables
- name: Export Properties
Expand Down Expand Up @@ -76,14 +82,14 @@ jobs:
# Collect Tests Result of failed tests
- name: Collect Tests Result
if: ${{ failure() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: tests-result
path: ${{ github.workspace }}/build/reports/tests

# Cache Plugin Verifier IDEs
- name: Setup Plugin Verifier IDEs Cache
uses: actions/cache@v2.1.7
uses: actions/cache@v3
with:
path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides
key: plugin-verifier-${{ hashFiles('build/listProductsReleases.txt') }}
Expand All @@ -95,14 +101,14 @@ jobs:
# Collect Plugin Verifier Result
- name: Collect Plugin Verifier Result
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: pluginVerifier-result
path: ${{ github.workspace }}/build/reports/pluginVerifier

# Run Qodana inspections
- name: Qodana - Code Inspection
uses: JetBrains/qodana-action@v4.2.5
uses: JetBrains/qodana-action@v2022.2.1

# Prepare plugin archive content for creating artifact
- name: Prepare Plugin Artifact
Expand All @@ -117,7 +123,7 @@ jobs:
# Store already-built plugin as an artifact for downloading
- name: Upload artifact
uses: actions/upload-artifact@v2.2.4
uses: actions/upload-artifact@v3
with:
name: ${{ steps.artifact.outputs.filename }}
path: ./build/distributions/content/*/*
Expand All @@ -129,11 +135,13 @@ jobs:
if: github.event_name != 'pull_request'
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3

# Remove old release drafts by using the curl request for the available releases with draft flag
- name: Remove Old Release Drafts
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,23 @@ jobs:
release:
name: Publish Plugin
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3
with:
ref: ${{ github.event.release.tag_name }}

# Setup Java 11 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
cache: gradle

# Set environment variables
- name: Export Properties
Expand Down Expand Up @@ -56,6 +58,9 @@ jobs:
- name: Publish Plugin
env:
PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }}
CERTIFICATE_CHAIN: ${{ secrets.CERTIFICATE_CHAIN }}
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
PRIVATE_KEY_PASSWORD: ${{ secrets.PRIVATE_KEY_PASSWORD }}
run: ./gradlew publishPlugin

# Upload artifact as a release asset
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/run-ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,14 @@ jobs:

# Check out current repository
- name: Fetch Sources
uses: actions/checkout@v2.4.0
uses: actions/checkout@v3

# Setup Java 11 environment for the next steps
- name: Setup Java
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 11
cache: gradle

# Run IDEA prepared for UI testing
- name: Run IDE
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
# BDLH Changelog

## [Unreleased]
### Changed
- Stay updated with IntelliJ Platform Plugin Template v1.2.0

## [0.3.1]
### Fixed
### Fixed
- Signature generation of constructor methods

## [0.3.0]
Expand Down
31 changes: 16 additions & 15 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

fun properties(key: String) = project.findProperty(key).toString()

plugins {
// Java support
id("java")
// Kotlin support
id("org.jetbrains.kotlin.jvm") version "1.6.10"
id("org.jetbrains.kotlin.jvm") version "1.7.10"
// Gradle IntelliJ Plugin
id("org.jetbrains.intellij") version "1.4.0"
id("org.jetbrains.intellij") version "1.8.0"
// Gradle Changelog Plugin
id("org.jetbrains.changelog") version "1.3.1"
// Gradle Qodana Plugin
Expand All @@ -24,7 +23,20 @@ repositories {
mavenCentral()
}

// Configure Gradle IntelliJ Plugin - read more: https://github.com/JetBrains/gradle-intellij-plugin
// Set the JVM language level used to compile sources and generate files - Java 11 is required since 2020.3
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

kotlin {
jvmToolchain {
languageVersion.set(JavaLanguageVersion.of(11))
}
}

// Configure Gradle IntelliJ Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
intellij {
pluginName.set(properties("pluginName"))
version.set(properties("platformVersion"))
Expand All @@ -49,17 +61,6 @@ qodana {
}

tasks {
// Set the JVM compatibility versions
properties("javaVersion").let {
withType<JavaCompile> {
sourceCompatibility = it
targetCompatibility = it
}
withType<KotlinCompile> {
kotlinOptions.jvmTarget = it
}
}

wrapper {
gradleVersion = properties("gradleVersion")
}
Expand Down
20 changes: 7 additions & 13 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,31 +1,25 @@
# IntelliJ Platform Artifacts Repositories
# -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html
# IntelliJ Platform Artifacts Repositories -> https://plugins.jetbrains.com/docs/intellij/intellij-artifacts.html

pluginGroup = com.github.ceclin.bdlh
pluginName = BDLH
# SemVer format -> https://semver.org
pluginVersion = 0.3.1
pluginVersion = 0.3.2

# See https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
# for insight into build numbers and IntelliJ Platform versions.
# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 211
pluginUntilBuild = 221.*
pluginUntilBuild = 222.*

# IntelliJ Platform Properties -> https://github.com/JetBrains/gradle-intellij-plugin#intellij-platform-properties
# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#intellij-extension
platformType = IC
platformVersion = 2021.1.3

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins = com.intellij.java

# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
javaVersion = 11

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 7.4
gradleVersion = 7.5.1

# Opt-out flag for bundling Kotlin standard library.
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details.
# Opt-out flag for bundling Kotlin standard library -> https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library
# suppress inspection "UnusedProperty"
kotlin.stdlib.default.dependency = false
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 6 additions & 0 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
14 changes: 8 additions & 6 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,13 +75,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
4 changes: 4 additions & 0 deletions qodana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
version: 1.0
profile:
name: qodana.recommended
exclude:
- name: All
paths:
- .qodana

0 comments on commit 0bbc844

Please sign in to comment.