Skip to content

Commit

Permalink
try to update
Browse files Browse the repository at this point in the history
  • Loading branch information
czoido committed Sep 30, 2024
1 parent 3bc3b7d commit d307772
Show file tree
Hide file tree
Showing 13 changed files with 162 additions and 123 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,10 @@ updates:
# Maintain dependencies for Gradle dependencies
- package-ecosystem: "gradle"
directory: "/"
target-branch: "next"
schedule:
interval: "daily"
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
target-branch: "next"
schedule:
interval: "daily"
18 changes: 6 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,16 @@

name: Build
on:
# Trigger the workflow on pushes to only the 'develop2' branch (this avoids duplicate checks being run e.g., for dependabot pull requests)
# Trigger the workflow on pushes to only the 'main' branch (this avoids duplicate checks being run e.g., for dependabot pull requests)
push:
branches: [ develop2 ]
# Trigger the workflow on any pull request
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:

# Prepare environment and build the plugin
Expand All @@ -33,7 +36,7 @@ jobs:
pluginVerifierHomeDir: ${{ steps.properties.outputs.pluginVerifierHomeDir }}
steps:

# Check out current repository
# Check out the current repository
- name: Fetch Sources
uses: actions/checkout@v4

Expand Down Expand Up @@ -70,8 +73,6 @@ jobs:
echo "$CHANGELOG" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
./gradlew listProductsReleases # prepare list of IDEs for Plugin Verifier
# Build plugin
- name: Build plugin
run: ./gradlew buildPlugin
Expand Down Expand Up @@ -236,13 +237,6 @@ jobs:
- name: Fetch Sources
uses: actions/checkout@v4

# Set up Java environment for the next steps
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 17

# Remove old release drafts by using the curl request for the available releases with a draft flag
- name: Remove Old Release Drafts
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ build
.DS_Store
*.pyc
.ci/tmp/*
.DS_Store
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

## [Unreleased]

### Changed

- Update gradle.properties to be compatible with CLion 243.*

## [2.0.6] - 2024-08-14

### Changed
Expand Down
168 changes: 99 additions & 69 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,88 +1,69 @@
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML

fun properties(key: String) = providers.gradleProperty(key)
fun environment(key: String) = providers.environmentVariable(key)
import org.jetbrains.intellij.platform.gradle.TestFrameworkType

plugins {
id("java") // Java support
alias(libs.plugins.kotlin) // Kotlin support
alias(libs.plugins.gradleIntelliJPlugin) // Gradle IntelliJ Plugin
alias(libs.plugins.intelliJPlatform) // IntelliJ Platform Gradle Plugin
alias(libs.plugins.changelog) // Gradle Changelog Plugin
alias(libs.plugins.qodana) // Gradle Qodana Plugin
alias(libs.plugins.kover) // Gradle Kover Plugin
alias(libs.plugins.serialization)
}

group = properties("pluginGroup").get()
version = properties("pluginVersion").get()
group = providers.gradleProperty("pluginGroup").get()
version = providers.gradleProperty("pluginVersion").get()

// Set the JVM language level used to build the project.
kotlin {
jvmToolchain(17)
}

// Configure project's dependencies
repositories {
mavenCentral()

// IntelliJ Platform Gradle Plugin Repositories Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-repositories-extension.html
intellijPlatform {
defaultRepositories()
}
}

// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
dependencies {
// implementation(libs.annotations)
testImplementation(libs.junit)
implementation(libs.kotlinxSerializationJson)
}

// Set the JVM language level used to build the project. Use Java 11 for 2020.3+, and Java 17 for 2022.2+.
kotlin {
jvmToolchain(17)
}

// Configure Gradle IntelliJ Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
intellij {
pluginName = properties("pluginName")
version = properties("platformVersion")
type = properties("platformType")
// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
intellijPlatform {
create(providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion"))

// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file.
plugins = properties("platformPlugins").map { it.split(',').map(String::trim).filter(String::isNotEmpty) }
instrumentCode.set(false)
}
// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
bundledPlugins(providers.gradleProperty("platformBundledPlugins").map { it.split(',') })

// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
changelog {
groups.empty()
repositoryUrl = properties("pluginRepositoryUrl")
}

// Configure Gradle Qodana Plugin - read more: https://github.com/JetBrains/gradle-qodana-plugin
qodana {
cachePath = provider { file(".qodana").canonicalPath }
reportPath = provider { file("build/reports/inspections").canonicalPath }
saveReport = true
showReport = environment("QODANA_SHOW_REPORT").map { it.toBoolean() }.getOrElse(false)
}
// Plugin Dependencies. Uses `platformPlugins` property from the gradle.properties file for plugin from JetBrains Marketplace.
plugins(providers.gradleProperty("platformPlugins").map { it.split(',') })

// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration
koverReport {
defaults {
xml {
onCheck = true
}
instrumentationTools()
pluginVerifier()
zipSigner()
testFramework(TestFrameworkType.Platform)
}
}

tasks {
wrapper {
gradleVersion = properties("gradleVersion").get()
}

patchPluginXml {
version = properties("pluginVersion")
sinceBuild = properties("pluginSinceBuild")
untilBuild = properties("pluginUntilBuild")
// Configure IntelliJ Platform Gradle Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html
intellijPlatform {
pluginConfiguration {
version = providers.gradleProperty("pluginVersion")

// Extract the <!-- Plugin description --> section from README.md and provide for the plugin's manifest
pluginDescription = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map {
description = providers.fileContents(layout.projectDirectory.file("README.md")).asText.map {
val start = "<!-- Plugin description -->"
val end = "<!-- Plugin description end -->"

with (it.lines()) {
with(it.lines()) {
if (!containsAll(listOf(start, end))) {
throw GradleException("Plugin description section not found in README.md:\n$start ... $end")
}
Expand All @@ -92,7 +73,7 @@ tasks {

val changelog = project.changelog // local variable for configuration cache compatibility
// Get the latest available change notes from the changelog file
changeNotes = properties("pluginVersion").map { pluginVersion ->
changeNotes = providers.gradleProperty("pluginVersion").map { pluginVersion ->
with(changelog) {
renderItem(
(getOrNull(pluginVersion) ?: getUnreleased())
Expand All @@ -102,29 +83,78 @@ tasks {
)
}
}
}

// Configure UI tests plugin
// Read more: https://github.com/JetBrains/intellij-ui-test-robot
runIdeForUiTests {
systemProperty("robot-server.port", "8082")
systemProperty("ide.mac.message.dialogs.as.sheets", "false")
systemProperty("jb.privacy.policy.text", "<!--999.999-->")
systemProperty("jb.consents.confirmation.enabled", "false")
ideaVersion {
sinceBuild = providers.gradleProperty("pluginSinceBuild")
untilBuild = providers.gradleProperty("pluginUntilBuild")
}
}

//signPlugin {
// certificateChain = environment("CERTIFICATE_CHAIN")
// privateKey = environment("PRIVATE_KEY")
// password = environment("PRIVATE_KEY_PASSWORD")
//}
// signing {
// certificateChain = providers.environmentVariable("CERTIFICATE_CHAIN")
// privateKey = providers.environmentVariable("PRIVATE_KEY")
// password = providers.environmentVariable("PRIVATE_KEY_PASSWORD")
// }

publishPlugin {
dependsOn("patchChangelog")
token = environment("PUBLISH_TOKEN")
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/deployment.html#specifying-a-release-channel
channels = properties("pluginVersion").map { listOf(it.split('-').getOrElse(1) { "default" }.split('.').first()) }
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")
}

// Configure Gradle Kover Plugin - read more: https://github.com/Kotlin/kotlinx-kover#configuration
kover {
reports {
total {
xml {
onCheck = true
}
}
}
}

tasks {
wrapper {
gradleVersion = providers.gradleProperty("gradleVersion").get()
}

publishPlugin {
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=<!--999.999-->",
"-Djb.consents.confirmation.enabled=false",
)
}
}

plugins {
robotServerPlugin()
}
}
}
}
20 changes: 9 additions & 11 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,24 @@ pluginGroup = com.jfrog.conan.clion
pluginName = Conan
pluginRepositoryUrl = https://github.com/conan-io/conan-clion-plugin/
# SemVer format -> https://semver.org
pluginVersion = 2.0.6
pluginVersion = 2.0.7

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 223
pluginUntilBuild = 242.*
pluginSinceBuild = 233
pluginUntilBuild = 243.*

# IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension
platformType = CL
platformVersion = 2023.2
platformVersion = 2023.3.7

# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
# TODO: Check if needed. Will need com.intellij.clion at least for CLion
platformPlugins = com.intellij.clion
# Example: platformPlugins = com.jetbrains.php:203.4449.22, org.intellij.scala:2023.3.27@EAP
platformPlugins =
# Example: platformBundledPlugins = com.intellij.java
platformBundledPlugins = com.intellij.clion

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 8.4
gradleVersion = 8.9

# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
kotlin.stdlib.default.dependency = false
Expand All @@ -30,6 +31,3 @@ org.gradle.configuration-cache = true

# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html
org.gradle.caching = true

# Enable Gradle Kotlin DSL Lazy Property Assignment -> https://docs.gradle.org/current/userguide/kotlin_dsl.html#kotdsl:assignment
systemProp.org.gradle.unsafe.kotlin.assignment = true
16 changes: 8 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
[versions]
# libraries
annotations = "24.0.1"
junit = "4.13.2"
kotlinxSerializationJson = "1.5.0"

# plugins
dokka = "1.8.10"
kotlin = "1.9.20"
changelog = "2.2.0"
gradleIntelliJPlugin = "1.16.0"
qodana = "0.1.13"
kover = "0.7.4"
changelog = "2.2.1"
intelliJPlatform = "2.0.1"
kotlin = "1.9.25"
kover = "0.8.3"
qodana = "2024.1.9"
serialization = "1.8.21"

[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }
kotlinxSerializationJson = { group = "org.jetbrains.kotlinx", name="kotlinx-serialization-json", version.ref = "kotlinxSerializationJson"}

[plugins]
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
gradleIntelliJPlugin = { id = "org.jetbrains.intellij", version.ref = "gradleIntelliJPlugin" }
intelliJPlatform = { id = "org.jetbrains.intellij.platform", version.ref = "intelliJPlatform" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
qodana = { id = "org.jetbrains.qodana", version.ref = "qodana" }
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit d307772

Please sign in to comment.