Skip to content

Commit a65d487

Browse files
EgorkaKulikovdenis-fokin
andauthoredOct 10, 2022
Support Android Studio in utbot-intellij (#1121)
* Enable android support in kts * Get rid of AS. Use the path only * Better naming * Corrected comment * Commented Android Studio for other users Co-authored-by: Denis Fokin <[email protected]>
1 parent dc586fa commit a65d487

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed
 

‎gradle.properties

+5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
kotlin.code.style=official
22

33
# IU, IC, PC, PY, WS...
4+
# IC for AndroidStudio
45
ideType=IC
56

7+
# In order to run Android Studion instead of Intellij Community,
8+
# specify the path to your Android Studio installation
9+
//androidStudioPath=D:/AS2021
10+
611
pythonCommunityPluginVersion=222.4167.37
712
#Version numbers: https://plugins.jetbrains.com/plugin/631-python/versions
813
pythonUltimatePluginVersion=222.4167.37

‎utbot-intellij/build.gradle.kts

+9-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ val pythonUltimatePluginVersion: String? by rootProject
88
val sootCommitHash: String? by rootProject
99
val kryoVersion: String? by rootProject
1010
val semVer: String? by rootProject
11+
val androidStudioPath: String? by rootProject
12+
13+
// https://plugins.jetbrains.com/docs/intellij/android-studio.html#configuring-the-plugin-pluginxml-file
14+
val ideTypeOrAndroidStudio = if (androidStudioPath == null) ideType else "IC"
1115

1216
plugins {
1317
id("org.jetbrains.intellij") version "1.7.0"
@@ -17,11 +21,13 @@ intellij {
1721

1822
val androidPlugins = listOf("org.jetbrains.android")
1923

20-
val jvmPlugins = listOf(
24+
val jvmPlugins = mutableListOf(
2125
"java",
2226
"org.jetbrains.kotlin:222-1.7.20-release-201-IJ4167.29"
2327
)
2428

29+
androidStudioPath?.let { jvmPlugins += androidPlugins }
30+
2531
val pythonCommunityPlugins = listOf(
2632
"PythonCore:${pythonCommunityPluginVersion}"
2733
)
@@ -45,7 +51,7 @@ intellij {
4551
)
4652

4753
version.set("222.4167.29")
48-
type.set(ideType)
54+
type.set(ideTypeOrAndroidStudio)
4955
}
5056

5157
tasks {
@@ -64,6 +70,7 @@ tasks {
6470

6571
runIde {
6672
jvmArgs("-Xmx2048m")
73+
androidStudioPath?.let { ideDir.set(file(it)) }
6774
}
6875

6976
patchPluginXml {

0 commit comments

Comments
 (0)
Please sign in to comment.