Java 类org.gradle.api.tasks.wrapper.Wrapper 实例源码

项目:gradle-project-config    文件:ProjectConfigPlugin.java   
/**
 * Configure the wrapper task
 *
 * @param wrapper Wrapper task to configure
 * @param projectConfig Project configuration to get required Gradle version
 */
@Defaults
public void configureWrapperTask(@Each Wrapper wrapper, ProjectConfig projectConfig) {
    if (!Strings.isNullOrEmpty(projectConfig.getGradleVersion())) {
        wrapper.setGradleVersion(projectConfig.getGradleVersion());
    }
}
项目:Reer    文件:TaskConfiguration.java   
public static void configureWrapper(Wrapper wrapper) {
    wrapper.setGroup(GROUP);
    wrapper.setDescription("Generates Gradle wrapper files. [incubating]");
}
项目:Reer    文件:TaskConfiguration.java   
public static void createWrapperTask(Project project) {
    configureWrapper(project.getTasks().create("wrapper", Wrapper.class));
}
项目:Reer    文件:TaskConfiguration.java   
public static void addWrapperPlaceholder(ProjectInternal projectInternal) {
    if (projectInternal.getParent() == null) {
        projectInternal.getTasks().addPlaceholderAction("wrapper", Wrapper.class, new WrapperAction());
    }
}
项目:Reer    文件:TaskConfiguration.java   
@Override
public void execute(Wrapper wrapper) {
    configureWrapper(wrapper);
}