Skip to content

Commit

Permalink
Prepare Intellij plugin for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyTsvetkov committed Apr 15, 2021
1 parent e7e5b79 commit c5b93e8
Show file tree
Hide file tree
Showing 9 changed files with 211 additions and 13 deletions.
14 changes: 12 additions & 2 deletions idea-plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {

fun properties(key: String) = project.findProperty(key).toString()

group = "org.jetbrains.compose.desktop.ide.preview"
group = "org.jetbrains.compose.desktop.ide"
version = properties("deploy.version")

repositories {
Expand All @@ -18,7 +18,7 @@ repositories {
}

intellij {
pluginName = "Compose Desktop Preview"
pluginName = "Compose for Desktop IDE Support"
type = "IC"
downloadSources = true
updateSinceUntilBuild = true
Expand All @@ -31,6 +31,11 @@ intellij {
)
}

tasks.buildSearchableOptions {
// temporary workaround
enabled = false
}

tasks {
// Set the compatibility versions to 1.8
withType<JavaCompile> {
Expand All @@ -40,4 +45,9 @@ tasks {
withType<KotlinJvmCompile> {
kotlinOptions.jvmTarget = "1.8"
}

publishPlugin {
token(System.getenv("IDE_PLUGIN_PUBLISH_TOKEN"))
channels("Alpha")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.jetbrains.compose.desktop.idea.preview
package org.jetbrains.compose.desktop.ide.preview

import com.intellij.codeInspection.reference.EntryPoint
import com.intellij.codeInspection.reference.RefElement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file.
*/

package org.jetbrains.compose.desktop.idea.preview
package org.jetbrains.compose.desktop.ide.preview

import com.intellij.openapi.util.IconLoader

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE.txt file.
*/

package org.jetbrains.compose.desktop.idea.preview
package org.jetbrains.compose.desktop.ide.preview

internal object PreviewMessages {
fun runPreview(name: String): String = "Preview $name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.jetbrains.compose.desktop.idea.preview
package org.jetbrains.compose.desktop.ide.preview

import com.intellij.execution.actions.ConfigurationContext
import com.intellij.execution.actions.LazyRunConfigurationProducer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.jetbrains.compose.desktop.idea.preview
package org.jetbrains.compose.desktop.ide.preview

import com.intellij.execution.lineMarker.ExecutorAction
import com.intellij.execution.lineMarker.RunLineMarkerContributor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.jetbrains.compose.desktop.idea.preview
package org.jetbrains.compose.desktop.ide.preview

import com.intellij.psi.util.parentOfType
import org.jetbrains.kotlin.asJava.findFacadeClass
Expand Down
21 changes: 16 additions & 5 deletions idea-plugin/src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
<idea-plugin>
<id>org.jetbrains.compose.desktop.idea.preview</id>
<name>Compose Desktop Preview</name>
<id>org.jetbrains.compose.desktop.ide</id>
<name>Compose for Desktop IDE Support</name>
<vendor>JetBrains</vendor>
<description>
<![CDATA[
IDE support for developing
<a href="https://www.jetbrains.com/lp/compose/">Compose for Desktop</a>
applications.
The main feature at the moment is IDE preview of composable functions
marked by @Preview annotation.
]]>

</description>

<!-- Product and plugin compatibility requirements -->
<!-- https://plugins.jetbrains.com/docs/intellij/plugin-compatibility.html -->
<depends>com.intellij.modules.platform</depends>
<depends>com.intellij.modules.java</depends>
<depends>com.intellij.gradle</depends>
<depends>org.jetbrains.kotlin</depends>

<extensions defaultExtensionNs="com.intellij">
<runLineMarkerContributor
language="kotlin"
implementationClass="org.jetbrains.compose.desktop.idea.preview.PreviewRunLineMarkerContributor"/>
implementationClass="org.jetbrains.compose.desktop.ide.preview.PreviewRunLineMarkerContributor"/>
<runConfigurationProducer
implementation="org.jetbrains.compose.desktop.idea.preview.PreviewRunConfigurationProducer"/>
<deadCode implementation="org.jetbrains.compose.desktop.idea.preview.PreviewEntryPoint" />
implementation="org.jetbrains.compose.desktop.ide.preview.PreviewRunConfigurationProducer"/>
<deadCode implementation="org.jetbrains.compose.desktop.ide.preview.PreviewEntryPoint" />
</extensions>
</idea-plugin>
177 changes: 177 additions & 0 deletions idea-plugin/src/main/resources/META-INF/pluginIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c5b93e8

Please sign in to comment.