Skip to content

6x68/kotlin-userscript-plugin

 
 

Repository files navigation

Gradle Kotlin userscript plugin

The goal of this Gradle plugin is to be able to create userscripts in Kotlin/JS.

Usage

See an example repo or follow the steps below.

In your build.gradle.kts, add this plugin:

plugins {
    id("dev.datamodel.userscript") version "0.1.0"
}

Use Gradle DSL to configure the generated userscript, for example:

userscript {
    name = "Kotlin userscript test"
    match("https://www.example.com/*", "http://*.example.com/*")
}

Version is inferred from Gradle module's version. Other supported properties: description. A detailed documentation of supported properties will follow.

The output is then generated using generateUserscript Gradle task and is placed in build/userscript/some-name.user.js. It's ready to be installed in the browser using e.g. Tampermonkey plugin.

About

Creating userscripts via Kotlin/JS.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Kotlin 100.0%