Search Gradle plugins

nebula.test-jar

Create a testJar task to package up test classes and add it to the publications

https://github.com/nebula-plugins/nebula-publishing-plugin

Using the plugins DSL:

plugins {
  id "nebula.test-jar" version "12.0.4"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "com.netflix.nebula:nebula-publishing-plugin:12.0.4"
  }
}

apply plugin: "nebula.test-jar"

Using the plugins DSL:

plugins {
  id("nebula.test-jar") version "12.0.4"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }
  dependencies {
    classpath("com.netflix.nebula:nebula-publishing-plugin:12.0.4")
  }
}

apply(plugin = "nebula.test-jar")

Learn how to apply plugins to subprojects