Skip to content

Commit

Permalink
Update icons for new UI and build system
Browse files Browse the repository at this point in the history
  • Loading branch information
halirutan committed Nov 12, 2023
1 parent 19fd6ef commit e6d882e
Show file tree
Hide file tree
Showing 20 changed files with 118 additions and 29 deletions.
10 changes: 7 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ fun properties(key: String) = providers.gradleProperty(key)
fun environment(key: String) = providers.environmentVariable(key)

plugins {
java
id("org.jetbrains.intellij") version "1.15.0"
id("org.jetbrains.changelog") version "2.1.2"
id("java") // Java support
alias(libs.plugins.gradleIntelliJPlugin) // Gradle IntelliJ Plugin
alias(libs.plugins.changelog) // Gradle Changelog Plugin
}

group = properties("pluginGroup").get()
Expand All @@ -17,6 +17,10 @@ repositories {
mavenCentral()
}

dependencies {
implementation(libs.annotations)
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
Expand Down
20 changes: 20 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[versions]
# libraries
annotations = "24.0.1"

# plugins
kotlin = "1.9.10"
changelog = "2.2.0"
gradleIntelliJPlugin = "1.16.0"
qodana = "0.1.13"
kover = "0.7.3"

[libraries]
annotations = { group = "org.jetbrains", name = "annotations", version.ref = "annotations" }

[plugins]
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
gradleIntelliJPlugin = { id = "org.jetbrains.intellij", version.ref = "gradleIntelliJPlugin" }
kotlin = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
qodana = { id = "org.jetbrains.qodana", version.ref = "qodana" }
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
8 changes: 8 additions & 0 deletions resources/KeyPromoterXIconMappings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"icons": {
"expui": {
"kpx.svg": "icons/kpx.svg",
"kpxToolwindow.svg": "icons/kpxToolwindow.svg"
}
}
}
3 changes: 2 additions & 1 deletion resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
<postStartupActivity implementation="de.halirutan.keypromoterx.KeyPromoterXStartupNotification"/>
<applicationService serviceImplementation="de.halirutan.keypromoterx.statistic.KeyPromoterStatistics"/>
<applicationService serviceImplementation="de.halirutan.keypromoterx.KeyPromoterSettings"/>
<toolWindow id="Key Promoter X" anchor="right" icon="/de/halirutan/keypromoterx/icons/kpxToolwindow.svg"
<iconMapper mappingFile="KeyPromoterXIconMappings.json"/>
<toolWindow id="Key Promoter X" anchor="right" icon="de.halirutan.keypromoterx.KeyPromoterIcons.KP_TOOL_WINDOW"
factoryClass="de.halirutan.keypromoterx.KeyPromoterToolWindowFactory"/>
<applicationConfigurable id="keyPromoterConfiguration" displayName="Key Promoter X"
instance="de.halirutan.keypromoterx.KeyPromoterConfiguration" groupId="tools"/>
Expand Down
10 changes: 0 additions & 10 deletions resources/de/halirutan/keypromoterx/icons/kpxToolwindow.svg

This file was deleted.

10 changes: 0 additions & 10 deletions resources/de/halirutan/keypromoterx/icons/kpxToolwindow_dark.svg

This file was deleted.

1 change: 1 addition & 0 deletions resources/icons/expui/icon-robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
skip: *
File renamed without changes
10 changes: 10 additions & 0 deletions resources/icons/expui/kpxToolwindow.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions resources/icons/expui/kpxToolwindow_dark.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
15 changes: 15 additions & 0 deletions resources/icons/kpx.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions resources/icons/kpxToolwindow.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions resources/icons/kpxToolwindow_dark.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions resources/icons/kpx_dark.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
plugins {
id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
}

rootProject.name = "Key Promoter X"
4 changes: 2 additions & 2 deletions src/de/halirutan/keypromoterx/KeyPromoterBundle.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@
public class KeyPromoterBundle {

@NonNls
private static final String PATH_TO_BUNDLE = "de.halirutan.keypromoterx.messages.KeyPromoterBundle";
private static final String PATH_TO_BUNDLE = "messages.KeyPromoterBundle";
private static Reference<ResourceBundle> ourBundle;

private KeyPromoterBundle() {
}

public static String message(@NotNull @PropertyKey(resourceBundle = "de.halirutan.keypromoterx.messages.KeyPromoterBundle") String key, @NotNull Object... params) {
public static String message(@NotNull @PropertyKey(resourceBundle = "messages.KeyPromoterBundle") String key, @NotNull Object... params) {
return AbstractBundle.message(getBundle(), key, params);
}

Expand Down
4 changes: 2 additions & 2 deletions src/de/halirutan/keypromoterx/KeyPromoterIcons.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* @author Patrick Scheibe.
*/
public interface KeyPromoterIcons {
Icon KP_ICON = IconLoader.getIcon("/de/halirutan/keypromoterx/icons/kpx.svg", KeyPromoterIcons.class);
Icon KP_ICON = IconLoader.getIcon("icons/kpx.svg", KeyPromoterIcons.class);
@SuppressWarnings("unused")
Icon KP_TOOL_WINDOW = IconLoader.getIcon("/de/halirutan/keypromoterx/icons/kpxToolwindow.svg", KeyPromoterIcons.class);
Icon KP_TOOL_WINDOW = IconLoader.getIcon("icons/kpxToolwindow.svg", KeyPromoterIcons.class);
}

0 comments on commit e6d882e

Please sign in to comment.