How to execute any script from gradle plugin

(swathi) #1

I am unable to figureout how the plugin class’s Task would execute any script say a python script from the plugins resource folder not the projects folder.
Heres sample code

import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.tasks.Exec

class PluginX implements Plugin<Project> {
	void apply(Project project) {
	    project.task("executeScript", type: Exec) {
		 	workingDir './'
			commandLine 'python', ''

i guess its related to working dir of exec task which i am not getting. please help.