Skip to content

Commit b51efcc

Browse files
authored
Merge pull request #12 from dmitrish/develop
develop
2 parents 80a317c + cf27907 commit b51efcc

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

build.gradle.kts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import org.jetbrains.changelog.Changelog
22
import org.jetbrains.changelog.markdownToHTML
33
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
4+
import java.io.File
45

56
plugins {
67
id("java") // Java support
@@ -36,15 +37,16 @@ dependencies {
3637

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

42-
if (isCI) {
43-
// CI: Download Android Studio
44-
androidStudio(providers.gradleProperty("platformVersion"))
44+
if (localAndroidStudio.exists()) {
45+
// Local development: Use installed Android Studio
46+
local(localAndroidStudioPath)
4547
} else {
46-
// Local: Use installed Android Studio
47-
local("/Applications/Android Studio.app") // macOS path
48+
// CI/Qodana: Download Android Studio
49+
androidStudio(providers.gradleProperty("platformVersion"))
4850
}
4951

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

0 commit comments

Comments
 (0)