org.gradle.normalization.RuntimeClasspathNormalization Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gradle-api Show documentation
Show all versions of gradle-api Show documentation
Gradle 6.9.1 API redistribution.
/*
* 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.
*
* Several methods accept a file pattern to selectively normalize files. Patterns may include:
*
*
*
* - '*' to match any number of characters
*
*
- '?' to match any single character
*
*
- '**' to match any number of directories or files
*
*
*
* Either '/' or '\' may be used in a pattern to separate directories. Patterns ending with '/' or '\' will have '**'
* automatically appended.
*
* Examples:
*
*
* all files ending with '.json' (including files in subdirectories)
* **/*.json
*
*
*
* all files beginning with 'build-' in the level1/level2 directory
* level1/level2/build-*
*
*
*
* all files (including subdirectories) beneath config/build-data
* config/build-data/
*
*
*
* all properties files in a build directory beneath com/acme (including subdirectories)
* com/acme/**/build/*.properties
*
*
* @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);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy