mirror of
https://github.com/gradle/gradle-build-action.git
synced 2024-12-26 02:56:19 +08:00
3c3fdfcc0c
The `.github/workflows` directory has additional permissions attached, preventing these files from being by the Upgrade Gradle Wrapper plugin.
61 lines
1.7 KiB
Groovy
61 lines
1.7 KiB
Groovy
/*
|
|
* This file was generated by the Gradle 'init' task.
|
|
*
|
|
* This generated file contains a sample Gradle plugin project to get you started.
|
|
* For more details take a look at the Writing Custom Plugins chapter in the Gradle
|
|
* User Manual available at https://docs.gradle.org/7.3/userguide/custom_plugins.html
|
|
* This project uses @Incubating APIs which are subject to change.
|
|
*/
|
|
|
|
plugins {
|
|
// Apply the Java Gradle plugin development plugin to add support for developing Gradle plugins
|
|
id 'java-gradle-plugin'
|
|
}
|
|
|
|
repositories {
|
|
// Use Maven Central for resolving dependencies.
|
|
mavenCentral()
|
|
}
|
|
|
|
testing {
|
|
suites {
|
|
// Configure the built-in test suite
|
|
test {
|
|
// Use JUnit Jupiter test framework
|
|
useJUnitJupiter('5.7.2')
|
|
}
|
|
|
|
// 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.gradle.plugin.greeting'
|
|
implementationClass = 'org.example.gradle.plugin.GradlePluginPlugin'
|
|
}
|
|
}
|
|
}
|
|
|
|
gradlePlugin.testSourceSets(sourceSets.functionalTest)
|
|
|
|
tasks.named('check') {
|
|
// Include functionalTest as part of the check lifecycle
|
|
dependsOn(testing.suites.functionalTest)
|
|
}
|