Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntelliJ plugin 0.1.5 #613

Merged
merged 3 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions android/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ flipper = "0.93.0"
gjf = "1.16.0"
gradle-android-plugin = "7.4.2"
gradle-errorprone-plugin = "1.3.0"
gradle-intellij-plugin = "1.13.1"
gradle-intellij-plugin = "1.15.0"
gradle-maven-publish-plugin = "0.25.2"
gradle-nullaway-plugin = "1.0.2"
gradle-spotless-plugin = "6.18.0"
gson = "2.8.7"
guava-android = "27.1-android"
guava-jre = "27.1-jre"
intellij = "2022.2.4"
intellij = "2023.2"
javapoet = "1.11.1"
jsr250 = "1.0"
junit = "4.12"
Expand Down
2 changes: 1 addition & 1 deletion android/libraries/rib-compiler-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ plugins {
}

dependencies {
implementation(project(":libraries:rib-compiler-app"))
api(project(":libraries:rib-compiler-app"))
implementation(libs.javapoet)

compileOnly(libs.annotation)
Expand Down
41 changes: 15 additions & 26 deletions android/tooling/rib-intellij-plugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,27 @@ repositories {
mavenCentral()
}

dependencies {
intellij {
plugins = ['java', 'Kotlin', 'android']
version = libs.versions.intellij
pluginName = "uber-ribs"
updateSinceUntilBuild = false
sandboxDir = "${project.gradle.gradleHomeDir}/caches/intellij"
downloadSources = false
}

testImplementation(project(":libraries:rib-base")) {
transitive = false
}
compileOnly(project(path: ":libraries:rib-android", configuration: 'default')) {
transitive = false
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}

testImplementation(project(":libraries:rib-test")) {
transitive = false
}
testImplementation(project(":libraries:rib-compiler-app")) {
transitive = false
}
testImplementation(project(":libraries:rib-compiler-test")) {
transitive = false
}
dependencies {
testImplementation(project(":libraries:rib-test"))
testImplementation(project(":libraries:rib-compiler-test"))
testImplementation(libs.dagger.compiler)
testImplementation(libs.javax.inject)
testImplementation(libs.dagger.library)
testImplementation(libs.autodispose.library)
testImplementation(libs.autodispose.lifecycle)
testImplementation(testLibs.truth)
testImplementation(testLibs.compileTesting)
testImplementation(testLibs.mockito)
Expand All @@ -54,14 +52,6 @@ def isReleaseBuild() {
ext.pluginXml = new XmlSlurper().parse(file("src/main/resources/META-INF/plugin.xml"))
version = pluginXml.version

intellij {
plugins = ['java', 'Kotlin', 'android']
version = libs.versions.intellij
pluginName = "uber-ribs"
updateSinceUntilBuild = false
sandboxDir = "${project.gradle.gradleHomeDir}/caches/intellij"
downloadSources = false
}

task sourcesJar(type: Jar, dependsOn: classes) {
archiveClassifier = "sources"
Expand All @@ -73,5 +63,4 @@ afterEvaluate {
archives sourcesJar
archives project.tasks.getByName("buildPlugin")
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
* Copyright (C) 2023. Uber Technologies
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.uber.intellij.plugin.android.rib

import com.intellij.openapi.util.IconLoader
import javax.swing.Icon

public object RibIcons {
@JvmField public val RibIcon: Icon = IconLoader.getIcon("/icons/rib.png", javaClass)
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import com.intellij.openapi.progress.ProgressManager
import com.intellij.openapi.progress.Task
import com.intellij.openapi.project.DumbService
import com.intellij.openapi.project.Project
import com.intellij.openapi.util.IconLoader
import com.intellij.openapi.wm.ToolWindow
import com.intellij.openapi.wm.ToolWindowAnchor
import com.intellij.openapi.wm.ToolWindowManager
Expand Down Expand Up @@ -216,7 +215,7 @@ public class RibProjectService(public val project: Project) :
if (toolWindowManager.getToolWindow(TOOL_WINDOW_ID) == null) {
val toolWindow: ToolWindow =
toolWindowManager.registerToolWindow(TOOL_WINDOW_ID, true, ToolWindowAnchor.RIGHT)
toolWindow.setIcon(IconLoader.getIcon("/icons/rib.png"))
toolWindow.setIcon(RibIcons.RibIcon)
toolWindow.title = TOOL_WINDOW_TITLE

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

private fun createRibContent(toolWindow: ToolWindow): Content {
val content = ContentFactory.SERVICE.getInstance().createContent(ribPanel, TAB_NAME_RIBS, true)
val content = ContentFactory.getInstance().createContent(ribPanel, TAB_NAME_RIBS, true)
content.isCloseable = false
toolWindow.contentManager.addContent(content)
return content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,10 @@ public abstract class HierarchyBrowserBase(
) : HierarchyBrowserBaseEx(project, rootElement) {

override fun doRefresh(currentBuilderOnly: Boolean) {
super.doRefresh(currentBuilderOnly)
ApplicationManager.getApplication().invokeLater {
super.doRefresh(currentBuilderOnly)
ApplicationManager.getApplication().invokeLater {
expandAll()
onRefreshComplete()
}
expandAll()
onRefreshComplete()
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<idea-plugin version="2">
<id>com.uber.rib.intellij-plugin</id>
<name>RIBs</name>
<version>0.1.4</version>
<version>0.1.5</version>
<vendor>
Uber Mobile Platform Team
</vendor>
Expand All @@ -17,7 +17,7 @@
<change-notes><![CDATA[
<strong>0.1.5</strong><br/>
<ul>
<li>IntelliJ 2022.3 compatibility</li>
<li>IntelliJ 2023.2 compatibility</li>
</ul>
<strong>0.1.4</strong><br/>
<ul>
Expand All @@ -39,7 +39,7 @@
<depends>com.intellij.java</depends>
<depends>org.jetbrains.android</depends>

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

<extensions defaultExtensionNs="com.intellij">
<backgroundPostStartupActivity implementation="com.uber.intellij.plugin.android.rib.AttachRibProjectServiceActivity"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public class RibGeneratorsTest {
private static final String TEST_RIBLET_NAME = "TestRib";

@Test
@Ignore("https://github.com/JetBrains/gradle-intellij-plugin/issues/1452")
public void ribGenerators_shouldGenerateClassesThatCompiler() {
testWithGenerators(
Generators.getGeneratorsForRibWithoutPresenterAndView(
Expand Down
Loading