task run(type:JavaExec){
    //执行类在工程中的的路径
    main = 'mainPackage.mainClass'
    //所需要包含的包,sourceSets.main.runtimeClasspath的值为sourceSets中设置main对象中包含的包路径
    classpath = sourceSets.main.runtimeClasspath
}