Skip to content

krzema12/gradle-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("it.krzeminski.kotlin-userscript") version "0.3.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 in Kotlin/JS.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages