File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import org.jetbrains.changelog.Changelog
22import org.jetbrains.changelog.markdownToHTML
33import org.jetbrains.intellij.platform.gradle.TestFrameworkType
4+ import java.io.File
45
56plugins {
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.
You can’t perform that action at this time.
0 commit comments