diff --git a/.github/workflows/publish-eap.yml b/.github/workflows/publish-eap.yml deleted file mode 100644 index 351678fd..00000000 --- a/.github/workflows/publish-eap.yml +++ /dev/null @@ -1,84 +0,0 @@ -name: Publish EAP to the Marketplace - -on: -# # only works on 'master' branch as it is a default branch -# workflow_run: -# workflows: [ Check ] -# types: -# - completed -# branches: -# - master - release: - types: [prereleased] - -jobs: -# check-for-tests-success: -# runs-on: ubuntu-latest -# permissions: -# actions: write -# -# steps: -# - name: Early exit if tests wasn't successful -# if: ${{ github.event.workflow_run.conclusion != 'success' }} -# run: | -# gh run cancel ${{ github.run_id }} -# gh run watch ${{ github.run_id }} -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - publish-eap-channel: -# needs: [ check-for-tests-success ] - strategy: - matrix: - gradle-properties-version: [ 242, 243 ] - - runs-on: ubuntu-latest - env: - ORG_GRADLE_PROJECT_shortPlatformVersion: ${{ matrix.gradle-properties-version }} - JB_PUB_TOKEN: ${{ secrets.JB_PUB_TOKEN }} - JB_PUB_CHANNEL: eap - - steps: - - uses: actions/checkout@v4 - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: 'corretto' - java-version: 21 - - - name: Setup Gradle and dependencies - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: wrapper - cache-read-only: false - arguments: ":resolveDependencies -Pkotlin.incremental=false --no-daemon" - gradle-home-cache-excludes: | - caches/modules-2/files-2.1/com.jetbrains.intellij.pycharm - caches/modules-2/files-2.1/com.jetbrains.intellij.idea - caches/modules-2/files-2.1/com.jetbrains.intellij.clion - - - name: Build - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: wrapper - arguments: "assemble testClasses -Pkotlin.incremental=false --no-daemon --stacktrace" - gradle-home-cache-excludes: | - caches/modules-2/files-2.1/com.jetbrains.intellij.pycharm - caches/modules-2/files-2.1/com.jetbrains.intellij.idea - caches/modules-2/files-2.1/com.jetbrains.intellij.clion - - - name: Publish to EAP channel - uses: gradle/actions/setup-gradle@v3 - with: - gradle-version: wrapper - arguments: ":publishPlugin -Pkotlin.incremental=false --no-daemon --stacktrace" - gradle-home-cache-excludes: | - caches/modules-2/files-2.1/com.jetbrains.intellij.pycharm - caches/modules-2/files-2.1/com.jetbrains.intellij.idea - caches/modules-2/files-2.1/com.jetbrains.intellij.clion - - - - diff --git a/build.gradle.kts b/build.gradle.kts index 31ae017a..04e9b05c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,11 +4,10 @@ import org.jetbrains.intellij.platform.gradle.tasks.VerifyPluginTask import org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_9 import org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0 import org.jetbrains.kotlin.gradle.tasks.KotlinCompile -import java.io.ByteArrayOutputStream import java.util.* +@Suppress("USELESS_ELVIS_RIGHT_IS_NULL") val publishingToken = System.getenv("JB_PUB_TOKEN") ?: null -val publishingChannel = System.getenv("JB_PUB_CHANNEL") ?: "default" // set by default in Github Actions val isCI = System.getenv("CI") != null @@ -17,46 +16,11 @@ fun prop(name: String): String = extra.properties[name] as? String ?: error("Property `$name` is not defined in gradle.properties for environment `$shortPlatformVersion`") -fun propOrNull(name: String): String? = extra.properties[name] as? String - -fun gitCommitHash(): String { - val byteOut = ByteArrayOutputStream() - project.exec { - commandLine = "git rev-parse --short HEAD".split(" ") -// commandLine = "git rev-parse --abbrev-ref HEAD".split(" ") - standardOutput = byteOut - } - return String(byteOut.toByteArray()).trim().also { - if (it == "HEAD") - logger.warn("Unable to determine current branch: Project is checked out with detached head!") - } -} - -fun gitTimestamp(): String { - val byteOut = ByteArrayOutputStream() - project.exec { - commandLine = "git show --no-patch --format=%at HEAD".split(" ") -// commandLine = "git rev-parse --abbrev-ref HEAD".split(" ") - standardOutput = byteOut - } - return String(byteOut.toByteArray()).trim().also { - if (it == "HEAD") - logger.warn("Unable to determine current branch: Project is checked out with detached head!") - } -} - val shortPlatformVersion = prop("shortPlatformVersion") val useInstaller = prop("useInstaller").toBooleanStrict() val codeVersion = "1.40.0" -var pluginVersion = "$codeVersion.$shortPlatformVersion" -if (publishingChannel != "default") { - // timestamp of the commit with this eaps addition - val start = 1714498465 - val commitTimestamp = gitTimestamp().toInt() - start - pluginVersion = "$pluginVersion-$publishingChannel.$commitTimestamp" -} - +val pluginVersion = "$codeVersion.$shortPlatformVersion" val pluginGroup = "org.move" val pluginName = "intellij-move" @@ -158,7 +122,6 @@ allprojects { publishing { token.set(publishingToken) - channels.set(listOf(publishingChannel)) } pluginVerification { @@ -252,6 +215,7 @@ allprojects { } } + @Suppress("unused") val runIdeWithPlugins by intellijPlatformTesting.runIde.registering { plugins { plugin("com.google.ide-perf:1.3.2") @@ -330,14 +294,3 @@ fun copyDownloadedAptosBinaries(copyTask: AbstractCopyTask) { } } -val Project.dependencyCachePath - get(): String { - val cachePath = file("${rootProject.projectDir}/deps") - // If cache path doesn't exist, we need to create it manually - // because otherwise gradle-intellij-plugin will ignore it - if (!cachePath.exists()) { - cachePath.mkdirs() - } - return cachePath.absolutePath - } -