/idea-common

Utility library for developing JetBrains IDEA plugins

Primary LanguageKotlinApache License 2.0Apache-2.0

idea-common

IDEA version Test status

Common utility library for developing JetBrains IDEA plugins with Kotlin.

Packages

dev.mdklatt.idea.common.exec

CommandLine

Execute an external command-line process.

PosixCommandLine

Execute an external process with a POSIX command line.

WindowsCommandLine

Execute an external process with a Windows command line.

dev.mdklatt.idea.common.map

Extensions for the standard library Map class.

dev.mdklatt.idea.common.password

StoredPassword

Manage passwords in the system credential store.

ModalDialog

A modal dialog box to use as a password prompt.

Installation

Source Dependency

Gradle can install the library from source. However, there does not seem to be any support for pinning to a Git tag or commit hash yet. Beware of installing directly from GitHub because backwards compatibility is likely to break at some point. A safer option is to install from a local clone that is not automatically updated.

settings.gradle.kts

sourceControl {
    gitRepository(uri("https://github.com/mdklatt/idea-common.git")) {
        producesModule("dev.mdklatt:idea-common")
    }
}

build.gradle.kts

dependencies {
    implementation("dev.mdklatt:idea-common") {
        version {
            // Pointing to a tag or commit is not supported yet.
            branch = "main"  // default
        }
    }
}

JitPack

The JitPack service can be used to build the library on demand from GitHub. This allows a specific tag or commit ID to be requested instead of a branch.

build.gradle.kts

repositories {
    maven("https://jitpack.io")
}

dependencies {
    implementation("com.github.mdklatt:idea-common:<ref>")  // from JitPack
}

Maven Package

The goal is to use GitHub Packages to publish this library as Maven package. Unfortunately, authentication is required, even for public packages. At this time, only installation from source is supported.

build.gradle.kts

repositories { 
    mavenCentral()
    maven { 
        url = uri("https://maven.pkg.github.com/mdklatt/idea-common/")
    }
}

dependencies {
    implementation("dev.mdklatt:idea-common:<version>") 
}