diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 912b365..3fbeb6d 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,13 +1,4 @@ -# These are supported funding model platforms - -github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] -patreon: # Replace with a single Patreon username -open_collective: # Replace with a single Open Collective username -ko_fi: anas_elgarhy -tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry -liberapay: # Replace with a single Liberapay username -issuehunt: # Replace with a single IssueHunt username -otechie: # Replace with a single Otechie username -lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] +github: 0x61nas +buy_me_a_coffee: 0x61nas +liberapay: 0x61nas +ko_fi: 0x61nas diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1cff904..f295a9b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,35 +1,19 @@ -# GitHub Actions Workflow created for testing and preparing the plugin release in following steps: -# - validate Gradle Wrapper, -# - run test and verifyPlugin tasks, -# - run buildPlugin task and prepare artifact for the further tests, -# - run IntelliJ Plugin Verifier, -# - create a draft release. -# -# Workflow is triggered on push and pull_request events. -# -# Docs: -# - GitHub Actions: https://help.github.com/en/actions -# - IntelliJ Plugin Verifier GitHub Action: https://github.com/ChrisCarini/intellij-platform-plugin-verifier-action -# - name: Build on: pull_request: branches: - master jobs: - # Run Gradle Wrapper Validation Action to verify the wrapper's checksum gradleValidation: name: Gradle Wrapper runs-on: ubuntu-latest steps: - - name: Fetch Sources - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Gradle Wrapper Validation - uses: gradle/wrapper-validation-action@v1.1.0 + uses: gradle/actions/wrapper-validation@v6 # Run verifyPlugin and test Gradle tasks test: @@ -39,22 +23,22 @@ jobs: steps: - name: Setup Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: - java-version: 11 + java-version: 21 distribution: 'zulu' - name: Fetch Sources - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Gradle Dependencies Cache - uses: actions/cache@v4.0.0 + uses: actions/cache@v5.0.5 with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} - name: Setup Gradle Wrapper Cache - uses: actions/cache@v4.0.0 + uses: actions/cache@v5.0.5 with: path: ~/.gradle/wrapper key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} @@ -76,24 +60,23 @@ jobs: version: ${{ steps.properties.outputs.version }} artifact: ${{ steps.properties.outputs.artifact }} steps: - - name: Setup Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: - java-version: 11 + java-version: 21 distribution: 'zulu' - name: Fetch Sources - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Gradle Dependencies Cache - uses: actions/cache@v4.0.0 + uses: actions/cache@v5.0.5 with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} - name: Setup Gradle Wrapper Cache - uses: actions/cache@v4.0.0 + uses: actions/cache@v5.0.5 with: path: ~/.gradle/wrapper key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} @@ -116,7 +99,7 @@ jobs: # Upload plugin artifact to make it available in the next jobs - name: Upload artifact - uses: actions/upload-artifact@v4.2.0 + uses: actions/upload-artifact@v7.0.1 with: name: plugin-artifact path: ./build/distributions/${{ needs.build.outputs.artifact }} @@ -128,24 +111,23 @@ jobs: needs: build runs-on: ubuntu-latest steps: - - name: Setup Java - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: - java-version: 11 + java-version: 21 distribution: 'zulu' - name: Fetch Sources - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Setup Gradle Dependencies Cache - uses: actions/cache@v4.0.0 + uses: actions/cache@v5.0.5 with: path: ~/.gradle/caches key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts', 'gradle.properties') }} - name: Setup Gradle Wrapper Cache - uses: actions/cache@v4.0.0 + uses: actions/cache@v5.0.5 with: path: ~/.gradle/wrapper key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} @@ -163,7 +145,7 @@ jobs: # Cache Plugin Verifier IDEs - name: Setup Plugin Verifier IDEs Cache - uses: actions/cache@v4.0.0 + uses: actions/cache@v5.0.5 with: path: ${{ steps.properties.outputs.pluginVerifierHomeDir }}/ides key: ${{ runner.os }}-plugin-verifier-${{ steps.properties.outputs.ideVersions }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 1d23d9d..86d6492 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,16 +1,28 @@ -# This is a basic workflow that is manually triggered - -name: Publish the plugin in marketplace +name: Publish the plugin on marketplace on: - release: - types: - - published # when a release is published + workflow_dispatch: + push: + tags: + - "*.*.*" + jobs: - deploying: + publish: runs-on: ubuntu-latest - # Steps represent a sequence of tasks that will be executed as part of the job steps: - # Runs a single command using the runners shell - - name: Deploying a Plugin with Gradle - run: ./gradlew publishPlugin -Dorg.gradle.project.intellijPublishToken=${{ secrets.PUBLISH_TOKEN }} + - name: Fetch Sources + uses: actions/checkout@v6 + + - name: Setup Java + uses: actions/setup-java@v5 + with: + java-version: '21' + distribution: 'zulu' + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v6 + + - name: Deploying a Plugin with Gradle + run: ./gradlew publishPlugin + env: + PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index f87e63a..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,85 +0,0 @@ -# GitHub Actions Workflow created for handling the release process based on the draft release prepared -# with the Build workflow. Running the publishPlugin task requires the PUBLISH_TOKEN secret provided. - -name: Release -on: - release: - types: [released] - -jobs: - - # Prepare and publish the plugin to the Marketplace repository -# release: -# name: Publish Plugin -# runs-on: ubuntu-latest -# steps: -# -# - name: Setup Java -# uses: actions/setup-java@v3 -# with: -# java-version: 11 -# distribution: 'zulu' -# -# - name: Fetch Sources -# uses: actions/checkout@v4 -# with: -# ref: ${{ github.event.release.tag_name }} -# -# - name: Publish Plugin -# env: -# PUBLISH_TOKEN: ${{ secrets.PUBLISH_TOKEN }} -# run: ./gradlew publishPlugin - - - build: - name: Build - runs-on: ubuntu-latest - steps: - - - name: Setup Java - uses: actions/setup-java@v3 - with: - java-version: 11 - distribution: 'zulu' - - - name: Fetch Sources - uses: actions/checkout@v4 - - - name: Setup Gradle Dependencies Cache - uses: actions/cache@v4.0.0 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-caches-${{ hashFiles('**/*.gradle', '**/*.gradle.kts') }} - - - name: Setup Gradle Wrapper Cache - uses: actions/cache@v4.0.0 - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }} - - - name: Set environment variables - id: properties - shell: bash - run: | - PROPERTIES="$(./gradlew properties --console=plain -q)" - VERSION="$(echo "$PROPERTIES" | grep "^version:" | cut -f2- -d ' ')" - NAME="$(echo "$PROPERTIES" | grep "^pluginName_:" | cut -f2- -d ' ')" - ARTIFACT="${NAME}-${VERSION}.zip" - - echo "::set-output name=version::$VERSION" - echo "::set-output name=name::$NAME" - echo "::set-output name=artifact::$ARTIFACT" - - - name: Build Plugin - run: ./gradlew buildPlugin - - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ github.event.release.upload_url }} - asset_path: ./build/distributions/${{ steps.properties.outputs.artifact }} - asset_name: ${{ steps.properties.outputs.artifact }} - asset_content_type: application/zip diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f8adaa..64036c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,54 +1,70 @@ # Changelog -## Unreleased +## [Unreleased] + +## [1.0.2] - 2026-03-04 ### Added -* Add the tafseer/translation text box to the ayah details dialog and make the user able to change the player edition on the fly -### Changed +- Add the tafseer/translation text box to the ayah details dialog and make the user able to change the player edition on the fly -### Deprecated +## [1.0.1] - 2023-05-18 -### Removed - -### Fixed - -### Security - -## 1.0.1 - 2023-05-18 - Update the dependencies. - Fix the icon url in the plugin.xml file. -## 1.0.0 - 2023-01-15 +## [1.0.0] - 2023-01-15 + - Support the build 2022.3. - Fix some bugs. - Upgrade the dependencies. -## 0.0.9 - 2022-11-03 (pre release) +## [0.0.9] - 2022-11-03 (pre release) + - Early support for build 2022.3 - Discontinue support for builds that are older than 2022.3 (change the jdk version from 11 to 17) - Fix issue trying to start the timer more than one if you closed the project and open a new one. - Fix the weird language in the details dialog labels issue. -## 0.0.8 - 2022-08-22 +## [0.0.8] - 2022-08-22 + - Fix some bugs and some improvements -## 0.0.7 - 2022-08-22 +## [0.0.7] - 2022-08-22 + - improve the play action. - Add next and previous buttons and autoplay check box. -## 0.0.6 - 2022-08-22 +## [0.0.6] - 2022-08-22 + - update the icons. -## 0.0.5 - 2022-08-22 +## [0.0.5] - 2022-08-22 + - Improve details dialog design. -## 0.0.4 - 2022-08-21 +## [0.0.4] - 2022-08-21 + - Fix forget selected edition id issue after closing the IDE and open it again. -## 0.0.3 - 2022-08-21 +## [0.0.3] - 2022-08-21 + - Fix sound issue. - Support intellij API level 213 and above. -## 0.0.2 - 2022-08-20 +## [0.0.2] - 2022-08-20 + - First stable release. + +[Unreleased]: https://github.com/0x61nas/Ayah-intellij/compare/1.0.2...HEAD +[1.0.2]: https://github.com/0x61nas/Ayah-intellij/compare/1.0.1...1.0.2 +[1.0.1]: https://github.com/0x61nas/Ayah-intellij/compare/1.0.0...1.0.1 +[1.0.0]: https://github.com/0x61nas/Ayah-intellij/compare/0.0.9...1.0.0 +[0.0.9]: https://github.com/0x61nas/Ayah-intellij/compare/0.0.8...0.0.9 +[0.0.8]: https://github.com/0x61nas/Ayah-intellij/compare/0.0.7...0.0.8 +[0.0.7]: https://github.com/0x61nas/Ayah-intellij/compare/0.0.6...0.0.7 +[0.0.6]: https://github.com/0x61nas/Ayah-intellij/compare/0.0.5...0.0.6 +[0.0.5]: https://github.com/0x61nas/Ayah-intellij/compare/0.0.4...0.0.5 +[0.0.4]: https://github.com/0x61nas/Ayah-intellij/compare/0.0.3...0.0.4 +[0.0.3]: https://github.com/0x61nas/Ayah-intellij/compare/0.0.2...0.0.3 +[0.0.2]: https://github.com/0x61nas/Ayah-intellij/commits/0.0.2 diff --git a/build.gradle.kts b/build.gradle.kts index 6861598..3c63fd1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,12 +1,13 @@ import org.jetbrains.changelog.Changelog import org.jetbrains.changelog.markdownToHTML +import org.jetbrains.intellij.platform.gradle.TestFrameworkType fun properties(key: String) = project.findProperty(key).toString() plugins { id("java") - id("org.jetbrains.intellij") version "1.17.0" - id("org.jetbrains.changelog") version "2.2.0" + id("org.jetbrains.intellij.platform") version "2.16.0" + id("org.jetbrains.changelog") version "2.5.0" } version = properties("pluginVersion") @@ -14,85 +15,132 @@ group = properties("pluginGroup") repositories { mavenCentral() + intellijPlatform { + defaultRepositories() + } maven("https://jitpack.io") } dependencies { - implementation("com.github.anas-elgarhy:alquran-cloud-api:0.4.5") - implementation("com.miglayout:miglayout-swing:11.2") + implementation("com.github.anas-elgarhy:alquran-cloud-api:v0.5.2") + implementation("com.miglayout:miglayout-swing:11.4.3") // implementation("com.github.goxr3plus:java-stream-player:10.0.2") implementation("com.googlecode.soundlibs:jlayer:1.0.1.4") - compileOnly("org.projectlombok:lombok:1.18.30") - annotationProcessor("org.projectlombok:lombok:1.18.30") + compileOnly("org.projectlombok:lombok:1.18.46") + annotationProcessor("org.projectlombok:lombok:1.18.46") - testImplementation("org.projectlombok:lombok:1.18.30") - testAnnotationProcessor("org.projectlombok:lombok:1.18.30") + testImplementation("org.projectlombok:lombok:1.18.46") + testAnnotationProcessor("org.projectlombok:lombok:1.18.46") + + intellijPlatform { + intellijIdea("2025.3.3") + + bundledPlugin("com.intellij.java") + + testFramework(TestFrameworkType.Platform) + } } java { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 } -// 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")) - type.set(properties("platformType")) - - plugins.set(listOf(/* Plugin Dependencies */)) -} - -tasks { - // Set the JVM compatibility versions - withType { - options.encoding = "UTF-8" - sourceCompatibility = "17" - targetCompatibility = "17" - } - - wrapper { - gradleVersion = properties("gradleVersion") - } - - patchPluginXml { - version.set(properties("pluginVersion")) - sinceBuild.set(properties("pluginSinceBuild")) - untilBuild.set("") +// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html +intellijPlatform { + pluginConfiguration { + name = providers.gradleProperty("pluginName") + version = providers.gradleProperty("pluginVersion") // Extract the section from README.md and provide for the plugin's manifest - pluginDescription.set( - file("README.md").readText().lines().run { - val start = "" - val end = "" + description = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map { + val start = "" + val end = "" + with(it.lines()) { if (!containsAll(listOf(start, end))) { throw GradleException("Plugin description section not found in README.md:\n$start ... $end") } - subList(indexOf(start) + 1, indexOf(end)) - }.joinToString("\n") - .replace("./assets/", "https://raw.githubusercontent.com/anas-elgarhy/Ayah-intellij/master/assets/") - .let { markdownToHTML(it) } - ) + subList(indexOf(start) + 1, indexOf(end)).joinToString("\n").let(::markdownToHTML) + } + } + val changelog = project.changelog // local variable for configuration cache compatibility // Get the latest available change notes from the changelog file - changeNotes.set(provider { + changeNotes = providers.gradleProperty("pluginVersion").map { pluginVersion -> with(changelog) { renderItem( - getOrNull(properties("pluginVersion")) ?: getLatest(), + (getOrNull(pluginVersion) ?: getUnreleased()) + .withHeader(false) + .withEmptySections(false), Changelog.OutputType.HTML, ) } - }) + } + + ideaVersion { + sinceBuild = providers.gradleProperty("pluginSinceBuild") + } + } + + signing { + certificateChain = providers.environmentVariable("CERTIFICATE_CHAIN") + privateKey = providers.environmentVariable("PRIVATE_KEY") + password = providers.environmentVariable("PRIVATE_KEY_PASSWORD") + } + + publishing { + token = providers.environmentVariable("PUBLISH_TOKEN") + // The pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3 + // Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more: + // https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html#specifying-a-release-channel + channels = providers.gradleProperty("pluginVersion").map { listOf(it.substringAfter('-', "").substringBefore('.').ifEmpty { "default" }) } + } + + pluginVerification { + ides { + recommended() + } + } +} + + +// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin +changelog { + groups.empty() + repositoryUrl = providers.gradleProperty("pluginRepositoryUrl") + versionPrefix = "" +} + +tasks { + wrapper { + gradleVersion = providers.gradleProperty("gradleVersion").get() } publishPlugin { - dependsOn("patchChangelog", "patchPluginXml") - token.set(System.getenv("PUBLISH_TOKEN")) - // pluginVersion is based on the SemVer (https://semver.org) and supports pre-release labels, like 2.1.7-alpha.3 - // Specify pre-release label to publish the plugin in a custom Release Channel automatically. Read more: - // https://plugins.jetbrains.com/docs/intellij/deployment.html#specifying-a-release-channel - channels.set(listOf(properties("pluginVersion").split('-').getOrElse(1) { "default" }.split('.').first())) + dependsOn(patchChangelog) + } +} + + + +intellijPlatformTesting { + runIde { + register("runIdeForUiTests") { + task { + jvmArgumentProviders += CommandLineArgumentProvider { + listOf( + "-Drobot-server.port=8082", + "-Dide.mac.message.dialogs.as.sheets=false", + "-Djb.privacy.policy.text=", + "-Djb.consents.confirmation.enabled=false", + ) + } + } + + plugins { + robotServerPlugin() + } + } } } diff --git a/gradle.properties b/gradle.properties index 5ee6322..b5b9af4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,9 +2,9 @@ pluginGroup = com.anas.intellij.plugins.ayah pluginName = Ayah -pluginRepositoryUrl = https://github.com/anas-elgarhy/Ayah-intellij +pluginRepositoryUrl = https://github.com/0x61nas/Ayah-intellij # SemVer format -> https://semver.org -pluginVersion = 1.0.1 +pluginVersion = 1.0.2 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild = 223 @@ -14,7 +14,7 @@ platformType = IC platformVersion = 2022.3 # Gradle Releases -> https://github.com/gradle/gradle/releases -gradleVersion = 7.6 +gradleVersion = 9.4 # Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html org.gradle.unsafe.configuration-cache = true diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7f93135..b1b8ef5 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3fa8f86..df6a6ad 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,7 +1,9 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-9.5.1-bin.zip networkTimeout=10000 +retries=0 +retryBackOffMs=500 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1aa94a4..b9bb139 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,6 +15,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +# SPDX-License-Identifier: Apache-2.0 +# ############################################################################## # @@ -55,7 +57,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/3d91ce3b8caaf77ad09f381f43615b715b53f72c/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -84,7 +86,7 @@ done # shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) -APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit +APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -112,7 +114,6 @@ case "$( uname )" in #( NONSTOP* ) nonstop=true ;; esac -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -170,7 +171,6 @@ fi # For Cygwin or MSYS, switch paths to Windows format before running java if "$cygwin" || "$msys" ; then APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) JAVACMD=$( cygpath --unix "$JAVACMD" ) @@ -203,15 +203,14 @@ fi DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Collect all arguments for the java command: -# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # and any embedded shellness will be escaped. # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be # treated as '${Hostname}' itself on the command line. set -- \ "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ + -jar "$APP_HOME/gradle/wrapper/gradle-wrapper.jar" \ "$@" # Stop when "xargs" is not available. diff --git a/gradlew.bat b/gradlew.bat old mode 100644 new mode 100755 index 6689b85..aa5f10b --- a/gradlew.bat +++ b/gradlew.bat @@ -13,6 +13,8 @@ @rem See the License for the specific language governing permissions and @rem limitations under the License. @rem +@rem SPDX-License-Identifier: Apache-2.0 +@rem @if "%DEBUG%"=="" @echo off @rem ########################################################################## @@ -21,8 +23,8 @@ @rem @rem ########################################################################## -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal +@rem Set local scope for the variables, and ensure extensions are enabled +setlocal EnableExtensions set DIRNAME=%~dp0 if "%DIRNAME%"=="" set DIRNAME=. @@ -43,13 +45,13 @@ set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 if %ERRORLEVEL% equ 0 goto execute -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :findJavaFromJavaHome set JAVA_HOME=%JAVA_HOME:"=% @@ -57,36 +59,24 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe if exist "%JAVA_EXE%" goto execute -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 -goto fail +"%COMSPEC%" /c exit 1 :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* +@rem endlocal doesn't take effect until after the line is parsed and variables are expanded +@rem which allows us to clear the local environment before executing the java command +endlocal & "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -jar "%APP_HOME%\gradle\wrapper\gradle-wrapper.jar" %* & call :exitWithErrorLevel -:end -@rem End local scope for the variables with windows NT shell -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! -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 - -:omega +:exitWithErrorLevel +@rem Use "%COMSPEC%" /c exit to allow operators to work properly in scripts +"%COMSPEC%" /c exit %ERRORLEVEL% diff --git a/justfile b/justfile new file mode 100644 index 0000000..3b02e75 --- /dev/null +++ b/justfile @@ -0,0 +1,42 @@ +#!/usr/bin/env just --justfile + +REPO_NAME := "Ayah-intellij" + +alias dist := package +alias ch := patch-changelog + +package: + cd {{justfile_directory()}} && ./gradlew buildPlugin + +clean: + cd {{justfile_directory()}} && ./gradlew clean + +# Update the CHANGELOG.md +patch-changelog: + cd {{justfile_directory()}} && ./gradlew patchChangelog + +setup-remotes: + git remote add github git@github.com:0x61nas/{{REPO_NAME}}.git + git remote add gitlab git@gitlab.com:anelgarhy/{{REPO_NAME}}.git + git remote add codeberg ssh://git@codeberg.org/0x61nas/{{REPO_NAME}}.git + git remote add disroot ssh://git@git.disroot.org/anas/{{REPO_NAME}}.git + git remote add tangled git@tangled.org:anas.tngl.sh/{{REPO_NAME}} + git remote add codefloe ssh://git@codefloe.com/anas/{{REPO_NAME}}.git + +# Push the code to all remotes +push FLAGS="-u" BRANSH="master": + git push {{FLAGS}} github {{BRANSH}} + git push {{FLAGS}} gitlab {{BRANSH}} + git push {{FLAGS}} codeberg {{BRANSH}} + git push {{FLAGS}} disroot {{BRANSH}} + git push {{FLAGS}} tangled {{BRANSH}} + git push {{FLAGS}} codefloe {{BRANSH}} + +# Push the git tags to all remotes +pusht: push + git push --tags github + git push --tags gitlab + git push --tags codeberg + git push --tags disroot + git push --tags tangled + git push --tags codefloe diff --git a/renovate.json b/renovate.json index f9c2c32..93afd4a 100644 --- a/renovate.json +++ b/renovate.json @@ -1,6 +1,6 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ - "config:base" + "config:recommended" ] } diff --git a/settings.gradle.kts b/settings.gradle.kts index b210c5c..9cb9345 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -2,6 +2,7 @@ rootProject.name = "Ayah-intellij" pluginManagement { repositories { maven("https://oss.sonatype.org/content/repositories/snapshots/") + maven("https://central.sonatype.com/repository/maven-snapshots/") gradlePluginPortal() } }