Skip to content

Commit

Permalink
Merge branch 'main' into renovate/node-22.x
Browse files Browse the repository at this point in the history
  • Loading branch information
thelooter authored Nov 8, 2024
2 parents 7ec17e6 + 271521c commit 2e5d131
Show file tree
Hide file tree
Showing 25 changed files with 746 additions and 429 deletions.
13 changes: 0 additions & 13 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,6 @@ end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# go
[*.go]
indent_style = tab
indent_size = 4

# python
[*.{ini,py,py.tpl,rst,kt,kts}]
indent_size = 4

# rust
[*.rs]
indent_size = 4

# documentation, utils
[*.{md,mdx,diff}]
trim_trailing_whitespace = false
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ jobs:
- name: Generate Icons
run: pnpm build

- name: Build Plugin
- name: Check Formatting
run: ./gradlew checkFormatting

- name: Test & Build Plugin
run: ./gradlew buildPlugin

- name: Upload JAR(s)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
- name: Patch Changelog
run: ./gradlew patchChangelog

- name: Build Plugin
- name: Test & Build Plugin
run: ./gradlew buildPlugin

- name: Upload JAR
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ build/
!**/src/test/**/build/

### IntelliJ IDEA ###
.idea
.idea/*
.intellijPlatform
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/
!.idea/ktfmt.xml

### Eclipse ###
.apt_generated
Expand Down
7 changes: 7 additions & 0 deletions .idea/ktfmt.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 28 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,27 @@

### Changed

- Add code formatting with ktfmt
- Add tests

### Deprecated

### Removed

### Fixed

- Fixed K2 compatibility warning

### Security

## 1.10.0 - 2024-10-13

### Added

- Add icon for `.razor` files.
- Upgrade submodule `vscode-icons` from v1.16.0 to v1.17.0 (See [vscode-icons CHANGELOG.md](https://github.com/catppuccin/vscode-icons/blob/main/CHANGELOG.md#v1170) for added icons and associations)
- Upgrade submodule `vscode-icons` from v1.16.0 to v1.17.0 (
See [vscode-icons CHANGELOG.md](https://github.com/catppuccin/vscode-icons/blob/main/CHANGELOG.md#v1170) for added
icons and associations)

### Changed

Expand All @@ -37,10 +44,14 @@

### Fixed

- Fix plugin defect warnings by optionally loading Java icons ([#116](https://github.com/catppuccin/jetbrains-icons/pull/116))
- Visibility Icons for Java Files are not hidden anymore ([#116](https://github.com/catppuccin/jetbrains-icons/pull/116))
- Static Classes for Java files now have the appropriate Static Mark ([#116](https://github.com/catppuccin/jetbrains-icons/pull/116))
- Accurately apply `Exception` icon on all classes extending `Exception` and `Throwable` ([#116](https://github.com/catppuccin/jetbrains-icons/pull/116))
- Fix plugin defect warnings by optionally loading Java
icons ([#116](https://github.com/catppuccin/jetbrains-icons/pull/116))
- Visibility Icons for Java Files are not hidden
anymore ([#116](https://github.com/catppuccin/jetbrains-icons/pull/116))
- Static Classes for Java files now have the appropriate Static
Mark ([#116](https://github.com/catppuccin/jetbrains-icons/pull/116))
- Accurately apply `Exception` icon on all classes extending `Exception` and
`Throwable` ([#116](https://github.com/catppuccin/jetbrains-icons/pull/116))

## 1.8.0 - 2024-09-13

Expand All @@ -49,19 +60,24 @@
- Differentiate Java files (Annotation, Class, Enum, etc.) by colour and shape in the file tree. If you know how to
implement these icons in the rest of the user interface, please reach out to us via the issue tracker or the
Catppuccin discord!
- Upgrade submodule `vscode-icons` from v1.15.0 to v1.16.0 (See [vscode-icons CHANGELOG.md](https://github.com/catppuccin/vscode-icons/blob/main/CHANGELOG.md#v1160) for added icons and associations)
- Upgrade submodule `vscode-icons` from v1.15.0 to v1.16.0 (
See [vscode-icons CHANGELOG.md](https://github.com/catppuccin/vscode-icons/blob/main/CHANGELOG.md#v1160) for added
icons and associations)

## 1.7.0 - 2024-09-08

### Added

- Upgrade submodule `vscode-icons` from v1.13.0 to v1.15.0 (See [vscode-icons CHANGELOG.md](https://github.com/catppuccin/vscode-icons/blob/main/CHANGELOG.md#v1150) for added icons and associations)
- Upgrade submodule `vscode-icons` from v1.13.0 to v1.15.0 (
See [vscode-icons CHANGELOG.md](https://github.com/catppuccin/vscode-icons/blob/main/CHANGELOG.md#v1150) for added
icons and associations)

## 1.6.2 - 2024-08-13

### Fixed

- Make `org.jetbrains.kotlin` and `com.intellij.java` modules optional. This reintroduces support for IDEs outside IntelliJ, Android Studio & Aqua. ([#86](https://github.com/catppuccin/jetbrains-icons/pull/86))
- Make `org.jetbrains.kotlin` and `com.intellij.java` modules optional. This reintroduces support for IDEs outside
IntelliJ, Android Studio & Aqua. ([#86](https://github.com/catppuccin/jetbrains-icons/pull/86))

## 1.6.1 - 2024-08-09

Expand Down Expand Up @@ -102,8 +118,10 @@

- Different colors for Java filetypes (e.g. `Class`: Red, `Interface`: Green, `Record`: Mauve, `Enum`:
Yellow and `Annotation`: Green) ([#35](https://github.com/catppuccin/jetbrains-icons/pull/35))
- Ability to disable different colors for Java filetypes in settings panel. ([#35](https://github.com/catppuccin/jetbrains-icons/pull/35))
- Add Docker icon to all files with string `Dockerfile` (e.g. `dev.Dockerfile`) ([#32](https://github.com/catppuccin/jetbrains-icons/pull/32))
- Ability to disable different colors for Java filetypes in settings
panel. ([#35](https://github.com/catppuccin/jetbrains-icons/pull/35))
- Add Docker icon to all files with string `Dockerfile` (e.g.
`dev.Dockerfile`) ([#32](https://github.com/catppuccin/jetbrains-icons/pull/32))
- Add Dependency on the IntelliJ Java Module ([#40](https://github.com/catppuccin/jetbrains-icons/pull/40))

## 1.4.0 - 2024-02-27
Expand Down
179 changes: 101 additions & 78 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,110 +1,133 @@
import com.ncorti.ktfmt.gradle.tasks.KtfmtCheckTask
import org.jetbrains.changelog.Changelog
import org.jetbrains.changelog.date
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

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

plugins {
// Java support
id("java")
// Kotlin support
id("org.jetbrains.kotlin.jvm") version "2.0.21"
// Gradle IntelliJ Plugin
id("org.jetbrains.intellij.platform") version "2.1.0"
// Gradle Changelog Plugin
id("org.jetbrains.changelog") version "2.2.1"
// Java support
id("java")
// Kotlin support
id("org.jetbrains.kotlin.jvm") version "2.0.21"
// Gradle IntelliJ Plugin
id("org.jetbrains.intellij.platform") version "2.1.0"
// Gradle Changelog Plugin
id("org.jetbrains.changelog") version "2.2.1"

// Code Quality
// ktfmt
id("com.ncorti.ktfmt.gradle") version "0.21.0"
}

group = properties("pluginGroup")

version = properties("pluginVersion")

repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
mavenCentral()
intellijPlatform { defaultRepositories() }
}

dependencies {
intellijPlatform {
create(providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion"))
bundledPlugins(providers.gradleProperty("platformPlugins").map { it.split(',') })
instrumentationTools()
pluginVerifier()
}
intellijPlatform {
create(providers.gradleProperty("platformType"), providers.gradleProperty("platformVersion"))
bundledPlugins(providers.gradleProperty("platformPlugins").map { it.split(',') })
instrumentationTools()
pluginVerifier()
testFramework(TestFrameworkType.Platform)
testFramework(TestFrameworkType.Plugin.Java)
}

testImplementation(platform("org.junit:junit-bom:5.11.3"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher") {
because("Only needed to run tests in a version of IntelliJ IDEA that bundles older versions")
}
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine")
}

intellijPlatform {
pluginConfiguration {
id.set(properties("pluginGroup"))
name.set(properties("pluginName"))
version.set(properties("pluginVersion"))

changelog {
version.set(properties("pluginVersion"))
path.set(file("CHANGELOG.md").canonicalPath)
header.set(provider { "${version.get()} - ${date()}" })
headerParserRegex.set("""(\d\.\d+\.\d+)""".toRegex())
itemPrefix.set("-")
keepUnreleasedSection.set(true)
unreleasedTerm.set("[Unreleased]")
groups.set(listOf("Added", "Changed", "Deprecated", "Removed", "Fixed", "Security"))
}
pluginConfiguration {
id.set(properties("pluginGroup"))
name.set(properties("pluginName"))
version.set(properties("pluginVersion"))

changelog {
version.set(properties("pluginVersion"))
path.set(file("CHANGELOG.md").canonicalPath)
header.set(provider { "${version.get()} - ${date()}" })
headerParserRegex.set("""(\d\.\d+\.\d+)""".toRegex())
itemPrefix.set("-")
keepUnreleasedSection.set(true)
unreleasedTerm.set("[Unreleased]")
groups.set(listOf("Added", "Changed", "Deprecated", "Removed", "Fixed", "Security"))
}
}

pluginVerification {
ides {
recommended()
}
}
pluginVerification { ides { recommended() } }
}


tasks {
// Set the JVM compatibility versions
properties("javaVersion").let {
withType<JavaCompile> {
sourceCompatibility = it
targetCompatibility = it
}
withType<KotlinCompile> {
compilerOptions {
apiVersion = KotlinVersion.KOTLIN_1_8
jvmTarget = JvmTarget.fromTarget(properties("javaVersion"))
}
}
// Set the JVM compatibility versions
properties("javaVersion").let {
withType<JavaCompile> {
sourceCompatibility = it
targetCompatibility = it
}

wrapper {
gradleVersion = "8.10"
}

patchPluginXml {
pluginVersion.set(properties("pluginVersion"))
sinceBuild.set(properties("pluginSinceBuild"))
untilBuild.set(properties("pluginUntilBuild"))

// Get the latest available change notes from the changelog file
changeNotes.set(provider {
changelog.renderItem(changelog.getLatest(), Changelog.OutputType.HTML)
})
withType<KotlinCompile> {
compilerOptions {
apiVersion = KotlinVersion.KOTLIN_1_8
jvmTarget = JvmTarget.fromTarget(properties("javaVersion"))
}
}
}

wrapper { gradleVersion = "8.10.2" }

patchPluginXml {
pluginVersion.set(properties("pluginVersion"))
sinceBuild.set(properties("pluginSinceBuild"))
untilBuild.set(properties("pluginUntilBuild"))

// Get the latest available change notes from the changelog file
changeNotes.set(
provider { changelog.renderItem(changelog.getLatest(), Changelog.OutputType.HTML) }
)
}

test {
useJUnitPlatform()
testLogging { events("passed", "skipped", "failed") }
}

buildPlugin { dependsOn(test) }

signPlugin {
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
privateKey.set(System.getenv("PRIVATE_KEY"))
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
}

publishPlugin {
dependsOn("patchChangelog")
token.set(System.getenv("PUBLISH_TOKEN"))
channels.set(listOf("default"))
}
}

signPlugin {
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
privateKey.set(System.getenv("PRIVATE_KEY"))
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
}
tasks.buildSearchableOptions { enabled = false }

publishPlugin {
dependsOn("patchChangelog")
token.set(System.getenv("PUBLISH_TOKEN"))
channels.set(listOf("default"))
}
}
// Code quality settings
ktfmt { googleStyle() }

tasks.buildSearchableOptions {
enabled = false
// This is used over the "ktfmtCheck" task to exclude the autogenerated file Icons.kt.
tasks.register<KtfmtCheckTask>("checkFormatting") {
source = project.fileTree(rootDir)
include("**/*.kt")
exclude("src/main/kotlin/com/github/catppuccin/jetbrains_icons/Icons.kt")
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,6 @@ package com.github.catppuccin.jetbrains_icons

import com.github.catppuccin.jetbrains_icons.settings.PluginSettingsState

class IconPack {
val icons: Icons by lazy {
Icons(PluginSettingsState.instance.variant)
}

companion object {
val instance = IconPack()
}
object IconPack {
val icons: Icons by lazy { Icons(PluginSettingsState.instance.variant) }
}
Loading

0 comments on commit 2e5d131

Please sign in to comment.