Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.markdownToHTML
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
import java.io.File

plugins {
id("java") // Java support
Expand Down Expand Up @@ -36,15 +37,16 @@ dependencies {

// IntelliJ Platform Gradle Plugin Dependencies Extension - read more: https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
intellijPlatform {
// Use different IDE configuration for CI vs local development
val isCI = System.getenv("CI") != null
// Use local Android Studio if it exists, otherwise download
val localAndroidStudioPath = "/Applications/Android Studio.app"
val localAndroidStudio = File(localAndroidStudioPath)

if (isCI) {
// CI: Download Android Studio
androidStudio(providers.gradleProperty("platformVersion"))
if (localAndroidStudio.exists()) {
// Local development: Use installed Android Studio
local(localAndroidStudioPath)
} else {
// Local: Use installed Android Studio
local("/Applications/Android Studio.app") // macOS path
// CI/Qodana: Download Android Studio
androidStudio(providers.gradleProperty("platformVersion"))
}

// Plugin Dependencies. Uses `platformBundledPlugins` property from the gradle.properties file for bundled IntelliJ Platform plugins.
Expand Down
Loading