-
Notifications
You must be signed in to change notification settings - Fork 4.6k
/
RuntimeClasspathNormalization.java
91 lines (85 loc) · 2.8 KB
/
RuntimeClasspathNormalization.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/*
* Copyright 2017 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.gradle.normalization;
import org.gradle.api.Action;
import org.gradle.internal.HasInternalProtocol;
/**
* Configuration of runtime classpath normalization.
*
* <p>Several methods accept a file pattern to selectively normalize files. Patterns may include:</p>
*
* <ul>
*
* <li>'*' to match any number of characters
*
* <li>'?' to match any single character
*
* <li>'**' to match any number of directories or files
*
* </ul>
*
* <p>Either '/' or '\' may be used in a pattern to separate directories. Patterns ending with '/' or '\' will have '**'
* automatically appended.</p>
*
* <p>Examples:</p>
*
* <pre>
* all files ending with '.json' (including files in subdirectories)
* **/*.json
* </pre>
*
* <pre>
* all files beginning with 'build-' in the level1/level2 directory
* level1/level2/build-*
* </pre>
*
* <pre>
* all files (including subdirectories) beneath config/build-data
* config/build-data/
* </pre>
*
* <pre>
* all properties files in a build directory beneath com/acme (including subdirectories)
* com/acme/**/build/*.properties
* </pre>
*
* @since 4.0
*/
@HasInternalProtocol
public interface RuntimeClasspathNormalization extends InputNormalization {
/**
* Ignore resources in classpath entries matching {@code pattern}.
*/
void ignore(String pattern);
/**
* Normalize files matching {@code pattern} as properties files, ignoring comments and property order, applying the rules provided by {@code configuration}.
*
* @since 6.8
*/
void properties(String pattern, Action<? super PropertiesFileNormalization> configuration);
/**
* Normalize all properties files according to the rules provided by {@code configuration}. This is equivalent to calling {@link RuntimeClasspathNormalization#properties(String, Action)} with the '**/*.properties' pattern.
*
* @since 6.8
*/
void properties(Action<? super PropertiesFileNormalization> configuration);
/**
* Configures the normalization strategy for the {@code META-INF} directory in archives.
*
* @since 6.6
*/
void metaInf(Action<? super MetaInfNormalization> configuration);
}