mirror of
				https://hub.gitmirror.com/https://github.com/gradle/actions.git
				synced 2025-10-30 01:20:05 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			23 lines
		
	
	
		
			577 B
		
	
	
	
		
			Groovy
		
	
	
	
	
	
			
		
		
	
	
			23 lines
		
	
	
		
			577 B
		
	
	
	
		
			Groovy
		
	
	
	
	
	
| plugins {
 | |
|     id 'java'
 | |
| }
 | |
| 
 | |
| repositories {
 | |
|     mavenCentral()
 | |
| }
 | |
| 
 | |
| dependencies {
 | |
|     testImplementation('junit:junit:4.12')
 | |
| }
 | |
| 
 | |
| tasks.named("test").configure {
 | |
|     // Use an environment variable to bypass config-cache checks
 | |
|     if (System.getenv('VERIFY_CACHED_CONFIGURATION') != null) {
 | |
|         throw new RuntimeException("Configuration was not cached: unexpected configuration of test task")
 | |
|     }
 | |
|     doLast {
 | |
|         if (System.properties.verifyCachedBuild) {
 | |
|             throw new RuntimeException("Build was not cached: unexpected execution of test task")
 | |
|         }
 | |
|     }
 | |
| } | 
