Skip to content

Commit db3f208

Browse files
committed
Compatibility with AS Ladybug
1 parent 5e69331 commit db3f208

7 files changed

+11
-33
lines changed

CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## [[Unreleased]]
44

5+
## [1.6.18] - 2024-08-18
6+
- Compatibility with AS Ladybug
7+
58
## [1.6.17] - 2024-07-22
69
- Fix regression in 1.6.16 that broke device selection in Android Studio Koala
710

@@ -208,7 +211,8 @@
208211
- Command to clear data
209212
- Command to clear data and restart
210213

211-
[Unreleased]: https://github.com/pbreault/adb-idea/compare/1.6.17...HEAD
214+
[Unreleased]: https://github.com/pbreault/adb-idea/compare/1.6.18...HEAD
215+
[1.6.18]: https://github.com/pbreault/adb-idea/compare/1.6.17...1.6.18
212216
[1.6.17]: https://github.com/pbreault/adb-idea/compare/1.6.16...1.6.17
213217
[1.6.16]: https://github.com/pbreault/adb-idea/compare/1.6.15...1.6.16
214218
[1.6.15]: https://github.com/pbreault/adb-idea/compare/1.6.14...1.6.15

build.gradle.kts

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ plugins {
66
// Must match the Kotlin version bundled with the IDE
77
// https://plugins.jetbrains.com/docs/intellij/using-kotlin.html#kotlin-standard-library
88
// https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html
9-
id("org.jetbrains.kotlin.jvm") version "1.8.0"
9+
id("org.jetbrains.kotlin.jvm") version "1.9.24"
1010

1111
// https://github.com/JetBrains/intellij-platform-gradle-plugin
12-
id("org.jetbrains.intellij.platform") version "2.0.0-rc1"
12+
id("org.jetbrains.intellij.platform") version "2.0.1"
1313

1414
// https://github.com/ajoberstar/reckon
1515
id("org.ajoberstar.reckon") version "0.14.0"
@@ -35,6 +35,7 @@ intellijPlatform {
3535
group = "com.developerphil.intellij.plugin.adbidea"
3636
changeNotes.set(provider { recentChanges(HTML) })
3737
ideaVersion.sinceBuild.set(project.property("sinceBuild").toString())
38+
ideaVersion.untilBuild.set(provider { null })
3839
}
3940
buildSearchableOptions.set(false)
4041
instrumentCode = true
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
11
package com.developerphil.adbidea.action
22

33
import com.developerphil.adbidea.adb.AdbFacade
4-
import com.developerphil.adbidea.adb.AdbUtil
54
import com.intellij.openapi.actionSystem.AnActionEvent
65
import com.intellij.openapi.project.Project
76

87
class ClearDataAndRestartWithDebuggerAction : AdbAction() {
98
override fun actionPerformed(e: AnActionEvent, project: Project) = AdbFacade.clearDataAndRestartWithDebugger(project)
109

11-
override fun update(e: AnActionEvent) {
12-
e.presentation.isEnabled = AdbUtil.isDebuggingAvailable
13-
}
1410
}

src/main/kotlin/com/developerphil/adbidea/action/QuickListAction.kt

+3-5
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,9 @@ class QuickListAction : QuickSwitchSchemeAction(), DumbAware {
2323
addAction("com.developerphil.adbidea.action.ClearDataAction", group)
2424
addAction("com.developerphil.adbidea.action.ClearDataAndRestartAction", group)
2525
addAction("com.developerphil.adbidea.action.RevokePermissionsAction", group)
26-
if (AdbUtil.isDebuggingAvailable) {
27-
group.addSeparator()
28-
addAction("com.developerphil.adbidea.action.StartWithDebuggerAction", group)
29-
addAction("com.developerphil.adbidea.action.RestartWithDebuggerAction", group)
30-
}
26+
group.addSeparator()
27+
addAction("com.developerphil.adbidea.action.StartWithDebuggerAction", group)
28+
addAction("com.developerphil.adbidea.action.RestartWithDebuggerAction", group)
3129
}
3230

3331

Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
package com.developerphil.adbidea.action
22

33
import com.developerphil.adbidea.adb.AdbFacade
4-
import com.developerphil.adbidea.adb.AdbUtil
54
import com.intellij.openapi.actionSystem.AnActionEvent
65
import com.intellij.openapi.project.Project
76

87
class RestartWithDebuggerAction : AdbAction() {
98
override fun actionPerformed(e: AnActionEvent, project: Project) = AdbFacade.restartDefaultActivityWithDebugger(project)
10-
11-
override fun update(e: AnActionEvent) {
12-
e.presentation.isEnabled = AdbUtil.isDebuggingAvailable
13-
}
149
}
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
package com.developerphil.adbidea.action
22

33
import com.developerphil.adbidea.adb.AdbFacade
4-
import com.developerphil.adbidea.adb.AdbUtil
54
import com.intellij.openapi.actionSystem.AnActionEvent
65
import com.intellij.openapi.project.Project
76

87
class StartWithDebuggerAction : AdbAction() {
98
override fun actionPerformed(e: AnActionEvent, project: Project) = AdbFacade.startDefaultActivityWithDebugger(project)
10-
11-
override fun update(e: AnActionEvent) {
12-
e.presentation.isEnabled = AdbUtil.isDebuggingAvailable
13-
}
149
}

src/main/kotlin/com/developerphil/adbidea/adb/AdbUtil.kt

-11
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,6 @@ object AdbUtil {
2424
return receiver.adbOutputLines.isNotEmpty()
2525
}
2626

27-
// The android debugger class is not available in Intellij 2016.1.
28-
// Nobody should use that version but it's still the minimum "supported" version since android studio 2.2
29-
// shares the same base version.
30-
val isDebuggingAvailable: Boolean
31-
get() = try {
32-
Reflect.on("com.android.tools.idea.execution.common.debug.AndroidDebugger").get<Any>()
33-
true
34-
} catch (e: Exception) {
35-
false
36-
}
37-
3827
fun isGradleSyncInProgress(project: Project): Boolean {
3928
return try {
4029
GradleSyncState.getInstance(project).isSyncInProgress

0 commit comments

Comments
 (0)