All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.gradle.normalization.RuntimeClasspathNormalization Maven / Gradle / Ivy

There is a newer version: 8.6
Show newest version
/*
 * 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.api.Incubating;
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 */ @Incubating void properties(String pattern, Action 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 */ @Incubating void properties(Action configuration); /** * Configures the normalization strategy for the {@code META-INF} directory in archives. * * @since 6.6 */ @Incubating void metaInf(Action configuration); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy