Debian Codegraph @

gradle-helper-plugin/src/main/java/org/debian/gradle/DebianTemporaryFileProvider.java

raw
1 /**
2 * Copyright 2015 Emmanuel Bourg
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.debian.gradle;
18
19 import java.io.File;
20
21 import org.gradle.api.internal.file.DefaultTemporaryFileProvider;
22 import org.gradle.internal.Factory;
23
24 /**
25 * Create temporary directories into the local .gradle directory using during the Debian build.
26 */
27 class DebianTemporaryFileProvider extends DefaultTemporaryFileProvider {
28
29 public DebianTemporaryFileProvider() {
30 super(new Factory<File>() {
31 @Override
32 public File create() {
33 File directory = new File(".gradle/tmp/");
34 directory.mkdirs();
35 return directory;
36 }
37
38 });
39 }
40 }