mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			505 B
		
	
	
	
		
			Groovy
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			505 B
		
	
	
	
		
			Groovy
		
	
	
	
	
	
| apply plugin: GreetingPlugin
 | |
| 
 | |
| greeting.message = 'Hi from Gradle'
 | |
| 
 | |
| class GreetingPlugin implements Plugin<Project> {
 | |
|     void apply(Project project) {
 | |
|         // Add the 'greeting' extension object
 | |
|         project.extensions.create("greeting", GreetingPluginExtension)
 | |
|         // Add a task that uses the configuration
 | |
|         project.task('hello') << {
 | |
|             println project.greeting.message
 | |
|         }
 | |
|     }
 | |
| }
 | |
| 
 | |
| class GreetingPluginExtension {
 | |
|     def String message = 'Hello from GreetingPlugin'
 | |
| }
 |