Skip to content

Commit 1b2927b

Browse files
authored
Merge pull request #613 from idanakav/plugin-0.1.5
IntelliJ plugin 0.1.5
2 parents be134db + 5896b25 commit 1b2927b

File tree

8 files changed

+50
-40
lines changed

8 files changed

+50
-40
lines changed

android/gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ flipper = "0.93.0"
2121
gjf = "1.16.0"
2222
gradle-android-plugin = "7.4.2"
2323
gradle-errorprone-plugin = "1.3.0"
24-
gradle-intellij-plugin = "1.13.1"
24+
gradle-intellij-plugin = "1.15.0"
2525
gradle-maven-publish-plugin = "0.25.2"
2626
gradle-nullaway-plugin = "1.0.2"
2727
gradle-spotless-plugin = "6.18.0"
2828
gson = "2.8.7"
2929
guava-android = "27.1-android"
3030
guava-jre = "27.1-jre"
31-
intellij = "2022.2.4"
31+
intellij = "2023.2"
3232
javapoet = "1.11.1"
3333
jsr250 = "1.0"
3434
junit = "4.12"

android/libraries/rib-compiler-test/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ plugins {
2323
}
2424

2525
dependencies {
26-
implementation(project(":libraries:rib-compiler-app"))
26+
api(project(":libraries:rib-compiler-app"))
2727
implementation(libs.javapoet)
2828

2929
compileOnly(libs.annotation)

android/tooling/rib-intellij-plugin/build.gradle

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,27 @@ repositories {
1111
mavenCentral()
1212
}
1313

14-
dependencies {
14+
intellij {
15+
plugins = ['java', 'Kotlin', 'android']
16+
version = libs.versions.intellij
17+
pluginName = "uber-ribs"
18+
updateSinceUntilBuild = false
19+
sandboxDir = "${project.gradle.gradleHomeDir}/caches/intellij"
20+
downloadSources = false
21+
}
1522

16-
testImplementation(project(":libraries:rib-base")) {
17-
transitive = false
18-
}
19-
compileOnly(project(path: ":libraries:rib-android", configuration: 'default')) {
20-
transitive = false
23+
java {
24+
toolchain {
25+
languageVersion.set(JavaLanguageVersion.of(17))
2126
}
27+
}
2228

23-
testImplementation(project(":libraries:rib-test")) {
24-
transitive = false
25-
}
26-
testImplementation(project(":libraries:rib-compiler-app")) {
27-
transitive = false
28-
}
29-
testImplementation(project(":libraries:rib-compiler-test")) {
30-
transitive = false
31-
}
29+
dependencies {
30+
testImplementation(project(":libraries:rib-test"))
31+
testImplementation(project(":libraries:rib-compiler-test"))
3232
testImplementation(libs.dagger.compiler)
3333
testImplementation(libs.javax.inject)
3434
testImplementation(libs.dagger.library)
35-
testImplementation(libs.autodispose.library)
36-
testImplementation(libs.autodispose.lifecycle)
3735
testImplementation(testLibs.truth)
3836
testImplementation(testLibs.compileTesting)
3937
testImplementation(testLibs.mockito)
@@ -54,14 +52,6 @@ def isReleaseBuild() {
5452
ext.pluginXml = new XmlSlurper().parse(file("src/main/resources/META-INF/plugin.xml"))
5553
version = pluginXml.version
5654

57-
intellij {
58-
plugins = ['java', 'Kotlin', 'android']
59-
version = libs.versions.intellij
60-
pluginName = "uber-ribs"
61-
updateSinceUntilBuild = false
62-
sandboxDir = "${project.gradle.gradleHomeDir}/caches/intellij"
63-
downloadSources = false
64-
}
6555

6656
task sourcesJar(type: Jar, dependsOn: classes) {
6757
archiveClassifier = "sources"
@@ -73,5 +63,4 @@ afterEvaluate {
7363
archives sourcesJar
7464
archives project.tasks.getByName("buildPlugin")
7565
}
76-
7766
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright (C) 2023. Uber Technologies
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
package com.uber.intellij.plugin.android.rib
17+
18+
import com.intellij.openapi.util.IconLoader
19+
import javax.swing.Icon
20+
21+
public object RibIcons {
22+
@JvmField public val RibIcon: Icon = IconLoader.getIcon("/icons/rib.png", javaClass)
23+
}

android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/RibProjectService.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import com.intellij.openapi.progress.ProgressManager
2828
import com.intellij.openapi.progress.Task
2929
import com.intellij.openapi.project.DumbService
3030
import com.intellij.openapi.project.Project
31-
import com.intellij.openapi.util.IconLoader
3231
import com.intellij.openapi.wm.ToolWindow
3332
import com.intellij.openapi.wm.ToolWindowAnchor
3433
import com.intellij.openapi.wm.ToolWindowManager
@@ -216,7 +215,7 @@ public class RibProjectService(public val project: Project) :
216215
if (toolWindowManager.getToolWindow(TOOL_WINDOW_ID) == null) {
217216
val toolWindow: ToolWindow =
218217
toolWindowManager.registerToolWindow(TOOL_WINDOW_ID, true, ToolWindowAnchor.RIGHT)
219-
toolWindow.setIcon(IconLoader.getIcon("/icons/rib.png"))
218+
toolWindow.setIcon(RibIcons.RibIcon)
220219
toolWindow.title = TOOL_WINDOW_TITLE
221220

222221
ribPanel = RibHierarchyPanel(project, model)
@@ -231,7 +230,7 @@ public class RibProjectService(public val project: Project) :
231230
}
232231

233232
private fun createRibContent(toolWindow: ToolWindow): Content {
234-
val content = ContentFactory.SERVICE.getInstance().createContent(ribPanel, TAB_NAME_RIBS, true)
233+
val content = ContentFactory.getInstance().createContent(ribPanel, TAB_NAME_RIBS, true)
235234
content.isCloseable = false
236235
toolWindow.contentManager.addContent(content)
237236
return content

android/tooling/rib-intellij-plugin/src/main/kotlin/com/uber/intellij/plugin/android/rib/ui/HierarchyBrowserBase.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,10 @@ public abstract class HierarchyBrowserBase(
4242
) : HierarchyBrowserBaseEx(project, rootElement) {
4343

4444
override fun doRefresh(currentBuilderOnly: Boolean) {
45+
super.doRefresh(currentBuilderOnly)
4546
ApplicationManager.getApplication().invokeLater {
46-
super.doRefresh(currentBuilderOnly)
47-
ApplicationManager.getApplication().invokeLater {
48-
expandAll()
49-
onRefreshComplete()
50-
}
47+
expandAll()
48+
onRefreshComplete()
5149
}
5250
}
5351

android/tooling/rib-intellij-plugin/src/main/resources/META-INF/plugin.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<idea-plugin version="2">
22
<id>com.uber.rib.intellij-plugin</id>
33
<name>RIBs</name>
4-
<version>0.1.4</version>
4+
<version>0.1.5</version>
55
<vendor>
66
Uber Mobile Platform Team
77
</vendor>
@@ -17,7 +17,7 @@
1717
<change-notes><![CDATA[
1818
<strong>0.1.5</strong><br/>
1919
<ul>
20-
<li>IntelliJ 2022.3 compatibility</li>
20+
<li>IntelliJ 2023.2 compatibility</li>
2121
</ul>
2222
<strong>0.1.4</strong><br/>
2323
<ul>
@@ -39,7 +39,7 @@
3939
<depends>com.intellij.java</depends>
4040
<depends>org.jetbrains.android</depends>
4141

42-
<idea-version since-build="213"/>
42+
<idea-version since-build="223"/>
4343

4444
<extensions defaultExtensionNs="com.intellij">
4545
<backgroundPostStartupActivity implementation="com.uber.intellij.plugin.android.rib.AttachRibProjectServiceActivity"/>

android/tooling/rib-intellij-plugin/src/test/java/com/uber/presidio/intellij_plugin/action/rib/RibGeneratorsTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public class RibGeneratorsTest {
3636
private static final String TEST_RIBLET_NAME = "TestRib";
3737

3838
@Test
39+
@Ignore("https://github.com/JetBrains/gradle-intellij-plugin/issues/1452")
3940
public void ribGenerators_shouldGenerateClassesThatCompiler() {
4041
testWithGenerators(
4142
Generators.getGeneratorsForRibWithoutPresenterAndView(

0 commit comments

Comments
 (0)