The Nokee team is excited to announce the first release that will kickstart the new wave of native development in Gradle.

Getting Started

To use the Nokee plugins in Gradle, simply copy the following code to the settings script of your project, then apply any of the Nokee plugins to your build using the plugins DSL block:

Example 1. Configuring Gradle plugin resolution
settings.gradle
pluginManagement {
   repositories {
      gradlePluginPortal()
      maven {
         url = uri('https://repo.nokee.dev/snapshot')
      }
   }
   def nokeeVersion = '0.1.0'
   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/snapshot")
      }
   }
   val nokeeVersion = "0.1.0"
   resolutionStrategy {
      eachPlugin {
         if (requested.id.id.startsWith("dev.nokee.")) {
            useModule("${requested.id.id}:${requested.id.id}.gradle.plugin:${nokeeVersion}")
         }
      }
   }
}

Java Native Interface (JNI) Libraries

The Nokee plugins let you build JNI libraries as a single project or by composing multiple projects together. The native component of the JNI library can be implemented in C or in C++. More implementation language support will follow in future releases. You can test your JNI library with JUnit as you would with any Java library. Finally, the native component of the JNI library can target different machines.

For more information on the JNI library plugin, read the reference chapter in the user manual.

The JNI Library plugin is limited to JDK 8+ for header generation; the previous JDK versions use javah. The target platforms are limited to the three major operating systems - e.g. Windows, macOS, Linux - and to the Intel architecture - e.g. x86 and x86_64. The implementation language of the native component for the JNI library is limited to C and C++. Finally, publishing the JNI libraries to binary repositories requires customization of your build script, see this sample to learn more. If any of those limitations are a deal-breaker, please open an issue so we can promptly resolve the issue for you.

Documentation

The documentation portal was also completed for this release which includes a getting started, plugin references, terminology and downloadable samples.

The documentation will keep getting better over time. If you have any suggestions for content, demonstrations, tutorials or general improvements, please open a new issue.

Infrastructure

This release prepared the infrastructure for the documentation portal to provide automated nightly releases of the plugins. It also rolled out a sample infrastructure to allow users to see how particular use cases are solved quickly. There is also an ongoing effort in providing appropriate coverage for a broad set of architectures, operating systems and toolchains. We are committed to quality and features will only be available if we have test coverage for them. For this commitment, we are extracting relevant parts from the Gradle codebase to ease our testing needs. You can follow this ongoing effort over on the Gradle Plugins Development repository.

Reporting Problems

If you find a problem with any of the plugins, please file a bug on GitHub Issues adhering to our issue guidelines. If you’re not sure you’re encountering a bug, please use the Gradle user forum or the Gradle Community Slack.

Let’s build happiness with Gradle, and I’m looking forward to your feedback via Twitter or on GitHub.