Skip to content

Commit

Permalink
Merge branch 'pull/1'
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/main/resources/META-INF/plugin.xml
  • Loading branch information
longforus committed Apr 3, 2019
2 parents c144f34 + 25c669d commit 376071b
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 90 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ buildscript {
}

plugins {
id "org.jetbrains.intellij" version "0.2.15"
id "org.jetbrains.intellij" version "0.4.2"
}

sourceCompatibility = 1.8
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.developerphil.adbidea.compatibility

import com.android.ddmlib.IDevice
import com.android.tools.idea.run.*
import org.jetbrains.android.facet.AndroidFacet
import org.joor.on
import org.joor.asType

class CanRunOnDeviceCompat(private val myFacet: AndroidFacet, device: IDevice) : BackwardCompatibleGetter<LaunchCompatibility>() {

private val androidDevice = ConnectedAndroidDevice(device, null)

override// Android Studio 3.4+
fun getCurrentImplementation() = on<LaunchCompatibilityCheckerImpl>()
.call("create", myFacet, null, null)
.asType<LaunchCompatibilityChecker>()
.validate(androidDevice)

override// Android Studio 3.3 & Intellij 2018.3
fun getPreviousImplementation() = on<LaunchCompatibilityCheckerImpl>()
.call("create", myFacet)
.asType<LaunchCompatibilityChecker>()
.validate(androidDevice)
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ public Object getValueAt(int rowIndex, int columnIndex) {
case DEVICE_STATE_COLUMN_INDEX:
return getDeviceState(device);
case COMPATIBILITY_COLUMN_INDEX:
return new CanRunOnDeviceCompat(myFacet, myMinSdkVersion, myProjectTarget, myRequiredHardwareFeatures, device).get();
return new CanRunOnDeviceCompat(myFacet, device).get();
}
return null;
}
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/org/joor/ReflectKt.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package org.joor

inline fun <reified T> on() = Reflect.on(T::class.java)
inline fun <reified T> Reflect.asType() = this.`as`(T::class.java)
16 changes: 9 additions & 7 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<idea-plugin url="https://github.com/pbreault/adb-idea">
<id>com.developerphil.adbidea</id>
<name>ADB Idea</name>
<version>1.6.2</version>
<version>1.6.3</version>
<vendor url="http://www.developerphil.com">Philippe Breault</vendor>

<description><![CDATA[
Expand Down Expand Up @@ -34,6 +34,10 @@


<change-notes><![CDATA[
<b>1.6.3</b>
<ul>
<li>BUGFIX: Show all connected devices on Android Studio 3.4+</li>
</ul>
<b>1.6.2</b>
<ul>
<li>add set default module function, After setting the default module under the same project, all operations will use the default module, and no longer pop up the module selection dialog</li>
Expand All @@ -54,7 +58,6 @@
<li>ADB Record device screen</li>
<li>ADB Capture device screen</li>
</ul>
</ul>
<b>1.5.2</b>
<ul>
<li>BUGFIX: Show the name of the devices in addition to the serial number when multiple devices are connected</li>
Expand Down Expand Up @@ -141,12 +144,11 @@
<li>Now support projects with more than one application module</li>
</ul>
]]>
</change-notes>
</change-notes>

<!-- Android Studio 3.0 -->
<!-- see http://tools.android.com/build/studio/idea-tags -->
<!-- see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html -->
<idea-version since-build="173"/>
<!-- Android Studio 3.3+ -->
<!-- see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html -->
<idea-version since-build="182"/>

<depends>com.intellij.modules.platform</depends>
<depends>org.jetbrains.android</depends>
Expand Down

0 comments on commit 376071b

Please sign in to comment.