Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ private void registerEmptyDirectoryTasks(Project project) {
});

File pluginsDir = new File(project.getBuildDir(), "plugins-hack/plugins");
project.getExtensions().add("pluginsDir", pluginsDir);
project.getExtensions().getExtraProperties().set("pluginsDir", pluginsDir);
project.getTasks().register("createPluginsDir", EmptyDirTask.class, t -> {
t.setDir(pluginsDir);
t.setDirMode(0755);
});

File jvmOptionsDir = new File(project.getBuildDir(), "jvm-options-hack/jvm.options.d");
project.getExtensions().add("jvmOptionsDir", jvmOptionsDir);
project.getExtensions().getExtraProperties().set("jvmOptionsDir", jvmOptionsDir);
project.getTasks().register("createJvmOptionsDir", EmptyDirTask.class, t -> {
t.setDir(jvmOptionsDir);
t.setDirMode(0750);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ public TaskProvider<? extends Task> createTask(Project project) {
File checkstyleDir = new File(project.getBuildDir(), "checkstyle");
File checkstyleSuppressions = new File(checkstyleDir, "checkstyle_suppressions.xml");
File checkstyleConf = new File(checkstyleDir, "checkstyle.xml");
TaskProvider<Task> copyCheckstyleConf = project.getTasks().register("copyCheckstyleConf");

TaskProvider<CopyCheckStyleConfTask> copyCheckstyleConf = project.getTasks()
.register("copyCheckstyleConf", CopyCheckStyleConfTask.class);
// configure inputs and outputs so up to date works properly
copyCheckstyleConf.configure(t -> t.getOutputs().files(checkstyleSuppressions, checkstyleConf));
if ("jar".equals(checkstyleConfUrl.getProtocol())) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the "Elastic License
* 2.0", the "GNU Affero General Public License v3.0 only", and the "Server Side
* Public License v 1"; you may not use this file except in compliance with, at
* your election, the "Elastic License 2.0", the "GNU Affero General Public
* License v3.0 only", or the "Server Side Public License, v 1".
*/

package org.elasticsearch.gradle.internal.precommit;

import org.gradle.api.DefaultTask;
import org.gradle.api.file.FileSystemOperations;

import javax.inject.Inject;

public abstract class CopyCheckStyleConfTask extends DefaultTask {

@Inject
public abstract FileSystemOperations getFs();
}