y9-build-logic/y9plugins/build.gradle

52 lines
1.2 KiB
Groovy

plugins {
id 'groovy-gradle-plugin'
id 'com.gradle.plugin-publish' version '1.3.0'
}
repositories {
// Use Maven Central for resolving dependencies.
mavenCentral()
}
testing {
suites {
// Configure the built-in test suite
test {
// Use JUnit Jupiter test framework
useJUnitJupiter('5.10.3')
}
// Create a new test suite
functionalTest(JvmTestSuite) {
dependencies {
// functionalTest test suite depends on the production code in tests
implementation project()
}
targets {
all {
// This test suite should run after the built-in test suite has run its tests
testTask.configure { shouldRunAfter(test) }
}
}
}
}
}
gradlePlugin {
// Define the plugin
plugins {
greeting {
id = 'org.example.greeting'
implementationClass = 'org.example.Y9BuildLogicPlugin'
}
}
}
gradlePlugin.testSourceSets.add(sourceSets.functionalTest)
tasks.named('check') {
// Include functionalTest as part of the check lifecycle
dependsOn(testing.suites.functionalTest)
}