mirror of
				https://hub.gitmirror.com/https://github.com/gradle/actions.git
				synced 2025-10-29 00:50:07 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			41 lines
		
	
	
		
			809 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			809 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| plugins {
 | |
|     `java-gradle-plugin`
 | |
| }
 | |
| 
 | |
| repositories {
 | |
|     mavenCentral()
 | |
| }
 | |
| 
 | |
| testing {
 | |
|     suites {
 | |
|         val test by getting(JvmTestSuite::class) {
 | |
|             useJUnitJupiter()
 | |
|         }
 | |
| 
 | |
|         val functionalTest by registering(JvmTestSuite::class) {
 | |
|             dependencies {
 | |
|                 implementation(project())
 | |
|             }
 | |
| 
 | |
|             targets {
 | |
|                 all {
 | |
|                     testTask.configure { shouldRunAfter(test) } 
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
|     }
 | |
| }
 | |
| 
 | |
| gradlePlugin {
 | |
|     val greeting by plugins.creating {
 | |
|         id = "org.example.greeting"
 | |
|         implementationClass = "org.example.GradlePluginPlugin"
 | |
|     }
 | |
| }
 | |
| 
 | |
| gradlePlugin.testSourceSets.add(sourceSets["functionalTest"])
 | |
| 
 | |
| tasks.named<Task>("check") {
 | |
|     dependsOn(testing.suites.named("functionalTest"))
 | |
| }
 | 
