Getting started with Nokee plugins is simple and easy.

Method 1: Using PluginManagement block (preferred)

Using the Plugin Management block is the preferred way to get started. You will lower your maintenance cost when upgrading to a newer version, both released and nightly, as well as aligns all the plugin versions together for maximum compatibility. First, copy the following pluginManagement block to your settings script:

Example 1. Configuring Gradle plugin resolution
settings.gradle
pluginManagement {
   repositories {
      gradlePluginPortal()
      maven { url = uri('https://repo.nokee.dev/release') }
      maven { url = uri('https://repo.nokee.dev/snapshot') }
   }
   def nokeeVersion = '0.5.0-930919a0'
   resolutionStrategy {
      eachPlugin {
         if (requested.id.id.startsWith('dev.nokee.')) {
            useModule("${requested.id.id}:${requested.id.id}.gradle.plugin:${nokeeVersion}")
         }
      }
   }
}
settings.gradle.kts
pluginManagement {
   repositories {
      gradlePluginPortal()
      maven { url = uri("https://repo.nokee.dev/release") }
      maven { url = uri("https://repo.nokee.dev/snapshot") }
   }
   val nokeeVersion = "0.5.0-930919a0"
   resolutionStrategy {
      eachPlugin {
         if (requested.id.id.startsWith("dev.nokee.")) {
            useModule("${requested.id.id}:${requested.id.id}.gradle.plugin:${nokeeVersion}")
         }
      }
   }
}

Second, apply one of Nokee plugins to your build using the plugins DSL block:

Example 2. Apply Nokee plugin
build.gradle
plugins {
   id 'dev.nokee.jni-library'
}
build.gradle.kts
plugins {
   id("dev.nokee.jni-library")
}

Method 2: Using Plugin DSL with version

You can also apply one of Nokee plugins by pecifying the version inside the plugins block as shown in the following example. Because of the various limitation of the plugin DSL, it is strongly recommended to use the first method.

Example 3. Apply Nokee plugin with version
build.gradle
plugins {
   id 'dev.nokee.jni-library' version '0.5.0-930919a0'
}
build.gradle.kts
plugins {
   id("dev.nokee.jni-library") version '0.5.0-930919a0'
}