diff --git a/subprojects/base-services-groovy/src/main/java/org/gradle/api/InvalidActionClosureException.java b/subprojects/base-services-groovy/src/main/java/org/gradle/api/InvalidActionClosureException.java index f2f6a2b26fcec..c238709c31de0 100644 --- a/subprojects/base-services-groovy/src/main/java/org/gradle/api/InvalidActionClosureException.java +++ b/subprojects/base-services-groovy/src/main/java/org/gradle/api/InvalidActionClosureException.java @@ -18,7 +18,7 @@ import groovy.lang.Closure; import org.gradle.internal.Cast; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.List; diff --git a/subprojects/base-services-groovy/src/test/groovy/org/gradle/api/specs/AbstractCompositeSpecTest.java b/subprojects/base-services-groovy/src/test/groovy/org/gradle/api/specs/AbstractCompositeSpecTest.java index dde6164ac0658..5251041b1be34 100644 --- a/subprojects/base-services-groovy/src/test/groovy/org/gradle/api/specs/AbstractCompositeSpecTest.java +++ b/subprojects/base-services-groovy/src/test/groovy/org/gradle/api/specs/AbstractCompositeSpecTest.java @@ -15,7 +15,7 @@ */ package org.gradle.api.specs; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.junit.Assert; import org.junit.Before; import org.junit.Test; diff --git a/subprojects/base-services/src/main/java/org/gradle/internal/classpath/DefaultClassPath.java b/subprojects/base-services/src/main/java/org/gradle/internal/classpath/DefaultClassPath.java index 0ec6421f96bf0..106da8453cad7 100644 --- a/subprojects/base-services/src/main/java/org/gradle/internal/classpath/DefaultClassPath.java +++ b/subprojects/base-services/src/main/java/org/gradle/internal/classpath/DefaultClassPath.java @@ -20,7 +20,7 @@ import org.gradle.api.specs.Spec; import org.gradle.internal.Cast; import org.gradle.internal.UncheckedException; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.File; import java.io.Serializable; diff --git a/subprojects/base-services/src/main/java/org/gradle/internal/work/DefaultWorkerLeaseService.java b/subprojects/base-services/src/main/java/org/gradle/internal/work/DefaultWorkerLeaseService.java index 3e0a5867438c3..3f8447b16035c 100644 --- a/subprojects/base-services/src/main/java/org/gradle/internal/work/DefaultWorkerLeaseService.java +++ b/subprojects/base-services/src/main/java/org/gradle/internal/work/DefaultWorkerLeaseService.java @@ -38,7 +38,7 @@ import org.gradle.internal.resources.ResourceLockState; import org.gradle.internal.time.Time; import org.gradle.internal.time.Timer; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.Path; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/subprojects/base-services/src/main/java/org/gradle/util/CollectionUtils.java b/subprojects/base-services/src/main/java/org/gradle/util/CollectionUtils.java index a64bc1fe9d3df..19a64fabf343a 100644 --- a/subprojects/base-services/src/main/java/org/gradle/util/CollectionUtils.java +++ b/subprojects/base-services/src/main/java/org/gradle/util/CollectionUtils.java @@ -52,6 +52,15 @@ import static org.gradle.internal.Cast.castNullable; import static org.gradle.internal.Cast.uncheckedNonnullCast; +/** + * This class is only here to maintain binary compatibility with existing plugins. + *

+ * Plugins should prefer external collection frameworks over this class. + * Internally, all code should use {@link org.gradle.util.internal.CollectionUtils}. + * + * @deprecated Will be removed in Gradle 8.0. + */ +@Deprecated public abstract class CollectionUtils { /** diff --git a/subprojects/base-services/src/main/java/org/gradle/util/GFileUtils.java b/subprojects/base-services/src/main/java/org/gradle/util/GFileUtils.java index cdcda46d9165c..2b48afffc3603 100644 --- a/subprojects/base-services/src/main/java/org/gradle/util/GFileUtils.java +++ b/subprojects/base-services/src/main/java/org/gradle/util/GFileUtils.java @@ -20,6 +20,7 @@ import org.apache.commons.lang.StringUtils; import org.gradle.api.UncheckedIOException; import org.gradle.internal.IoActions; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.internal.LimitedDescription; import javax.annotation.Nullable; diff --git a/subprojects/base-services/src/main/java/org/gradle/util/GUtil.java b/subprojects/base-services/src/main/java/org/gradle/util/GUtil.java index d6d7e8a19292b..240986afe80b9 100644 --- a/subprojects/base-services/src/main/java/org/gradle/util/GUtil.java +++ b/subprojects/base-services/src/main/java/org/gradle/util/GUtil.java @@ -25,6 +25,7 @@ import org.gradle.internal.IoActions; import org.gradle.internal.UncheckedException; import org.gradle.internal.io.StreamByteBuffer; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.io.File; diff --git a/subprojects/base-services/src/main/java/org/gradle/util/internal/CollectionUtils.java b/subprojects/base-services/src/main/java/org/gradle/util/internal/CollectionUtils.java new file mode 100644 index 0000000000000..55ea5efc941d0 --- /dev/null +++ b/subprojects/base-services/src/main/java/org/gradle/util/internal/CollectionUtils.java @@ -0,0 +1,679 @@ +/* + * Copyright 2021 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.util.internal; + +import com.google.common.base.Joiner; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableListMultimap; +import com.google.common.collect.Iterables; +import com.google.common.collect.Lists; +import org.gradle.api.Action; +import org.gradle.api.Transformer; +import org.gradle.api.specs.Spec; +import org.gradle.internal.Factory; +import org.gradle.internal.Pair; +import org.gradle.internal.Transformers; + +import javax.annotation.Nullable; +import java.lang.reflect.Array; +import java.util.AbstractList; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Set; + +import static org.gradle.internal.Cast.cast; +import static org.gradle.internal.Cast.castNullable; +import static org.gradle.internal.Cast.uncheckedNonnullCast; + +public abstract class CollectionUtils { + + /** + * Returns null if the collection is empty otherwise expects a {@link #single(Iterable)} element to be found. + */ + @Nullable + public static T findSingle(Iterable source) { + return Iterables.isEmpty(source) ? null : single(source); + } + + /** + * Returns the single element in the collection or throws. + */ + public static T single(Iterable source) { + Iterator iterator = source.iterator(); + if (!iterator.hasNext()) { + throw new NoSuchElementException("Expecting collection with single element, got none."); + } + T element = iterator.next(); + if (iterator.hasNext()) { + throw new IllegalArgumentException("Expecting collection with single element, got multiple."); + } + return element; + } + + public static Collection checkedCast(Class type, Collection input) { + for (Object o : input) { + castNullable(type, o); + } + return uncheckedNonnullCast(input); + } + + @Nullable + public static T findFirst(Iterable source, Spec filter) { + for (T item : source) { + if (filter.isSatisfiedBy(item)) { + return item; + } + } + + return null; + } + + @Nullable + public static T findFirst(T[] source, Spec filter) { + for (T thing : source) { + if (filter.isSatisfiedBy(thing)) { + return thing; + } + } + + return null; + } + + public static T first(Iterable source) { + return source.iterator().next(); + } + + public static boolean any(Iterable source, Spec filter) { + return findFirst(source, filter) != null; + } + + public static boolean any(T[] source, Spec filter) { + return findFirst(source, filter) != null; + } + + public static Set filter(Set set, Spec filter) { + return filter(set, new LinkedHashSet(), filter); + } + + public static List filter(List list, Spec filter) { + return filter(list, Lists.newArrayListWithCapacity(list.size()), filter); + } + + public static List filter(T[] array, Spec filter) { + return filter(Arrays.asList(array), Lists.newArrayListWithCapacity(array.length), filter); + } + + + /** + * Returns a sorted copy of the provided collection of things. Uses the provided comparator to sort. + */ + public static List sort(Iterable things, Comparator comparator) { + List copy = toMutableList(things); + Collections.sort(copy, comparator); + return copy; + } + + /** + * Returns a sorted copy of the provided collection of things. Uses the natural ordering of the things. + */ + public static > List sort(Iterable things) { + List copy = toMutableList(things); + Collections.sort(copy); + return copy; + } + + public static > C filter(Iterable source, C destination, Spec filter) { + for (T item : source) { + if (filter.isSatisfiedBy(item)) { + destination.add(item); + } + } + return destination; + } + + public static Map filter(Map map, Spec> filter) { + return filter(map, new HashMap(), filter); + } + + public static Map filter(Map map, Map destination, Spec> filter) { + for (Map.Entry entry : map.entrySet()) { + if (filter.isSatisfiedBy(entry)) { + destination.put(entry.getKey(), entry.getValue()); + } + } + + return destination; + } + + public static R[] collectArray(I[] list, Class newType, Transformer transformer) { + @SuppressWarnings("unchecked") R[] destination = (R[]) Array.newInstance(newType, list.length); + return collectArray(list, destination, transformer); + } + + public static R[] collectArray(I[] list, R[] destination, Transformer transformer) { + assert list.length <= destination.length; + for (int i = 0; i < list.length; ++i) { + destination[i] = transformer.transform(list[i]); + } + return destination; + } + + public static List collect(I[] list, Transformer transformer) { + return collect(Arrays.asList(list), transformer); + } + + public static Set collect(Set set, Transformer transformer) { + return collect(set, new HashSet(set.size()), transformer); + } + + public static List collect(Iterable source, Transformer transformer) { + if (source instanceof Collection) { + Collection collection = uncheckedNonnullCast(source); + return collect(source, new ArrayList(collection.size()), transformer); + } else { + return collect(source, new LinkedList(), transformer); + } + } + + public static > C collect(Iterable source, C destination, Transformer transformer) { + for (I item : source) { + destination.add(transformer.transform(item)); + } + return destination; + } + + public static List toStringList(Iterable iterable) { + return collect(iterable, new LinkedList(), Transformers.asString()); + } + + /** + * Recursively unpacks all the given things into a flat list. + * + * Nulls are not removed, they are left intact. + * + * @param things The things to flatten + * @return A flattened list of the given things + */ + public static List flattenCollections(Object... things) { + return flattenCollections(Object.class, things); + } + + /** + * Recursively unpacks all the given things into a flat list, ensuring they are of a certain type. + * + * Nulls are not removed, they are left intact. + * + * If a non null object cannot be cast to the target type, a ClassCastException will be thrown. + * + * @param things The things to flatten + * @param The target type in the flattened list + * @return A flattened list of the given things + */ + public static List flattenCollections(Class type, Object... things) { + if (things == null) { + return Collections.singletonList(null); + } else if (things.length == 0) { + return Collections.emptyList(); + } else if (things.length == 1) { + Object thing = things[0]; + + if (thing == null) { + return Collections.singletonList(null); + } + + // Casts to Class below are to workaround Eclipse compiler bug + // See: https://github.com/gradle/gradle/pull/200 + + if (thing.getClass().isArray()) { + Object[] thingArray = (Object[]) thing; + List list = new ArrayList(thingArray.length); + for (Object thingThing : thingArray) { + list.addAll(flattenCollections(type, thingThing)); + } + return list; + } + + if (thing instanceof Collection) { + Collection collection = (Collection) thing; + List list = new ArrayList(); + for (Object element : collection) { + list.addAll(flattenCollections(type, element)); + } + return list; + } + + return Collections.singletonList(cast(type, thing)); + } else { + List list = new ArrayList(); + for (Object thing : things) { + list.addAll(flattenCollections(type, thing)); + } + return list; + } + } + + public static List toList(Iterable things) { + if (things instanceof List) { + @SuppressWarnings("unchecked") List castThings = (List) things; + return castThings; + } + return toMutableList(things); + } + + public static List toList(Enumeration things) { + AbstractList list = new ArrayList(); + while (things.hasMoreElements()) { + list.add(things.nextElement()); + } + return list; + } + + private static List toMutableList(Iterable things) { + if (things == null) { + return new ArrayList(0); + } + List list = new ArrayList(); + for (T thing : things) { + list.add(thing); + } + return list; + } + + + public static List intersection(Collection> availableValuesByDescriptor) { + List result = new ArrayList(); + Iterator> iterator = availableValuesByDescriptor.iterator(); + if (iterator.hasNext()) { + Collection firstSet = iterator.next(); + result.addAll(firstSet); + while (iterator.hasNext()) { + Collection next = iterator.next(); + result.retainAll(next); + } + } + return result; + + } + + public static List toList(T[] things) { + if (things == null || things.length == 0) { + return new ArrayList(0); + } + + List list = new ArrayList(things.length); + Collections.addAll(list, things); + return list; + } + + public static Set toSet(Iterable things) { + if (things == null) { + return new HashSet(0); + } + if (things instanceof Set) { + @SuppressWarnings("unchecked") Set castThings = (Set) things; + return castThings; + } + + Set set = new LinkedHashSet(); + for (T thing : things) { + set.add(thing); + } + return set; + } + + public static List compact(List list) { + boolean foundAtLeastOneNull = false; + List compacted = null; + int i = 0; + + for (E element : list) { + if (element == null) { + if (!foundAtLeastOneNull) { + compacted = new ArrayList(list.size()); + if (i > 0) { + compacted.addAll(list.subList(0, i)); + } + } + foundAtLeastOneNull = true; + } else if (foundAtLeastOneNull) { + compacted.add(element); + } + ++i; + } + + return foundAtLeastOneNull ? compacted : list; + } + + public static > C stringize(Iterable source, C destination) { + return collect(source, destination, Transformers.asString()); + } + + public static List stringize(Collection source) { + return stringize(source, new ArrayList(source.size())); + } + + public static boolean replace(List list, Spec filter, Transformer transformer) { + boolean replaced = false; + int i = 0; + for (E it : list) { + if (filter.isSatisfiedBy(it)) { + list.set(i, transformer.transform(it)); + replaced = true; + } + ++i; + } + return replaced; + } + + public static void collectMap(Map destination, Iterable items, Transformer keyGenerator) { + for (V item : items) { + destination.put(keyGenerator.transform(item), item); + } + } + + /** + * Given a set of values, derive a set of keys and return a map + */ + public static Map collectMap(Iterable items, Transformer keyGenerator) { + Map map = new LinkedHashMap(); + collectMap(map, items, keyGenerator); + return map; + } + + public static void collectMapValues(Map destination, Iterable keys, Transformer keyGenerator) { + for (K item : keys) { + destination.put(item, keyGenerator.transform(item)); + } + } + + /** + * Given a set of keys, derive a set of values and return a map + */ + public static Map collectMapValues(Iterable keys, Transformer keyGenerator) { + Map map = new LinkedHashMap(); + collectMapValues(map, keys, keyGenerator); + return map; + } + + public static boolean every(Iterable things, Spec predicate) { + for (T thing : things) { + if (!predicate.isSatisfiedBy(thing)) { + return false; + } + } + + return true; + } + + /** + * Utility for adding an iterable to a collection. + * + * @param t1 The collection to add to + * @param t2 The iterable to add each item of to the collection + * @param The element type of t1 + * @return t1 + */ + public static > C addAll(C t1, Iterable t2) { + for (T t : t2) { + t1.add(t); + } + return t1; + } + + /** + * Utility for adding an array to a collection. + * + * @param t1 The collection to add to + * @param t2 The iterable to add each item of to the collection + * @param The element type of t1 + * @return t1 + */ + public static > C addAll(C t1, T... t2) { + Collections.addAll(t1, t2); + return t1; + } + + /** + * The result of diffing two sets. + * + * @param The type of element the sets contain + * @see CollectionUtils#diffSetsBy(java.util.Set, java.util.Set, org.gradle.api.Transformer) + */ + public static class SetDiff { + public Set leftOnly = new HashSet(); + public Set> common = new HashSet>(); + public Set rightOnly = new HashSet(); + } + + /** + * Provides a “diff report” of how the two sets are similar and how they are different, comparing the entries by some aspect. + * + * The transformer is used to generate the value to use to compare the entries by. That is, the entries are not compared by equals by an attribute or characteristic. + * + * The transformer is expected to produce a unique value for each entry in a single set. Behaviour is undefined if this condition is not met. + * + * @param left The set on the “left” side of the comparison. + * @param right The set on the “right” side of the comparison. + * @param compareBy Provides the value to compare entries from either side by + * @param The type of the entry objects + * @return A representation of the difference + */ + public static SetDiff diffSetsBy(Set left, Set right, Transformer compareBy) { + if (left == null) { + throw new NullPointerException("'left' set is null"); + } + if (right == null) { + throw new NullPointerException("'right' set is null"); + } + + SetDiff setDiff = new SetDiff(); + + Map indexedLeft = collectMap(left, compareBy); + Map indexedRight = collectMap(right, compareBy); + + for (Map.Entry leftEntry : indexedLeft.entrySet()) { + T rightValue = indexedRight.remove(leftEntry.getKey()); + if (rightValue == null) { + setDiff.leftOnly.add(leftEntry.getValue()); + } else { + Pair pair = Pair.of(leftEntry.getValue(), rightValue); + setDiff.common.add(pair); + } + } + + for (T rightValue : indexedRight.values()) { + setDiff.rightOnly.add(rightValue); + } + + return setDiff; + } + + /** + * Creates a string with {@code toString()} of each object with the given separator. + * + *

+     * expect:
+     * join(",", new Object[]{"a"}) == "a"
+     * join(",", new Object[]{"a", "b", "c"}) == "a,b,c"
+     * join(",", new Object[]{}) == ""
+     * 
+ * + * The {@code separator} must not be null and {@code objects} must not be null. + * + * @param separator The string by which to join each string representation + * @param objects The objects to join the string representations of + * @return The joined string + */ + public static String join(String separator, Object[] objects) { + return join(separator, objects == null ? null : Arrays.asList(objects)); + } + + /** + * Creates a string with {@code toString()} of each object with the given separator. + * + *
+     * expect:
+     * join(",", ["a"]) == "a"
+     * join(",", ["a", "b", "c"]) == "a,b,c"
+     * join(",", []) == ""
+     * 
+ * + * The {@code separator} must not be null and {@code objects} must not be null. + * + * @param separator The string by which to join each string representation + * @param objects The objects to join the string representations of + * @return The joined string + */ + public static String join(String separator, Iterable objects) { + if (separator == null) { + throw new NullPointerException("The 'separator' cannot be null"); + } + if (objects == null) { + throw new NullPointerException("The 'objects' cannot be null"); + } + + StringBuilder string = new StringBuilder(); + Iterator iterator = objects.iterator(); + if (iterator.hasNext()) { + string.append(iterator.next().toString()); + while (iterator.hasNext()) { + string.append(separator); + string.append(iterator.next().toString()); + } + } + return string.toString(); + } + + /** + * Partition given Collection into a Pair of Collections. + * + *
Left
Collection containing entries that satisfy the given predicate + *
Right
Collection containing entries that do NOT satisfy the given predicate + */ + public static Pair, Collection> partition(Iterable items, Spec predicate) { + Preconditions.checkNotNull(items, "Cannot partition null Collection"); + Preconditions.checkNotNull(predicate, "Cannot apply null Spec when partitioning"); + + Collection left = new LinkedList(); + Collection right = new LinkedList(); + + for (T item : items) { + if (predicate.isSatisfiedBy(item)) { + left.add(item); + } else { + right.add(item); + } + } + + return Pair.of(left, right); + } + + public static class InjectionStep { + private final T target; + private final I item; + + public InjectionStep(T target, I item) { + this.target = target; + this.item = item; + } + + public T getTarget() { + return target; + } + + public I getItem() { + return item; + } + } + + public static T inject(T target, Iterable items, Action> action) { + if (target == null) { + throw new NullPointerException("The 'target' cannot be null"); + } + if (items == null) { + throw new NullPointerException("The 'items' cannot be null"); + } + if (action == null) { + throw new NullPointerException("The 'action' cannot be null"); + } + + for (I item : items) { + action.execute(new InjectionStep(target, item)); + } + return target; + } + + public static Map> groupBy(Iterable iterable, Transformer grouper) { + ImmutableListMultimap.Builder builder = ImmutableListMultimap.builder(); + + for (V element : iterable) { + K key = grouper.transform(element); + builder.put(key, element); + } + + return builder.build().asMap(); + } + + public static Iterable unpack(final Iterable> factories) { + return new Iterable() { + private final Iterator> delegate = factories.iterator(); + + @Override + public Iterator iterator() { + return new Iterator() { + @Override + public boolean hasNext() { + return delegate.hasNext(); + } + + @Override + public T next() { + return delegate.next().create(); + } + + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + }; + } + }; + } + + @Nullable + public static List nonEmptyOrNull(Iterable iterable) { + ImmutableList list = ImmutableList.copyOf(iterable); + return list.isEmpty() ? null : list; + } + + public static String asCommandLine(Iterable arguments) { + return Joiner.on(" ").join(collect(arguments, Transformers.asSafeCommandLineArgument())); + } +} diff --git a/subprojects/base-services/src/test/groovy/org/gradle/util/CollectionUtilsTest.groovy b/subprojects/base-services/src/test/groovy/org/gradle/util/internal/CollectionUtilsTest.groovy similarity index 87% rename from subprojects/base-services/src/test/groovy/org/gradle/util/CollectionUtilsTest.groovy rename to subprojects/base-services/src/test/groovy/org/gradle/util/internal/CollectionUtilsTest.groovy index 5dc8276026b2f..a7aba57f158f3 100644 --- a/subprojects/base-services/src/test/groovy/org/gradle/util/CollectionUtilsTest.groovy +++ b/subprojects/base-services/src/test/groovy/org/gradle/util/internal/CollectionUtilsTest.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2011 the original author or authors. + * Copyright 2021 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. @@ -13,34 +13,34 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.gradle.util +package org.gradle.util.internal import org.gradle.api.Transformer import spock.lang.Specification import spock.lang.Unroll -import static org.gradle.util.CollectionUtils.addAll -import static org.gradle.util.CollectionUtils.collect -import static org.gradle.util.CollectionUtils.collectMap -import static org.gradle.util.CollectionUtils.collectMapValues -import static org.gradle.util.CollectionUtils.compact -import static org.gradle.util.CollectionUtils.diffSetsBy -import static org.gradle.util.CollectionUtils.every -import static org.gradle.util.CollectionUtils.filter -import static org.gradle.util.CollectionUtils.flattenCollections -import static org.gradle.util.CollectionUtils.groupBy -import static org.gradle.util.CollectionUtils.inject -import static org.gradle.util.CollectionUtils.intersection -import static org.gradle.util.CollectionUtils.join -import static org.gradle.util.CollectionUtils.nonEmptyOrNull -import static org.gradle.util.CollectionUtils.partition -import static org.gradle.util.CollectionUtils.replace -import static org.gradle.util.CollectionUtils.sort -import static org.gradle.util.CollectionUtils.stringize -import static org.gradle.util.CollectionUtils.toList -import static org.gradle.util.CollectionUtils.toSet -import static org.gradle.util.CollectionUtils.toStringList -import static org.gradle.util.CollectionUtils.unpack +import static org.gradle.util.internal.CollectionUtils.addAll +import static org.gradle.util.internal.CollectionUtils.collect +import static org.gradle.util.internal.CollectionUtils.collectMap +import static org.gradle.util.internal.CollectionUtils.collectMapValues +import static org.gradle.util.internal.CollectionUtils.compact +import static org.gradle.util.internal.CollectionUtils.diffSetsBy +import static org.gradle.util.internal.CollectionUtils.every +import static org.gradle.util.internal.CollectionUtils.filter +import static org.gradle.util.internal.CollectionUtils.flattenCollections +import static org.gradle.util.internal.CollectionUtils.groupBy +import static org.gradle.util.internal.CollectionUtils.inject +import static org.gradle.util.internal.CollectionUtils.intersection +import static org.gradle.util.internal.CollectionUtils.join +import static org.gradle.util.internal.CollectionUtils.nonEmptyOrNull +import static org.gradle.util.internal.CollectionUtils.partition +import static org.gradle.util.internal.CollectionUtils.replace +import static org.gradle.util.internal.CollectionUtils.sort +import static org.gradle.util.internal.CollectionUtils.stringize +import static org.gradle.util.internal.CollectionUtils.toList +import static org.gradle.util.internal.CollectionUtils.toSet +import static org.gradle.util.internal.CollectionUtils.toStringList +import static org.gradle.util.internal.CollectionUtils.unpack @Unroll class CollectionUtilsTest extends Specification { diff --git a/subprojects/build-events/src/main/java/org/gradle/internal/build/event/DefaultBuildEventsListenerRegistry.java b/subprojects/build-events/src/main/java/org/gradle/internal/build/event/DefaultBuildEventsListenerRegistry.java index 732e6222147c7..f4930e2b50a58 100644 --- a/subprojects/build-events/src/main/java/org/gradle/internal/build/event/DefaultBuildEventsListenerRegistry.java +++ b/subprojects/build-events/src/main/java/org/gradle/internal/build/event/DefaultBuildEventsListenerRegistry.java @@ -47,7 +47,7 @@ import org.gradle.tooling.internal.consumer.parameters.BuildProgressListenerAdapter; import org.gradle.tooling.internal.protocol.events.InternalTaskDescriptor; import org.gradle.tooling.internal.protocol.events.InternalTaskResult; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.Closeable; import java.util.ArrayList; diff --git a/subprojects/build-init/src/main/java/org/gradleinternal/buildinit/plugins/internal/maven/MavenProjectsCreator.java b/subprojects/build-init/src/main/java/org/gradleinternal/buildinit/plugins/internal/maven/MavenProjectsCreator.java index 90e2ccd8ad870..6d4131e1f0c8b 100644 --- a/subprojects/build-init/src/main/java/org/gradleinternal/buildinit/plugins/internal/maven/MavenProjectsCreator.java +++ b/subprojects/build-init/src/main/java/org/gradleinternal/buildinit/plugins/internal/maven/MavenProjectsCreator.java @@ -42,7 +42,7 @@ import org.eclipse.aether.RepositorySystemSession; import org.gradle.api.artifacts.dsl.RepositoryHandler; import org.gradle.internal.SystemProperties; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.File; import java.util.LinkedHashSet; diff --git a/subprojects/build-profile/src/main/java/org/gradle/profile/BuildProfile.java b/subprojects/build-profile/src/main/java/org/gradle/profile/BuildProfile.java index ba78a4cdf07b8..fa1a637344c68 100644 --- a/subprojects/build-profile/src/main/java/org/gradle/profile/BuildProfile.java +++ b/subprojects/build-profile/src/main/java/org/gradle/profile/BuildProfile.java @@ -18,7 +18,7 @@ import com.google.common.collect.Maps; import org.gradle.StartParameter; import org.gradle.api.initialization.Settings; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.text.DateFormat; import java.text.SimpleDateFormat; diff --git a/subprojects/build-profile/src/main/java/org/gradle/profile/ProjectProfile.java b/subprojects/build-profile/src/main/java/org/gradle/profile/ProjectProfile.java index 3f1b9d20f21a9..fac45ca15b55b 100644 --- a/subprojects/build-profile/src/main/java/org/gradle/profile/ProjectProfile.java +++ b/subprojects/build-profile/src/main/java/org/gradle/profile/ProjectProfile.java @@ -15,7 +15,7 @@ */ package org.gradle.profile; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.HashMap; import java.util.List; diff --git a/subprojects/core-api/src/main/java/org/gradle/api/tasks/util/PatternSet.java b/subprojects/core-api/src/main/java/org/gradle/api/tasks/util/PatternSet.java index b27f16c705221..8cde5c5a3f961 100644 --- a/subprojects/core-api/src/main/java/org/gradle/api/tasks/util/PatternSet.java +++ b/subprojects/core-api/src/main/java/org/gradle/api/tasks/util/PatternSet.java @@ -27,7 +27,7 @@ import org.gradle.api.tasks.util.internal.PatternSpecFactory; import org.gradle.internal.typeconversion.NotationParser; import org.gradle.internal.typeconversion.NotationParserBuilder; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.util.Collections; diff --git a/subprojects/core/src/main/java/org/gradle/api/internal/classloading/CompositeGroovySystemLoader.java b/subprojects/core/src/main/java/org/gradle/api/internal/classloading/CompositeGroovySystemLoader.java index 1b35be6ec7c28..3b24c01986886 100644 --- a/subprojects/core/src/main/java/org/gradle/api/internal/classloading/CompositeGroovySystemLoader.java +++ b/subprojects/core/src/main/java/org/gradle/api/internal/classloading/CompositeGroovySystemLoader.java @@ -16,7 +16,7 @@ package org.gradle.api.internal.classloading; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.List; diff --git a/subprojects/core/src/main/java/org/gradle/api/internal/classpath/ManifestUtil.java b/subprojects/core/src/main/java/org/gradle/api/internal/classpath/ManifestUtil.java index 193f91079a4f4..563e61ed69530 100644 --- a/subprojects/core/src/main/java/org/gradle/api/internal/classpath/ManifestUtil.java +++ b/subprojects/core/src/main/java/org/gradle/api/internal/classpath/ManifestUtil.java @@ -17,7 +17,7 @@ package org.gradle.api.internal.classpath; import org.gradle.api.UncheckedIOException; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.File; import java.io.IOException; diff --git a/subprojects/core/src/main/java/org/gradle/api/internal/project/ProjectStateInternal.java b/subprojects/core/src/main/java/org/gradle/api/internal/project/ProjectStateInternal.java index c1d09cb1be600..289a465f22015 100644 --- a/subprojects/core/src/main/java/org/gradle/api/internal/project/ProjectStateInternal.java +++ b/subprojects/core/src/main/java/org/gradle/api/internal/project/ProjectStateInternal.java @@ -18,7 +18,7 @@ import org.gradle.api.ProjectConfigurationException; import org.gradle.api.ProjectState; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.ArrayList; import java.util.List; diff --git a/subprojects/core/src/main/java/org/gradle/api/internal/tasks/TaskStateInternal.java b/subprojects/core/src/main/java/org/gradle/api/internal/tasks/TaskStateInternal.java index 7a1f64c18a796..1517c43e26a7b 100644 --- a/subprojects/core/src/main/java/org/gradle/api/internal/tasks/TaskStateInternal.java +++ b/subprojects/core/src/main/java/org/gradle/api/internal/tasks/TaskStateInternal.java @@ -18,7 +18,7 @@ import org.gradle.api.tasks.TaskExecutionException; import org.gradle.api.tasks.TaskState; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.util.ArrayList; diff --git a/subprojects/core/src/main/java/org/gradle/api/internal/tasks/TaskStatistics.java b/subprojects/core/src/main/java/org/gradle/api/internal/tasks/TaskStatistics.java index 8b09fe70bc34f..e853b34426cab 100644 --- a/subprojects/core/src/main/java/org/gradle/api/internal/tasks/TaskStatistics.java +++ b/subprojects/core/src/main/java/org/gradle/api/internal/tasks/TaskStatistics.java @@ -20,7 +20,7 @@ import org.gradle.api.logging.Logger; import org.gradle.api.logging.Logging; import org.gradle.internal.IoActions; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.Closeable; import java.io.FileWriter; diff --git a/subprojects/core/src/main/java/org/gradle/api/internal/tasks/options/InstanceOptionDescriptor.java b/subprojects/core/src/main/java/org/gradle/api/internal/tasks/options/InstanceOptionDescriptor.java index 921c21ccd9a33..c45767a81de29 100644 --- a/subprojects/core/src/main/java/org/gradle/api/internal/tasks/options/InstanceOptionDescriptor.java +++ b/subprojects/core/src/main/java/org/gradle/api/internal/tasks/options/InstanceOptionDescriptor.java @@ -17,7 +17,7 @@ package org.gradle.api.internal.tasks.options; import org.gradle.internal.reflect.JavaMethod; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.Collection; import java.util.Collections; diff --git a/subprojects/core/src/main/java/org/gradle/api/internal/tasks/options/OptionReader.java b/subprojects/core/src/main/java/org/gradle/api/internal/tasks/options/OptionReader.java index 37ac7ad3a35ab..e88ffa8f4e5a8 100644 --- a/subprojects/core/src/main/java/org/gradle/api/internal/tasks/options/OptionReader.java +++ b/subprojects/core/src/main/java/org/gradle/api/internal/tasks/options/OptionReader.java @@ -21,7 +21,7 @@ import org.gradle.api.tasks.options.Option; import org.gradle.api.tasks.options.OptionValues; import org.gradle.internal.reflect.JavaMethod; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.lang.reflect.Field; import java.lang.reflect.Method; diff --git a/subprojects/core/src/main/java/org/gradle/cache/internal/WrapperDistributionCleanupAction.java b/subprojects/core/src/main/java/org/gradle/cache/internal/WrapperDistributionCleanupAction.java index 5a338d6297e98..a2b8a8c2a9d02 100644 --- a/subprojects/core/src/main/java/org/gradle/cache/internal/WrapperDistributionCleanupAction.java +++ b/subprojects/core/src/main/java/org/gradle/cache/internal/WrapperDistributionCleanupAction.java @@ -52,7 +52,7 @@ import java.util.zip.ZipFile; import static org.apache.commons.io.filefilter.FileFilterUtils.directoryFileFilter; -import static org.gradle.util.CollectionUtils.single; +import static org.gradle.util.internal.CollectionUtils.single; public class WrapperDistributionCleanupAction implements DirectoryCleanupAction { diff --git a/subprojects/core/src/main/java/org/gradle/execution/DefaultBuildConfigurationActionExecuter.java b/subprojects/core/src/main/java/org/gradle/execution/DefaultBuildConfigurationActionExecuter.java index 1df78ac14decd..8c7d1480191cb 100644 --- a/subprojects/core/src/main/java/org/gradle/execution/DefaultBuildConfigurationActionExecuter.java +++ b/subprojects/core/src/main/java/org/gradle/execution/DefaultBuildConfigurationActionExecuter.java @@ -19,7 +19,7 @@ import com.google.common.collect.Lists; import org.gradle.api.internal.GradleInternal; import org.gradle.api.internal.project.ProjectStateRegistry; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.List; diff --git a/subprojects/core/src/main/java/org/gradle/initialization/definition/InjectedPluginResolver.java b/subprojects/core/src/main/java/org/gradle/initialization/definition/InjectedPluginResolver.java index 4ebad22a65057..4a8ee75885353 100644 --- a/subprojects/core/src/main/java/org/gradle/initialization/definition/InjectedPluginResolver.java +++ b/subprojects/core/src/main/java/org/gradle/initialization/definition/InjectedPluginResolver.java @@ -22,7 +22,7 @@ import java.util.List; -import static org.gradle.util.CollectionUtils.collect; +import static org.gradle.util.internal.CollectionUtils.collect; public class InjectedPluginResolver { public PluginRequests resolveAll(List requests) { diff --git a/subprojects/core/src/main/java/org/gradle/internal/filewatch/jdk7/WatchServicePoller.java b/subprojects/core/src/main/java/org/gradle/internal/filewatch/jdk7/WatchServicePoller.java index 7793701d466a5..fbc407f644198 100644 --- a/subprojects/core/src/main/java/org/gradle/internal/filewatch/jdk7/WatchServicePoller.java +++ b/subprojects/core/src/main/java/org/gradle/internal/filewatch/jdk7/WatchServicePoller.java @@ -19,7 +19,7 @@ import org.gradle.api.Transformer; import org.gradle.internal.Cast; import org.gradle.internal.filewatch.FileWatcherEvent; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.io.File; diff --git a/subprojects/core/src/main/java/org/gradle/internal/work/DefaultAsyncWorkTracker.java b/subprojects/core/src/main/java/org/gradle/internal/work/DefaultAsyncWorkTracker.java index b11a15b442f17..71abaa07bc25a 100644 --- a/subprojects/core/src/main/java/org/gradle/internal/work/DefaultAsyncWorkTracker.java +++ b/subprojects/core/src/main/java/org/gradle/internal/work/DefaultAsyncWorkTracker.java @@ -25,7 +25,7 @@ import org.gradle.internal.exceptions.DefaultMultiCauseException; import org.gradle.internal.operations.BuildOperationRef; import org.gradle.internal.resources.ProjectLeaseRegistry; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.List; import java.util.Set; diff --git a/subprojects/core/src/main/java/org/gradle/plugin/use/internal/PluginRequestCollector.java b/subprojects/core/src/main/java/org/gradle/plugin/use/internal/PluginRequestCollector.java index 3169341b4f50b..79334309967d6 100644 --- a/subprojects/core/src/main/java/org/gradle/plugin/use/internal/PluginRequestCollector.java +++ b/subprojects/core/src/main/java/org/gradle/plugin/use/internal/PluginRequestCollector.java @@ -30,7 +30,7 @@ import org.gradle.plugin.use.PluginDependenciesSpec; import org.gradle.plugin.use.PluginDependencySpec; import org.gradle.plugin.use.PluginId; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.Collection; import java.util.Iterator; @@ -38,7 +38,7 @@ import java.util.List; import java.util.Map; -import static org.gradle.util.CollectionUtils.collect; +import static org.gradle.util.internal.CollectionUtils.collect; /** * The real delegate of the plugins {} block. diff --git a/subprojects/core/src/main/java/org/gradle/process/internal/JavaExecHandleBuilder.java b/subprojects/core/src/main/java/org/gradle/process/internal/JavaExecHandleBuilder.java index e47b4d0dc5fe8..85f926971aad4 100644 --- a/subprojects/core/src/main/java/org/gradle/process/internal/JavaExecHandleBuilder.java +++ b/subprojects/core/src/main/java/org/gradle/process/internal/JavaExecHandleBuilder.java @@ -33,7 +33,7 @@ import org.gradle.process.JavaDebugOptions; import org.gradle.process.JavaExecSpec; import org.gradle.process.JavaForkOptions; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nonnull; import javax.annotation.Nullable; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/DefaultGlobalDependencyResolutionRules.java b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/DefaultGlobalDependencyResolutionRules.java index 2f845b36b81df..97186d1ec345e 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/DefaultGlobalDependencyResolutionRules.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/DefaultGlobalDependencyResolutionRules.java @@ -20,7 +20,7 @@ import org.gradle.api.artifacts.DependencySubstitution; import org.gradle.api.internal.artifacts.ivyservice.dependencysubstitution.DependencySubstitutionRules; import org.gradle.internal.Actions; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.List; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/configurations/DefaultConfiguration.java b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/configurations/DefaultConfiguration.java index b12ac2578d7e7..afa7912647014 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/configurations/DefaultConfiguration.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/configurations/DefaultConfiguration.java @@ -121,7 +121,7 @@ import org.gradle.internal.reflect.Instantiator; import org.gradle.internal.resolve.ModuleVersionNotFoundException; import org.gradle.internal.typeconversion.NotationParser; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.ConfigureUtil; import org.gradle.util.Path; import org.gradle.util.WrapUtil; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/configurations/ResolveConfigurationResolutionBuildOperationDetails.java b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/configurations/ResolveConfigurationResolutionBuildOperationDetails.java index 89f2bf3a205af..a8fd11a0709bf 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/configurations/ResolveConfigurationResolutionBuildOperationDetails.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/configurations/ResolveConfigurationResolutionBuildOperationDetails.java @@ -22,7 +22,7 @@ import org.gradle.api.internal.artifacts.repositories.ResolutionAwareRepository; import org.gradle.api.internal.artifacts.repositories.descriptor.RepositoryDescriptor; import org.gradle.internal.operations.trace.CustomOperationTraceSerialization; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.io.File; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandler.java b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandler.java index 68748e78938fc..486e0335f707f 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandler.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/dsl/DefaultRepositoryHandler.java @@ -45,7 +45,7 @@ import java.util.stream.Collectors; import java.util.stream.Stream; -import static org.gradle.util.CollectionUtils.flattenCollections; +import static org.gradle.util.internal.CollectionUtils.flattenCollections; public class DefaultRepositoryHandler extends DefaultArtifactRepositoryContainer implements RepositoryHandlerInternal { diff --git a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/dsl/dependencies/DynamicAddDependencyMethods.java b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/dsl/dependencies/DynamicAddDependencyMethods.java index 1e926ba437d29..d3236bd4522d4 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/dsl/dependencies/DynamicAddDependencyMethods.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/dsl/dependencies/DynamicAddDependencyMethods.java @@ -21,7 +21,7 @@ import org.gradle.api.artifacts.ConfigurationContainer; import org.gradle.internal.metaobject.DynamicInvokeResult; import org.gradle.internal.metaobject.MethodAccess; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.List; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyExtraInfo.java b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyExtraInfo.java index 538da1a39cb08..b9e555a7147e0 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyExtraInfo.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/DefaultIvyExtraInfo.java @@ -19,7 +19,7 @@ import com.google.common.base.Joiner; import org.gradle.api.InvalidUserDataException; import org.gradle.api.artifacts.ivy.IvyExtraInfo; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.xml.namespace.QName; import java.util.ArrayList; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/ivyresolve/DefaultVersionedComponentChooser.java b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/ivyresolve/DefaultVersionedComponentChooser.java index 5279d4f83f26e..bf5d601e04026 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/ivyresolve/DefaultVersionedComponentChooser.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/ivyresolve/DefaultVersionedComponentChooser.java @@ -38,7 +38,7 @@ import org.gradle.internal.resolve.result.BuildableModuleComponentMetaDataResolveResult; import org.gradle.internal.resolve.result.ComponentSelectionContext; import org.gradle.internal.rules.SpecRuleAction; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.util.Collection; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/ivyresolve/parser/IvyXmlModuleDescriptorParser.java b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/ivyresolve/parser/IvyXmlModuleDescriptorParser.java index f39f16bc6e808..040fe72324ca2 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/ivyresolve/parser/IvyXmlModuleDescriptorParser.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/ivyresolve/parser/IvyXmlModuleDescriptorParser.java @@ -62,7 +62,7 @@ import org.gradle.internal.resource.local.FileResourceRepository; import org.gradle.internal.resource.local.LocallyAvailableExternalResource; import org.gradle.internal.resource.transfer.UrlExternalResource; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.TextUtil; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/AbstractIvyDependencyDescriptorFactory.java b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/AbstractIvyDependencyDescriptorFactory.java index 4347537fc9921..7f4268de1196c 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/AbstractIvyDependencyDescriptorFactory.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/ivyservice/moduleconverter/dependencies/AbstractIvyDependencyDescriptorFactory.java @@ -22,7 +22,7 @@ import org.gradle.internal.component.model.DefaultIvyArtifactName; import org.gradle.internal.component.model.ExcludeMetadata; import org.gradle.internal.component.model.IvyArtifactName; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.Collections; import java.util.List; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/query/DefaultArtifactResolutionQuery.java b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/query/DefaultArtifactResolutionQuery.java index 63f2d17e4d8a2..ab16926d1a24a 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/query/DefaultArtifactResolutionQuery.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/query/DefaultArtifactResolutionQuery.java @@ -58,7 +58,7 @@ import org.gradle.internal.resolve.result.DefaultBuildableArtifactResolveResult; import org.gradle.internal.resolve.result.DefaultBuildableArtifactSetResolveResult; import org.gradle.internal.resolve.result.DefaultBuildableComponentResolveResult; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nonnull; import java.util.Arrays; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/AbstractAuthenticationSupportedRepository.java b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/AbstractAuthenticationSupportedRepository.java index 0d9c229f82cb8..e9f47184120b3 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/AbstractAuthenticationSupportedRepository.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/AbstractAuthenticationSupportedRepository.java @@ -27,7 +27,7 @@ import org.gradle.internal.artifacts.repositories.AuthenticationSupportedInternal; import org.gradle.internal.authentication.AuthenticationInternal; import org.gradle.internal.reflect.Instantiator; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.net.URI; import java.util.Collection; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/DefaultFlatDirArtifactRepository.java b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/DefaultFlatDirArtifactRepository.java index 9f957a76054b6..09cff3d7fce6c 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/DefaultFlatDirArtifactRepository.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/DefaultFlatDirArtifactRepository.java @@ -45,7 +45,7 @@ import org.gradle.internal.resolve.caching.ImplicitInputsProvidingService; import org.gradle.internal.resource.local.FileStore; import org.gradle.internal.resource.local.LocallyAvailableResourceFinder; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.io.File; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/resolver/ExternalResourceResolver.java b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/resolver/ExternalResourceResolver.java index 514cfcb82ccbd..365facf741f05 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/resolver/ExternalResourceResolver.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/resolver/ExternalResourceResolver.java @@ -74,7 +74,7 @@ import org.gradle.internal.resource.local.LocallyAvailableExternalResource; import org.gradle.internal.resource.local.LocallyAvailableResourceFinder; import org.gradle.internal.resource.transfer.CacheAwareExternalResourceAccessor; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/internal/component/external/descriptor/Configuration.java b/subprojects/dependency-management/src/main/java/org/gradle/internal/component/external/descriptor/Configuration.java index f6beeabee3058..7669ffc7ae727 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/internal/component/external/descriptor/Configuration.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/internal/component/external/descriptor/Configuration.java @@ -17,7 +17,7 @@ package org.gradle.internal.component.external.descriptor; import com.google.common.base.Objects; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.Collection; import java.util.List; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/internal/component/external/ivypublish/DefaultIvyModulePublishMetadata.java b/subprojects/dependency-management/src/main/java/org/gradle/internal/component/external/ivypublish/DefaultIvyModulePublishMetadata.java index c7042260e2cbb..b4f3f58a10d47 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/internal/component/external/ivypublish/DefaultIvyModulePublishMetadata.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/internal/component/external/ivypublish/DefaultIvyModulePublishMetadata.java @@ -34,7 +34,7 @@ import org.gradle.internal.component.model.ExcludeMetadata; import org.gradle.internal.component.model.IvyArtifactName; import org.gradle.internal.component.model.LocalOriginDependencyMetadata; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.File; import java.util.Collection; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/internal/component/external/model/ivy/DefaultIvyModuleResolveMetadata.java b/subprojects/dependency-management/src/main/java/org/gradle/internal/component/external/model/ivy/DefaultIvyModuleResolveMetadata.java index 5024f8ef12f4b..7271e285692e8 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/internal/component/external/model/ivy/DefaultIvyModuleResolveMetadata.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/internal/component/external/model/ivy/DefaultIvyModuleResolveMetadata.java @@ -34,7 +34,7 @@ import org.gradle.internal.component.model.Exclude; import org.gradle.internal.component.model.ExcludeMetadata; import org.gradle.internal.component.model.ModuleSources; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.IdentityHashMap; import java.util.List; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/internal/component/model/DependencyMetadataRules.java b/subprojects/dependency-management/src/main/java/org/gradle/internal/component/model/DependencyMetadataRules.java index 64f65ab3df266..77127d0508695 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/internal/component/model/DependencyMetadataRules.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/internal/component/model/DependencyMetadataRules.java @@ -32,7 +32,7 @@ import org.gradle.internal.component.external.model.VariantMetadataRules; import org.gradle.internal.reflect.Instantiator; import org.gradle.internal.typeconversion.NotationParser; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.ArrayList; import java.util.List; diff --git a/subprojects/dependency-management/src/main/java/org/gradle/internal/rules/RuleSourceBackedRuleAction.java b/subprojects/dependency-management/src/main/java/org/gradle/internal/rules/RuleSourceBackedRuleAction.java index c4ca1e8668537..89a70a3b3fa52 100644 --- a/subprojects/dependency-management/src/main/java/org/gradle/internal/rules/RuleSourceBackedRuleAction.java +++ b/subprojects/dependency-management/src/main/java/org/gradle/internal/rules/RuleSourceBackedRuleAction.java @@ -23,7 +23,7 @@ import org.gradle.model.internal.inspect.FormattingValidationProblemCollector; import org.gradle.model.internal.inspect.RuleSourceValidationProblemCollector; import org.gradle.model.internal.type.ModelType; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.lang.reflect.Method; import java.lang.reflect.Type; diff --git a/subprojects/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/resolveengine/result/DefaultResolutionResultBuilderSpec.groovy b/subprojects/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/resolveengine/result/DefaultResolutionResultBuilderSpec.groovy index 707890e4d32d5..a7cd7dd4ef312 100644 --- a/subprojects/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/resolveengine/result/DefaultResolutionResultBuilderSpec.groovy +++ b/subprojects/dependency-management/src/test/groovy/org/gradle/api/internal/artifacts/ivyservice/resolveengine/result/DefaultResolutionResultBuilderSpec.groovy @@ -33,7 +33,7 @@ import spock.lang.Specification import static org.gradle.api.internal.artifacts.DefaultModuleVersionIdentifier.newId import static org.gradle.api.internal.artifacts.DefaultModuleVersionSelector.newSelector import static org.gradle.api.internal.artifacts.ivyservice.resolveengine.result.ResolutionResultPrinter.printGraph -import static org.gradle.util.CollectionUtils.first +import static org.gradle.util.internal.CollectionUtils.first class DefaultResolutionResultBuilderSpec extends Specification { diff --git a/subprojects/diagnostics/src/main/java/org/gradle/api/reporting/components/internal/ComponentRenderer.java b/subprojects/diagnostics/src/main/java/org/gradle/api/reporting/components/internal/ComponentRenderer.java index e4f7688f0e03c..9588f8879e08d 100644 --- a/subprojects/diagnostics/src/main/java/org/gradle/api/reporting/components/internal/ComponentRenderer.java +++ b/subprojects/diagnostics/src/main/java/org/gradle/api/reporting/components/internal/ComponentRenderer.java @@ -24,7 +24,7 @@ import org.gradle.platform.base.SourceComponentSpec; import org.gradle.platform.base.VariantComponentSpec; import org.gradle.reporting.ReportRenderer; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; public class ComponentRenderer extends ReportRenderer { private final ReportRenderer sourceSetRenderer; diff --git a/subprojects/diagnostics/src/main/java/org/gradle/api/reporting/dependencies/internal/JsonProjectDependencyRenderer.java b/subprojects/diagnostics/src/main/java/org/gradle/api/reporting/dependencies/internal/JsonProjectDependencyRenderer.java index 17cfc14a4a9e5..7b0891d934a22 100644 --- a/subprojects/diagnostics/src/main/java/org/gradle/api/reporting/dependencies/internal/JsonProjectDependencyRenderer.java +++ b/subprojects/diagnostics/src/main/java/org/gradle/api/reporting/dependencies/internal/JsonProjectDependencyRenderer.java @@ -36,7 +36,7 @@ import org.gradle.api.tasks.diagnostics.internal.graph.nodes.UnresolvableConfigurationResult; import org.gradle.api.tasks.diagnostics.internal.insight.DependencyInsightReporter; import org.gradle.internal.deprecation.DeprecatableConfiguration; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.GradleVersion; import javax.annotation.Nullable; diff --git a/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/ProjectReportTask.java b/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/ProjectReportTask.java index 39a831459cf0e..5e2177b53b752 100644 --- a/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/ProjectReportTask.java +++ b/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/ProjectReportTask.java @@ -24,7 +24,7 @@ import org.gradle.internal.build.IncludedBuildState; import org.gradle.internal.graph.GraphRenderer; import org.gradle.internal.logging.text.StyledTextOutput; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.GUtil; import javax.inject.Inject; diff --git a/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/internal/TaskReportRenderer.java b/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/internal/TaskReportRenderer.java index 7bcd92055edcf..f4d716c90c6cb 100644 --- a/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/internal/TaskReportRenderer.java +++ b/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/internal/TaskReportRenderer.java @@ -19,7 +19,7 @@ import org.apache.commons.lang.StringUtils; import org.gradle.initialization.BuildClientMetaData; import org.gradle.internal.logging.text.StyledTextOutput; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.GUtil; import java.util.List; diff --git a/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/internal/insight/DependencyInsightReporter.java b/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/internal/insight/DependencyInsightReporter.java index 0075ecc21b756..0306edf546d54 100644 --- a/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/internal/insight/DependencyInsightReporter.java +++ b/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/internal/insight/DependencyInsightReporter.java @@ -42,7 +42,7 @@ import org.gradle.api.tasks.diagnostics.internal.graph.nodes.Section; import org.gradle.api.tasks.diagnostics.internal.graph.nodes.UnresolvedDependencyEdge; import org.gradle.internal.logging.text.TreeFormatter; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.Collection; import java.util.LinkedList; diff --git a/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/internal/insight/DependencyResultSorter.java b/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/internal/insight/DependencyResultSorter.java index 7221d6ad04eaa..0d1d004945536 100644 --- a/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/internal/insight/DependencyResultSorter.java +++ b/subprojects/diagnostics/src/main/java/org/gradle/api/tasks/diagnostics/internal/insight/DependencyResultSorter.java @@ -28,7 +28,7 @@ import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.VersionParser; import org.gradle.api.internal.artifacts.ivyservice.ivyresolve.strategy.VersionSelectorScheme; import org.gradle.api.tasks.diagnostics.internal.graph.nodes.DependencyEdge; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.Collection; import java.util.Comparator; diff --git a/subprojects/diagnostics/src/main/java/org/gradle/configuration/TaskDetailPrinter.java b/subprojects/diagnostics/src/main/java/org/gradle/configuration/TaskDetailPrinter.java index 4cfcb27db307e..bba80518f9f98 100644 --- a/subprojects/diagnostics/src/main/java/org/gradle/configuration/TaskDetailPrinter.java +++ b/subprojects/diagnostics/src/main/java/org/gradle/configuration/TaskDetailPrinter.java @@ -43,9 +43,9 @@ import java.util.TreeSet; import static org.gradle.internal.logging.text.StyledTextOutput.Style.UserInput; -import static org.gradle.util.CollectionUtils.collect; -import static org.gradle.util.CollectionUtils.filter; -import static org.gradle.util.CollectionUtils.sort; +import static org.gradle.util.internal.CollectionUtils.collect; +import static org.gradle.util.internal.CollectionUtils.filter; +import static org.gradle.util.internal.CollectionUtils.sort; @NonNullApi public class TaskDetailPrinter { diff --git a/subprojects/file-collections/src/main/java/org/gradle/api/internal/file/FilteredFileCollection.java b/subprojects/file-collections/src/main/java/org/gradle/api/internal/file/FilteredFileCollection.java index f350edac89038..525c7605935f8 100644 --- a/subprojects/file-collections/src/main/java/org/gradle/api/internal/file/FilteredFileCollection.java +++ b/subprojects/file-collections/src/main/java/org/gradle/api/internal/file/FilteredFileCollection.java @@ -19,7 +19,7 @@ import com.google.common.collect.Iterators; import org.gradle.api.internal.tasks.TaskDependencyResolveContext; import org.gradle.api.specs.Spec; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.File; import java.util.Iterator; diff --git a/subprojects/file-temp/src/main/java/org/gradle/api/internal/file/temp/DefaultTemporaryFileProvider.java b/subprojects/file-temp/src/main/java/org/gradle/api/internal/file/temp/DefaultTemporaryFileProvider.java index 1c58e7efa7b55..266387f00a410 100755 --- a/subprojects/file-temp/src/main/java/org/gradle/api/internal/file/temp/DefaultTemporaryFileProvider.java +++ b/subprojects/file-temp/src/main/java/org/gradle/api/internal/file/temp/DefaultTemporaryFileProvider.java @@ -19,7 +19,7 @@ import org.gradle.api.UncheckedIOException; import org.gradle.internal.Factory; import org.gradle.internal.FileUtils; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.GFileUtils; import javax.annotation.Nullable; diff --git a/subprojects/ide-native/src/main/java/org/gradle/ide/visualstudio/internal/DefaultVisualStudioProject.java b/subprojects/ide-native/src/main/java/org/gradle/ide/visualstudio/internal/DefaultVisualStudioProject.java index cdec410a5f236..03e9897285d08 100644 --- a/subprojects/ide-native/src/main/java/org/gradle/ide/visualstudio/internal/DefaultVisualStudioProject.java +++ b/subprojects/ide-native/src/main/java/org/gradle/ide/visualstudio/internal/DefaultVisualStudioProject.java @@ -32,7 +32,7 @@ import org.gradle.ide.visualstudio.XmlConfigFile; import org.gradle.internal.file.PathToFileResolver; import org.gradle.plugins.ide.internal.IdeProjectMetadata; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.VersionNumber; import javax.inject.Inject; @@ -45,7 +45,7 @@ import java.util.Set; import java.util.UUID; -import static org.gradle.util.CollectionUtils.collect; +import static org.gradle.util.internal.CollectionUtils.collect; /** * A VisualStudio project represents a set of binaries for a component that may vary in build type and target platform. diff --git a/subprojects/ide-native/src/main/java/org/gradle/ide/visualstudio/internal/DefaultVisualStudioSolution.java b/subprojects/ide-native/src/main/java/org/gradle/ide/visualstudio/internal/DefaultVisualStudioSolution.java index 1fcba1d86f0ba..d22c4c81dc4ee 100644 --- a/subprojects/ide-native/src/main/java/org/gradle/ide/visualstudio/internal/DefaultVisualStudioSolution.java +++ b/subprojects/ide-native/src/main/java/org/gradle/ide/visualstudio/internal/DefaultVisualStudioSolution.java @@ -32,7 +32,7 @@ import org.gradle.ide.visualstudio.TextProvider; import org.gradle.internal.file.PathToFileResolver; import org.gradle.plugins.ide.internal.IdeArtifactRegistry; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.inject.Inject; import java.io.File; diff --git a/subprojects/ide-native/src/main/java/org/gradle/ide/visualstudio/internal/NativeSpecVisualStudioTargetBinary.java b/subprojects/ide-native/src/main/java/org/gradle/ide/visualstudio/internal/NativeSpecVisualStudioTargetBinary.java index 8525df27dfa4f..f65bcf97f68a8 100644 --- a/subprojects/ide-native/src/main/java/org/gradle/ide/visualstudio/internal/NativeSpecVisualStudioTargetBinary.java +++ b/subprojects/ide-native/src/main/java/org/gradle/ide/visualstudio/internal/NativeSpecVisualStudioTargetBinary.java @@ -38,7 +38,7 @@ import org.gradle.nativeplatform.tasks.InstallExecutable; import org.gradle.nativeplatform.test.NativeTestSuiteBinarySpec; import org.gradle.nativeplatform.toolchain.internal.MacroArgsConverter; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.VersionNumber; import java.io.File; diff --git a/subprojects/ide-native/src/main/java/org/gradle/ide/visualstudio/internal/VisualStudioProjectMetadata.java b/subprojects/ide-native/src/main/java/org/gradle/ide/visualstudio/internal/VisualStudioProjectMetadata.java index 78ee5bde766a0..55659f80bf454 100644 --- a/subprojects/ide-native/src/main/java/org/gradle/ide/visualstudio/internal/VisualStudioProjectMetadata.java +++ b/subprojects/ide-native/src/main/java/org/gradle/ide/visualstudio/internal/VisualStudioProjectMetadata.java @@ -21,7 +21,7 @@ import org.gradle.internal.Describables; import org.gradle.internal.DisplayName; import org.gradle.plugins.ide.internal.IdeProjectMetadata; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.File; import java.util.List; diff --git a/subprojects/ide-native/src/main/java/org/gradle/ide/xcode/internal/XcodeUtils.java b/subprojects/ide-native/src/main/java/org/gradle/ide/xcode/internal/XcodeUtils.java index d0519411df553..bd0e07ffd2f71 100644 --- a/subprojects/ide-native/src/main/java/org/gradle/ide/xcode/internal/XcodeUtils.java +++ b/subprojects/ide-native/src/main/java/org/gradle/ide/xcode/internal/XcodeUtils.java @@ -18,7 +18,7 @@ import org.apache.commons.lang.StringUtils; import org.gradle.api.Transformer; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.File; import java.util.Arrays; diff --git a/subprojects/ide-native/src/main/java/org/gradle/ide/xcode/plugins/XcodePlugin.java b/subprojects/ide-native/src/main/java/org/gradle/ide/xcode/plugins/XcodePlugin.java index 7df71baa2d0ca..c1232cbc4f158 100644 --- a/subprojects/ide-native/src/main/java/org/gradle/ide/xcode/plugins/XcodePlugin.java +++ b/subprojects/ide-native/src/main/java/org/gradle/ide/xcode/plugins/XcodePlugin.java @@ -71,7 +71,7 @@ import org.gradle.nativeplatform.test.xctest.plugins.XCTestConventionPlugin; import org.gradle.plugins.ide.internal.IdeArtifactRegistry; import org.gradle.plugins.ide.internal.IdePlugin; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.inject.Inject; import java.io.File; diff --git a/subprojects/ide/src/main/java/org/gradle/plugins/ide/eclipse/model/internal/SourceFoldersCreator.java b/subprojects/ide/src/main/java/org/gradle/plugins/ide/eclipse/model/internal/SourceFoldersCreator.java index 7fe3a0b8549e8..6c11f8f1c1e3a 100644 --- a/subprojects/ide/src/main/java/org/gradle/plugins/ide/eclipse/model/internal/SourceFoldersCreator.java +++ b/subprojects/ide/src/main/java/org/gradle/plugins/ide/eclipse/model/internal/SourceFoldersCreator.java @@ -36,7 +36,7 @@ import org.gradle.plugins.ide.eclipse.internal.EclipsePluginConstants; import org.gradle.plugins.ide.eclipse.model.EclipseClasspath; import org.gradle.plugins.ide.eclipse.model.SourceFolder; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.File; import java.util.ArrayList; diff --git a/subprojects/ide/src/main/java/org/gradle/plugins/ide/internal/DefaultIdeArtifactRegistry.java b/subprojects/ide/src/main/java/org/gradle/plugins/ide/internal/DefaultIdeArtifactRegistry.java index 073856fef2cb6..dcf3930825e7e 100644 --- a/subprojects/ide/src/main/java/org/gradle/plugins/ide/internal/DefaultIdeArtifactRegistry.java +++ b/subprojects/ide/src/main/java/org/gradle/plugins/ide/internal/DefaultIdeArtifactRegistry.java @@ -28,7 +28,7 @@ import org.gradle.api.internal.project.ProjectStateRegistry; import org.gradle.api.internal.tasks.TaskDependencyResolveContext; import org.gradle.internal.build.BuildState; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.util.List; diff --git a/subprojects/ide/src/main/java/org/gradle/plugins/ide/internal/tooling/EclipseModelBuilder.java b/subprojects/ide/src/main/java/org/gradle/plugins/ide/internal/tooling/EclipseModelBuilder.java index f8843ab301557..3018e55dab4b4 100644 --- a/subprojects/ide/src/main/java/org/gradle/plugins/ide/internal/tooling/EclipseModelBuilder.java +++ b/subprojects/ide/src/main/java/org/gradle/plugins/ide/internal/tooling/EclipseModelBuilder.java @@ -70,7 +70,7 @@ import org.gradle.tooling.model.eclipse.EclipseWorkspace; import org.gradle.tooling.model.eclipse.EclipseWorkspaceProject; import org.gradle.tooling.provider.model.ParameterizedToolingModelBuilder; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.GUtil; import java.io.File; diff --git a/subprojects/ide/src/testFixtures/groovy/org/gradle/plugins/ide/fixtures/IdeaModuleFixture.groovy b/subprojects/ide/src/testFixtures/groovy/org/gradle/plugins/ide/fixtures/IdeaModuleFixture.groovy index a6830e4c63a21..6bb9d16a30ab3 100644 --- a/subprojects/ide/src/testFixtures/groovy/org/gradle/plugins/ide/fixtures/IdeaModuleFixture.groovy +++ b/subprojects/ide/src/testFixtures/groovy/org/gradle/plugins/ide/fixtures/IdeaModuleFixture.groovy @@ -20,7 +20,7 @@ import groovy.transform.ToString import groovy.util.slurpersupport.GPathResult import org.gradle.internal.Transformers import org.gradle.test.fixtures.file.TestFile -import org.gradle.util.CollectionUtils +import org.gradle.util.internal.CollectionUtils class IdeaModuleFixture extends IdeProjectFixture { private final GPathResult iml diff --git a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/compatibility/AbstractCompatibilityTestInterceptor.java b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/compatibility/AbstractCompatibilityTestInterceptor.java index 55650972f0570..40b0417f86f0b 100644 --- a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/compatibility/AbstractCompatibilityTestInterceptor.java +++ b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/compatibility/AbstractCompatibilityTestInterceptor.java @@ -23,14 +23,14 @@ import org.gradle.integtests.fixtures.versions.ReleasedVersionDistributions; import org.gradle.internal.jvm.Jvm; import org.gradle.internal.os.OperatingSystem; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.Collection; import java.util.Collections; import java.util.Comparator; import java.util.List; -import static org.gradle.util.CollectionUtils.sort; +import static org.gradle.util.internal.CollectionUtils.sort; public abstract class AbstractCompatibilityTestInterceptor extends AbstractContextualMultiVersionTestInterceptor { protected final IntegrationTestBuildContext buildContext = IntegrationTestBuildContext.INSTANCE; diff --git a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/compatibility/AbstractContextualMultiVersionTestInterceptor.java b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/compatibility/AbstractContextualMultiVersionTestInterceptor.java index 08dfe1cccc36f..e27b8ef38b0c4 100644 --- a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/compatibility/AbstractContextualMultiVersionTestInterceptor.java +++ b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/compatibility/AbstractContextualMultiVersionTestInterceptor.java @@ -21,7 +21,7 @@ import org.gradle.api.specs.Spec; import org.gradle.integtests.fixtures.VersionedTool; import org.gradle.integtests.fixtures.extensions.AbstractMultiTestInterceptor; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.Collection; import java.util.Collections; diff --git a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/AbstractGradleExecuter.java b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/AbstractGradleExecuter.java index 58a266bbe7310..c9af9c653f909 100644 --- a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/AbstractGradleExecuter.java +++ b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/AbstractGradleExecuter.java @@ -59,7 +59,7 @@ import org.gradle.test.fixtures.file.TestFile; import org.gradle.testfixtures.internal.NativeServicesTestFixture; import org.gradle.util.ClosureBackedAction; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.GFileUtils; import org.gradle.util.GradleVersion; import org.gradle.util.TextUtil; @@ -94,8 +94,8 @@ import static org.gradle.integtests.fixtures.executer.AbstractGradleExecuter.CliDaemonArgument.NO_DAEMON; import static org.gradle.integtests.fixtures.executer.OutputScrapingExecutionResult.STACK_TRACE_ELEMENT; import static org.gradle.internal.service.scopes.DefaultGradleUserHomeScopeServiceRegistry.REUSE_USER_HOME_SERVICES; -import static org.gradle.util.CollectionUtils.collect; -import static org.gradle.util.CollectionUtils.join; +import static org.gradle.util.internal.CollectionUtils.collect; +import static org.gradle.util.internal.CollectionUtils.join; public abstract class AbstractGradleExecuter implements GradleExecuter, ResettableExpectations { diff --git a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/InProcessGradleExecuter.java b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/InProcessGradleExecuter.java index 0f1c25449f7a9..1ae43c6e67c34 100755 --- a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/InProcessGradleExecuter.java +++ b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/InProcessGradleExecuter.java @@ -77,7 +77,7 @@ import org.gradle.tooling.internal.provider.serialization.PayloadClassLoaderRegistry; import org.gradle.tooling.internal.provider.serialization.PayloadSerializer; import org.gradle.tooling.internal.provider.serialization.SerializeMap; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.GUtil; import org.gradle.util.GradleVersion; import org.gradle.util.internal.IncubationLogger; diff --git a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/OutputScrapingExecutionResult.java b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/OutputScrapingExecutionResult.java index 3a1d658beaa98..d928552387675 100644 --- a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/OutputScrapingExecutionResult.java +++ b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/executer/OutputScrapingExecutionResult.java @@ -24,6 +24,7 @@ import org.gradle.launcher.daemon.server.DaemonStateCoordinator; import org.gradle.launcher.daemon.server.health.LowHeapSpaceDaemonExpirationStrategy; import org.gradle.util.GUtil; +import org.gradle.util.internal.CollectionUtils; import org.junit.ComparisonFailure; import java.util.ArrayList; @@ -57,7 +58,7 @@ public class OutputScrapingExecutionResult implements ExecutionResult { private Set tasks; public static List flattenTaskPaths(Object[] taskPaths) { - return org.gradle.util.CollectionUtils.toStringList(GUtil.flatten(taskPaths, Lists.newArrayList())); + return CollectionUtils.toStringList(GUtil.flatten(taskPaths, Lists.newArrayList())); } /** diff --git a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/logging/GroupedTaskFixture.java b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/logging/GroupedTaskFixture.java index 6ccb8a52ac5d3..8f77b622a1b8f 100644 --- a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/logging/GroupedTaskFixture.java +++ b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/logging/GroupedTaskFixture.java @@ -21,8 +21,8 @@ import java.util.ArrayList; import java.util.List; -import static org.gradle.util.CollectionUtils.filter; -import static org.gradle.util.CollectionUtils.join; +import static org.gradle.util.internal.CollectionUtils.filter; +import static org.gradle.util.internal.CollectionUtils.join; public class GroupedTaskFixture { diff --git a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/logging/GroupedTransformationFixture.java b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/logging/GroupedTransformationFixture.java index 09868f696b28f..95329f9f0250a 100644 --- a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/logging/GroupedTransformationFixture.java +++ b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/logging/GroupedTransformationFixture.java @@ -21,8 +21,8 @@ import java.util.ArrayList; import java.util.List; -import static org.gradle.util.CollectionUtils.filter; -import static org.gradle.util.CollectionUtils.join; +import static org.gradle.util.internal.CollectionUtils.filter; +import static org.gradle.util.internal.CollectionUtils.join; public class GroupedTransformationFixture { private final String initialSubjectType; diff --git a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/versions/ReleasedVersionDistributions.java b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/versions/ReleasedVersionDistributions.java index c9f09ccb70e14..282dfc4bf2be3 100644 --- a/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/versions/ReleasedVersionDistributions.java +++ b/subprojects/internal-integ-testing/src/main/groovy/org/gradle/integtests/fixtures/versions/ReleasedVersionDistributions.java @@ -21,15 +21,15 @@ import org.gradle.integtests.fixtures.executer.GradleDistribution; import org.gradle.integtests.fixtures.executer.IntegrationTestBuildContext; import org.gradle.internal.Factory; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.GradleVersion; import java.util.Comparator; import java.util.List; import java.util.Properties; -import static org.gradle.util.CollectionUtils.findFirst; -import static org.gradle.util.CollectionUtils.sort; +import static org.gradle.util.internal.CollectionUtils.findFirst; +import static org.gradle.util.internal.CollectionUtils.sort; /** * Provides access to {@link GradleDistribution}s for versions of Gradle that have been released. diff --git a/subprojects/internal-testing/src/main/groovy/org/gradle/test/fixtures/archive/ArchiveTestFixture.groovy b/subprojects/internal-testing/src/main/groovy/org/gradle/test/fixtures/archive/ArchiveTestFixture.groovy index b543173b8f485..295018b06811f 100644 --- a/subprojects/internal-testing/src/main/groovy/org/gradle/test/fixtures/archive/ArchiveTestFixture.groovy +++ b/subprojects/internal-testing/src/main/groovy/org/gradle/test/fixtures/archive/ArchiveTestFixture.groovy @@ -19,7 +19,7 @@ package org.gradle.test.fixtures.archive import com.google.common.collect.ArrayListMultimap import com.google.common.collect.LinkedListMultimap import com.google.common.collect.ListMultimap -import org.gradle.util.CollectionUtils +import org.gradle.util.internal.CollectionUtils import org.hamcrest.Matcher import static org.hamcrest.CoreMatchers.equalTo diff --git a/subprojects/ivy/src/main/java/org/gradle/api/publish/ivy/internal/publisher/IvyDescriptorFileGenerator.java b/subprojects/ivy/src/main/java/org/gradle/api/publish/ivy/internal/publisher/IvyDescriptorFileGenerator.java index 64e265e862087..b9e09eef8e539 100644 --- a/subprojects/ivy/src/main/java/org/gradle/api/publish/ivy/internal/publisher/IvyDescriptorFileGenerator.java +++ b/subprojects/ivy/src/main/java/org/gradle/api/publish/ivy/internal/publisher/IvyDescriptorFileGenerator.java @@ -36,7 +36,7 @@ import org.gradle.api.publish.ivy.internal.dependency.IvyExcludeRule; import org.gradle.internal.xml.SimpleXmlWriter; import org.gradle.internal.xml.XmlTransformer; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.xml.namespace.QName; import java.io.File; diff --git a/subprojects/ivy/src/test/groovy/org/gradle/api/publish/ivy/internal/publisher/ValidatingIvyPublisherTest.groovy b/subprojects/ivy/src/test/groovy/org/gradle/api/publish/ivy/internal/publisher/ValidatingIvyPublisherTest.groovy index c6aa94a621c3d..ff7dd600049f8 100644 --- a/subprojects/ivy/src/test/groovy/org/gradle/api/publish/ivy/internal/publisher/ValidatingIvyPublisherTest.groovy +++ b/subprojects/ivy/src/test/groovy/org/gradle/api/publish/ivy/internal/publisher/ValidatingIvyPublisherTest.groovy @@ -37,7 +37,7 @@ import spock.lang.Unroll import javax.xml.namespace.QName import static java.util.Collections.emptySet -import static org.gradle.util.CollectionUtils.toSet +import static org.gradle.util.internal.CollectionUtils.toSet class ValidatingIvyPublisherTest extends Specification { @Rule diff --git a/subprojects/language-groovy/src/main/java/org/gradle/api/internal/tasks/compile/NormalizingGroovyCompiler.java b/subprojects/language-groovy/src/main/java/org/gradle/api/internal/tasks/compile/NormalizingGroovyCompiler.java index 80ea08882b407..f57f389f75486 100644 --- a/subprojects/language-groovy/src/main/java/org/gradle/api/internal/tasks/compile/NormalizingGroovyCompiler.java +++ b/subprojects/language-groovy/src/main/java/org/gradle/api/internal/tasks/compile/NormalizingGroovyCompiler.java @@ -26,7 +26,7 @@ import org.gradle.api.tasks.WorkResult; import org.gradle.api.tasks.WorkResults; import org.gradle.language.base.internal.compile.Compiler; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.File; import java.util.List; diff --git a/subprojects/language-java/src/integTest/groovy/org/gradle/api/tasks/compile/JavaCompileIntegrationTest.groovy b/subprojects/language-java/src/integTest/groovy/org/gradle/api/tasks/compile/JavaCompileIntegrationTest.groovy index f6af7a76f22a0..26f29221e643c 100644 --- a/subprojects/language-java/src/integTest/groovy/org/gradle/api/tasks/compile/JavaCompileIntegrationTest.groovy +++ b/subprojects/language-java/src/integTest/groovy/org/gradle/api/tasks/compile/JavaCompileIntegrationTest.groovy @@ -411,7 +411,7 @@ class JavaCompileIntegrationTest extends AbstractPluginIntegrationTest { }.files inputs.files(lazyInputs) doLast { - assert org.gradle.util.CollectionUtils.single(lazyInputs.files).toPath().endsWith("${expectedDirName}") + assert org.gradle.util.internal.CollectionUtils.single(lazyInputs.files).toPath().endsWith("${expectedDirName}") } } """ diff --git a/subprojects/language-java/src/main/java/org/gradle/api/internal/tasks/compile/NormalizingJavaCompiler.java b/subprojects/language-java/src/main/java/org/gradle/api/internal/tasks/compile/NormalizingJavaCompiler.java index 1114076cdd1e0..4b27ee26e7295 100644 --- a/subprojects/language-java/src/main/java/org/gradle/api/internal/tasks/compile/NormalizingJavaCompiler.java +++ b/subprojects/language-java/src/main/java/org/gradle/api/internal/tasks/compile/NormalizingJavaCompiler.java @@ -23,7 +23,7 @@ import org.gradle.api.tasks.WorkResult; import org.gradle.api.tasks.WorkResults; import org.gradle.language.base.internal.compile.Compiler; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.io.File; diff --git a/subprojects/language-java/src/main/java/org/gradle/api/tasks/compile/CompileOptions.java b/subprojects/language-java/src/main/java/org/gradle/api/tasks/compile/CompileOptions.java index dca86a6715f59..d845b1d73a40a 100644 --- a/subprojects/language-java/src/main/java/org/gradle/api/tasks/compile/CompileOptions.java +++ b/subprojects/language-java/src/main/java/org/gradle/api/tasks/compile/CompileOptions.java @@ -37,7 +37,7 @@ import org.gradle.api.tasks.PathSensitive; import org.gradle.api.tasks.PathSensitivity; import org.gradle.process.CommandLineArgumentProvider; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import javax.inject.Inject; diff --git a/subprojects/language-java/src/main/java/org/gradle/external/javadoc/internal/GroupsJavadocOptionFileOption.java b/subprojects/language-java/src/main/java/org/gradle/external/javadoc/internal/GroupsJavadocOptionFileOption.java index 77b38c56f6a48..1a7ae4e9acc70 100644 --- a/subprojects/language-java/src/main/java/org/gradle/external/javadoc/internal/GroupsJavadocOptionFileOption.java +++ b/subprojects/language-java/src/main/java/org/gradle/external/javadoc/internal/GroupsJavadocOptionFileOption.java @@ -18,7 +18,7 @@ import com.google.common.collect.Lists; import com.google.common.collect.Maps; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.IOException; import java.util.List; diff --git a/subprojects/language-native/src/main/java/org/gradle/language/nativeplatform/internal/AbstractHeaderExportingDependentSourceSet.java b/subprojects/language-native/src/main/java/org/gradle/language/nativeplatform/internal/AbstractHeaderExportingDependentSourceSet.java index 64d3246b04121..5b879ce08a15a 100644 --- a/subprojects/language-native/src/main/java/org/gradle/language/nativeplatform/internal/AbstractHeaderExportingDependentSourceSet.java +++ b/subprojects/language-native/src/main/java/org/gradle/language/nativeplatform/internal/AbstractHeaderExportingDependentSourceSet.java @@ -17,7 +17,7 @@ import org.gradle.language.base.LanguageSourceSet; import org.gradle.language.nativeplatform.HeaderExportingSourceSet; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.File; import java.util.ArrayList; diff --git a/subprojects/language-native/src/main/java/org/gradle/language/nativeplatform/internal/CompileTaskConfig.java b/subprojects/language-native/src/main/java/org/gradle/language/nativeplatform/internal/CompileTaskConfig.java index dc1c99928afde..3f38104481fa3 100644 --- a/subprojects/language-native/src/main/java/org/gradle/language/nativeplatform/internal/CompileTaskConfig.java +++ b/subprojects/language-native/src/main/java/org/gradle/language/nativeplatform/internal/CompileTaskConfig.java @@ -39,7 +39,7 @@ import org.gradle.nativeplatform.toolchain.internal.PlatformToolProvider; import org.gradle.nativeplatform.toolchain.internal.ToolType; import org.gradle.platform.base.BinarySpec; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.File; import java.util.Collection; diff --git a/subprojects/language-native/src/main/java/org/gradle/language/nativeplatform/internal/incremental/sourceparser/DefaultIncludeDirectives.java b/subprojects/language-native/src/main/java/org/gradle/language/nativeplatform/internal/incremental/sourceparser/DefaultIncludeDirectives.java index a5589ce1a6005..5d6c7981b75cd 100644 --- a/subprojects/language-native/src/main/java/org/gradle/language/nativeplatform/internal/incremental/sourceparser/DefaultIncludeDirectives.java +++ b/subprojects/language-native/src/main/java/org/gradle/language/nativeplatform/internal/incremental/sourceparser/DefaultIncludeDirectives.java @@ -25,7 +25,7 @@ import org.gradle.language.nativeplatform.internal.IncludeType; import org.gradle.language.nativeplatform.internal.Macro; import org.gradle.language.nativeplatform.internal.MacroFunction; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.util.Collection; diff --git a/subprojects/launcher/src/integTest/groovy/org/gradle/launcher/continuous/DeploymentContinuousBuildIntegrationTest.groovy b/subprojects/launcher/src/integTest/groovy/org/gradle/launcher/continuous/DeploymentContinuousBuildIntegrationTest.groovy index 5fee9cd1fe68b..dd4f4e45b711f 100644 --- a/subprojects/launcher/src/integTest/groovy/org/gradle/launcher/continuous/DeploymentContinuousBuildIntegrationTest.groovy +++ b/subprojects/launcher/src/integTest/groovy/org/gradle/launcher/continuous/DeploymentContinuousBuildIntegrationTest.groovy @@ -20,7 +20,7 @@ import org.gradle.integtests.fixtures.AbstractContinuousIntegrationTest import org.gradle.integtests.fixtures.ToBeFixedForConfigurationCache import org.gradle.test.fixtures.TestDeploymentFixture -import static org.gradle.util.CollectionUtils.single +import static org.gradle.util.internal.CollectionUtils.single class DeploymentContinuousBuildIntegrationTest extends AbstractContinuousIntegrationTest { def fixture = new TestDeploymentFixture() diff --git a/subprojects/launcher/src/main/java/org/gradle/launcher/cli/converter/LayoutToPropertiesConverter.java b/subprojects/launcher/src/main/java/org/gradle/launcher/cli/converter/LayoutToPropertiesConverter.java index 201bcbbf494e3..4c80e96e9f6df 100644 --- a/subprojects/launcher/src/main/java/org/gradle/launcher/cli/converter/LayoutToPropertiesConverter.java +++ b/subprojects/launcher/src/main/java/org/gradle/launcher/cli/converter/LayoutToPropertiesConverter.java @@ -32,7 +32,7 @@ import org.gradle.launcher.configuration.BuildLayoutResult; import org.gradle.launcher.configuration.InitialProperties; import org.gradle.launcher.daemon.configuration.DaemonBuildOptions; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.io.File; diff --git a/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/client/DefaultDaemonConnector.java b/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/client/DefaultDaemonConnector.java index 6b6d7d7480d3f..f80f781291804 100644 --- a/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/client/DefaultDaemonConnector.java +++ b/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/client/DefaultDaemonConnector.java @@ -42,7 +42,7 @@ import org.gradle.launcher.daemon.registry.DaemonStopEvent; import org.gradle.launcher.daemon.registry.DaemonStopEvents; import org.gradle.launcher.daemon.server.api.DaemonStateControl; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.Collection; import java.util.Date; diff --git a/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/client/DefaultDaemonStarter.java b/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/client/DefaultDaemonStarter.java index b82e11e2dfda7..174c027bd17b3 100755 --- a/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/client/DefaultDaemonStarter.java +++ b/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/client/DefaultDaemonStarter.java @@ -40,7 +40,7 @@ import org.gradle.launcher.daemon.registry.DaemonDir; import org.gradle.process.internal.DefaultExecActionFactory; import org.gradle.process.internal.ExecHandle; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.GFileUtils; import org.gradle.util.GradleVersion; diff --git a/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/configuration/DaemonJvmOptions.java b/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/configuration/DaemonJvmOptions.java index b66901b569a22..a0b0e7e653f83 100644 --- a/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/configuration/DaemonJvmOptions.java +++ b/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/configuration/DaemonJvmOptions.java @@ -22,7 +22,7 @@ import org.gradle.cache.internal.HeapProportionalCacheSizer; import org.gradle.process.internal.CurrentProcess; import org.gradle.process.internal.JvmOptions; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.ArrayList; import java.util.List; diff --git a/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/registry/DaemonStopEvents.java b/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/registry/DaemonStopEvents.java index f641701714f2b..cc6d3b4d81071 100644 --- a/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/registry/DaemonStopEvents.java +++ b/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/registry/DaemonStopEvents.java @@ -17,7 +17,7 @@ package org.gradle.launcher.daemon.registry; import org.gradle.api.specs.Spec; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.ArrayList; import java.util.Comparator; diff --git a/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/CompatibleDaemonExpirationStrategy.java b/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/CompatibleDaemonExpirationStrategy.java index 63cd9f19ada9f..8e4b42239be56 100644 --- a/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/CompatibleDaemonExpirationStrategy.java +++ b/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/CompatibleDaemonExpirationStrategy.java @@ -24,7 +24,7 @@ import org.gradle.launcher.daemon.server.expiry.DaemonExpirationResult; import org.gradle.launcher.daemon.server.expiry.DaemonExpirationStatus; import org.gradle.launcher.daemon.server.expiry.DaemonExpirationStrategy; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.Collection; diff --git a/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/health/gc/DefaultGarbageCollectionMonitor.java b/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/health/gc/DefaultGarbageCollectionMonitor.java index 6ab8d4bff66c9..438437914c56f 100644 --- a/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/health/gc/DefaultGarbageCollectionMonitor.java +++ b/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/health/gc/DefaultGarbageCollectionMonitor.java @@ -19,7 +19,7 @@ import com.google.common.annotations.VisibleForTesting; import org.gradle.api.specs.Spec; import org.gradle.internal.time.Time; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.lang.management.GarbageCollectorMXBean; import java.lang.management.ManagementFactory; diff --git a/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/health/gc/GarbageCollectorMonitoringStrategy.java b/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/health/gc/GarbageCollectorMonitoringStrategy.java index 6fc3a4f926bcb..be76bfabfc9b8 100644 --- a/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/health/gc/GarbageCollectorMonitoringStrategy.java +++ b/subprojects/launcher/src/main/java/org/gradle/launcher/daemon/server/health/gc/GarbageCollectorMonitoringStrategy.java @@ -21,7 +21,7 @@ import org.gradle.api.logging.Logging; import org.gradle.api.specs.Spec; import org.gradle.internal.jvm.Jvm; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.lang.management.GarbageCollectorMXBean; import java.lang.management.ManagementFactory; diff --git a/subprojects/launcher/src/main/java/org/gradle/tooling/internal/provider/TestExecutionRequestAction.java b/subprojects/launcher/src/main/java/org/gradle/tooling/internal/provider/TestExecutionRequestAction.java index 1d831399843c3..82df886eeed62 100644 --- a/subprojects/launcher/src/main/java/org/gradle/tooling/internal/provider/TestExecutionRequestAction.java +++ b/subprojects/launcher/src/main/java/org/gradle/tooling/internal/provider/TestExecutionRequestAction.java @@ -27,7 +27,7 @@ import org.gradle.tooling.internal.protocol.test.InternalJvmTestRequest; import org.gradle.tooling.internal.provider.test.ProviderInternalJvmTestRequest; import org.gradle.tooling.internal.provider.test.ProviderInternalTestExecutionRequest; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.Collection; import java.util.Collections; diff --git a/subprojects/launcher/src/main/java/org/gradle/tooling/internal/provider/serialization/DefaultPayloadClassLoaderRegistry.java b/subprojects/launcher/src/main/java/org/gradle/tooling/internal/provider/serialization/DefaultPayloadClassLoaderRegistry.java index fb1f93d0074ba..c18348283dcf3 100644 --- a/subprojects/launcher/src/main/java/org/gradle/tooling/internal/provider/serialization/DefaultPayloadClassLoaderRegistry.java +++ b/subprojects/launcher/src/main/java/org/gradle/tooling/internal/provider/serialization/DefaultPayloadClassLoaderRegistry.java @@ -24,7 +24,7 @@ import org.gradle.internal.classloader.ClassLoaderVisitor; import org.gradle.internal.classloader.SystemClassLoaderSpec; import org.gradle.internal.classloader.VisitableURLClassLoader; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/subprojects/maven/src/main/java/org/gradle/api/publish/maven/internal/publication/DefaultMavenPublication.java b/subprojects/maven/src/main/java/org/gradle/api/publish/maven/internal/publication/DefaultMavenPublication.java index e793788a4ba44..8f99d6d8b21bb 100644 --- a/subprojects/maven/src/main/java/org/gradle/api/publish/maven/internal/publication/DefaultMavenPublication.java +++ b/subprojects/maven/src/main/java/org/gradle/api/publish/maven/internal/publication/DefaultMavenPublication.java @@ -85,7 +85,7 @@ import org.gradle.internal.DisplayName; import org.gradle.internal.reflect.Instantiator; import org.gradle.internal.typeconversion.NotationParser; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.GUtil; import javax.annotation.Nullable; diff --git a/subprojects/maven/src/test/groovy/org/gradle/api/publish/maven/internal/publisher/ValidatingMavenPublisherTest.groovy b/subprojects/maven/src/test/groovy/org/gradle/api/publish/maven/internal/publisher/ValidatingMavenPublisherTest.groovy index be06a1a77ccce..78dde5bfc8ffc 100644 --- a/subprojects/maven/src/test/groovy/org/gradle/api/publish/maven/internal/publisher/ValidatingMavenPublisherTest.groovy +++ b/subprojects/maven/src/test/groovy/org/gradle/api/publish/maven/internal/publisher/ValidatingMavenPublisherTest.groovy @@ -34,7 +34,7 @@ import spock.lang.Specification import spock.lang.Unroll import static java.util.Collections.emptySet -import static org.gradle.util.CollectionUtils.toSet +import static org.gradle.util.internal.CollectionUtils.toSet class ValidatingMavenPublisherTest extends Specification { @Rule diff --git a/subprojects/maven/src/test/groovy/org/gradle/api/publish/maven/internal/tasks/MavenPomFileGeneratorTest.groovy b/subprojects/maven/src/test/groovy/org/gradle/api/publish/maven/internal/tasks/MavenPomFileGeneratorTest.groovy index ebbc972e0ba3a..738bfdc49814e 100644 --- a/subprojects/maven/src/test/groovy/org/gradle/api/publish/maven/internal/tasks/MavenPomFileGeneratorTest.groovy +++ b/subprojects/maven/src/test/groovy/org/gradle/api/publish/maven/internal/tasks/MavenPomFileGeneratorTest.groovy @@ -38,7 +38,7 @@ import org.gradle.api.publish.maven.internal.publication.MavenPomInternal import org.gradle.api.publish.maven.internal.publication.ReadableMavenProjectIdentity import org.gradle.test.fixtures.file.TestFile import org.gradle.test.fixtures.file.TestNameTestDirectoryProvider -import org.gradle.util.CollectionUtils +import org.gradle.util.internal.CollectionUtils import org.gradle.util.TestUtil import org.gradle.util.TextUtil import org.junit.Rule diff --git a/subprojects/messaging/src/main/java/org/gradle/internal/dispatch/MethodInvocation.java b/subprojects/messaging/src/main/java/org/gradle/internal/dispatch/MethodInvocation.java index da8396cbe64c3..90b01d2978095 100644 --- a/subprojects/messaging/src/main/java/org/gradle/internal/dispatch/MethodInvocation.java +++ b/subprojects/messaging/src/main/java/org/gradle/internal/dispatch/MethodInvocation.java @@ -15,7 +15,7 @@ */ package org.gradle.internal.dispatch; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.lang.reflect.Method; import java.util.Arrays; diff --git a/subprojects/messaging/src/main/java/org/gradle/internal/event/BroadcastDispatch.java b/subprojects/messaging/src/main/java/org/gradle/internal/event/BroadcastDispatch.java index 379d5df8110c1..792bc97a6ece8 100755 --- a/subprojects/messaging/src/main/java/org/gradle/internal/event/BroadcastDispatch.java +++ b/subprojects/messaging/src/main/java/org/gradle/internal/event/BroadcastDispatch.java @@ -21,7 +21,7 @@ import org.gradle.internal.dispatch.Dispatch; import org.gradle.internal.dispatch.MethodInvocation; import org.gradle.internal.dispatch.ReflectionDispatch; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.lang.reflect.Method; import java.util.ArrayList; diff --git a/subprojects/model-core/src/main/java/org/gradle/internal/instantiation/generator/AsmBackedClassGenerator.java b/subprojects/model-core/src/main/java/org/gradle/internal/instantiation/generator/AsmBackedClassGenerator.java index c9a11b6e5b0fd..be6cd954c4dd6 100644 --- a/subprojects/model-core/src/main/java/org/gradle/internal/instantiation/generator/AsmBackedClassGenerator.java +++ b/subprojects/model-core/src/main/java/org/gradle/internal/instantiation/generator/AsmBackedClassGenerator.java @@ -58,7 +58,7 @@ import org.gradle.internal.state.OwnerAware; import org.gradle.model.internal.asm.AsmClassGenerator; import org.gradle.model.internal.asm.ClassGeneratorSuffixRegistry; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.ConfigureUtil; import org.objectweb.asm.AnnotationVisitor; import org.objectweb.asm.ClassWriter; diff --git a/subprojects/model-core/src/main/java/org/gradle/internal/reflect/JavaPropertyReflectionUtil.java b/subprojects/model-core/src/main/java/org/gradle/internal/reflect/JavaPropertyReflectionUtil.java index d6622b38520f1..1bb805b745abd 100644 --- a/subprojects/model-core/src/main/java/org/gradle/internal/reflect/JavaPropertyReflectionUtil.java +++ b/subprojects/model-core/src/main/java/org/gradle/internal/reflect/JavaPropertyReflectionUtil.java @@ -19,7 +19,7 @@ import com.google.common.reflect.TypeToken; import org.apache.commons.lang.reflect.MethodUtils; import org.gradle.internal.UncheckedException; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.lang.annotation.Annotation; diff --git a/subprojects/model-core/src/main/java/org/gradle/model/internal/core/ModelMapModelProjection.java b/subprojects/model-core/src/main/java/org/gradle/model/internal/core/ModelMapModelProjection.java index fcabaa0a0b8d8..4b8af0102c528 100644 --- a/subprojects/model-core/src/main/java/org/gradle/model/internal/core/ModelMapModelProjection.java +++ b/subprojects/model-core/src/main/java/org/gradle/model/internal/core/ModelMapModelProjection.java @@ -25,7 +25,7 @@ import org.gradle.model.internal.manage.instance.ManagedInstance; import org.gradle.model.internal.type.ModelType; import org.gradle.model.internal.type.ModelTypes; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.util.Collection; diff --git a/subprojects/model-core/src/main/java/org/gradle/model/internal/inspect/DefaultMethodRuleDefinition.java b/subprojects/model-core/src/main/java/org/gradle/model/internal/inspect/DefaultMethodRuleDefinition.java index d632fc79f8c69..a313abb847c31 100644 --- a/subprojects/model-core/src/main/java/org/gradle/model/internal/inspect/DefaultMethodRuleDefinition.java +++ b/subprojects/model-core/src/main/java/org/gradle/model/internal/inspect/DefaultMethodRuleDefinition.java @@ -35,7 +35,7 @@ import java.util.Collections; import java.util.List; -import static org.gradle.util.CollectionUtils.findFirst; +import static org.gradle.util.internal.CollectionUtils.findFirst; @ThreadSafe public class DefaultMethodRuleDefinition implements MethodRuleDefinition { diff --git a/subprojects/model-core/src/main/java/org/gradle/model/internal/inspect/ModelRuleExtractor.java b/subprojects/model-core/src/main/java/org/gradle/model/internal/inspect/ModelRuleExtractor.java index d325d98ca5cf2..0e3dabfce46a6 100644 --- a/subprojects/model-core/src/main/java/org/gradle/model/internal/inspect/ModelRuleExtractor.java +++ b/subprojects/model-core/src/main/java/org/gradle/model/internal/inspect/ModelRuleExtractor.java @@ -53,7 +53,7 @@ import org.gradle.model.internal.registry.ModelRegistry; import org.gradle.model.internal.registry.RuleContext; import org.gradle.model.internal.type.ModelType; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.lang.reflect.Constructor; diff --git a/subprojects/model-core/src/main/java/org/gradle/model/internal/registry/ModelPathSuggestionProvider.java b/subprojects/model-core/src/main/java/org/gradle/model/internal/registry/ModelPathSuggestionProvider.java index 805c65be7421b..ac9c9ec03eec5 100644 --- a/subprojects/model-core/src/main/java/org/gradle/model/internal/registry/ModelPathSuggestionProvider.java +++ b/subprojects/model-core/src/main/java/org/gradle/model/internal/registry/ModelPathSuggestionProvider.java @@ -23,7 +23,7 @@ import org.apache.commons.lang.StringUtils; import org.gradle.api.Transformer; import org.gradle.model.internal.core.ModelPath; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.List; diff --git a/subprojects/model-core/src/main/java/org/gradle/model/internal/registry/UnboundRulesProcessor.java b/subprojects/model-core/src/main/java/org/gradle/model/internal/registry/UnboundRulesProcessor.java index 12ddeb7d7e1df..8b85d7f669b1a 100644 --- a/subprojects/model-core/src/main/java/org/gradle/model/internal/registry/UnboundRulesProcessor.java +++ b/subprojects/model-core/src/main/java/org/gradle/model/internal/registry/UnboundRulesProcessor.java @@ -23,7 +23,7 @@ import org.gradle.model.internal.core.ModelReference; import org.gradle.model.internal.report.unbound.UnboundRule; import org.gradle.model.internal.report.unbound.UnboundRuleInput; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.ArrayList; import java.util.Collection; diff --git a/subprojects/model-core/src/main/java/org/gradle/model/internal/report/AmbiguousBindingReporter.java b/subprojects/model-core/src/main/java/org/gradle/model/internal/report/AmbiguousBindingReporter.java index 355ecb7e578e8..e84832ef0aa5e 100644 --- a/subprojects/model-core/src/main/java/org/gradle/model/internal/report/AmbiguousBindingReporter.java +++ b/subprojects/model-core/src/main/java/org/gradle/model/internal/report/AmbiguousBindingReporter.java @@ -21,7 +21,7 @@ import org.gradle.model.internal.core.ModelPath; import org.gradle.model.internal.core.ModelReference; import org.gradle.model.internal.core.rule.describe.ModelRuleDescriptor; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.PrintWriter; import java.io.StringWriter; diff --git a/subprojects/model-core/src/main/java/org/gradle/util/ConfigureUtil.java b/subprojects/model-core/src/main/java/org/gradle/util/ConfigureUtil.java index f81a391d60699..f15276c40ef46 100644 --- a/subprojects/model-core/src/main/java/org/gradle/util/ConfigureUtil.java +++ b/subprojects/model-core/src/main/java/org/gradle/util/ConfigureUtil.java @@ -29,7 +29,7 @@ import java.util.Collection; import java.util.Map; -import static org.gradle.util.CollectionUtils.toStringList; +import static org.gradle.util.internal.CollectionUtils.toStringList; public class ConfigureUtil { diff --git a/subprojects/model-groovy/src/main/java/org/gradle/model/dsl/internal/transform/RuleVisitor.java b/subprojects/model-groovy/src/main/java/org/gradle/model/dsl/internal/transform/RuleVisitor.java index d160a84821090..497ad02b8eab9 100644 --- a/subprojects/model-groovy/src/main/java/org/gradle/model/dsl/internal/transform/RuleVisitor.java +++ b/subprojects/model-groovy/src/main/java/org/gradle/model/dsl/internal/transform/RuleVisitor.java @@ -33,7 +33,7 @@ import org.gradle.internal.SystemProperties; import org.gradle.model.dsl.internal.inputs.PotentialInputs; import org.gradle.model.internal.core.ModelPath; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.lang.reflect.Modifier; import java.net.URI; diff --git a/subprojects/persistent-cache/src/main/java/org/gradle/cache/internal/DefaultCacheAccess.java b/subprojects/persistent-cache/src/main/java/org/gradle/cache/internal/DefaultCacheAccess.java index b033772ea99fe..d99562684d1cc 100644 --- a/subprojects/persistent-cache/src/main/java/org/gradle/cache/internal/DefaultCacheAccess.java +++ b/subprojects/persistent-cache/src/main/java/org/gradle/cache/internal/DefaultCacheAccess.java @@ -40,7 +40,7 @@ import org.gradle.internal.concurrent.ExecutorFactory; import org.gradle.internal.concurrent.ManagedExecutor; import org.gradle.internal.serialize.Serializer; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/subprojects/platform-base/src/main/java/org/gradle/platform/base/internal/DefaultPlatformResolvers.java b/subprojects/platform-base/src/main/java/org/gradle/platform/base/internal/DefaultPlatformResolvers.java index a9fcf3dc12caf..228f5d0017092 100644 --- a/subprojects/platform-base/src/main/java/org/gradle/platform/base/internal/DefaultPlatformResolvers.java +++ b/subprojects/platform-base/src/main/java/org/gradle/platform/base/internal/DefaultPlatformResolvers.java @@ -21,7 +21,7 @@ import org.gradle.api.specs.Spec; import org.gradle.platform.base.Platform; import org.gradle.platform.base.PlatformContainer; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.List; diff --git a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/internal/NativePlatformResolver.java b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/internal/NativePlatformResolver.java index de68d10f33c47..6c75b2de99d28 100644 --- a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/internal/NativePlatformResolver.java +++ b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/internal/NativePlatformResolver.java @@ -20,7 +20,7 @@ import org.gradle.nativeplatform.platform.internal.NativePlatforms; import org.gradle.platform.base.internal.PlatformRequirement; import org.gradle.platform.base.internal.PlatformResolver; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; public class NativePlatformResolver implements PlatformResolver { private final NativePlatforms nativePlatforms; diff --git a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/internal/configure/NativeComponentRules.java b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/internal/configure/NativeComponentRules.java index ce6c695c65156..02acc4c17a573 100644 --- a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/internal/configure/NativeComponentRules.java +++ b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/internal/configure/NativeComponentRules.java @@ -27,7 +27,7 @@ import org.gradle.nativeplatform.platform.internal.NativePlatformInternal; import org.gradle.nativeplatform.platform.internal.NativePlatforms; import org.gradle.platform.base.internal.*; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.Collections; import java.util.List; diff --git a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/internal/modulemap/GenerateModuleMapFile.java b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/internal/modulemap/GenerateModuleMapFile.java index fd2847b0731cd..a2028a74db8e2 100644 --- a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/internal/modulemap/GenerateModuleMapFile.java +++ b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/internal/modulemap/GenerateModuleMapFile.java @@ -27,8 +27,8 @@ import java.io.IOException; import java.util.List; -import static org.gradle.util.CollectionUtils.collect; -import static org.gradle.util.CollectionUtils.filter; +import static org.gradle.util.internal.CollectionUtils.collect; +import static org.gradle.util.internal.CollectionUtils.filter; public class GenerateModuleMapFile { public static void generateFile(File moduleMapFile, String moduleName, List publicHeaderDirs) { diff --git a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/internal/resolve/NativeBinaryResolveResult.java b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/internal/resolve/NativeBinaryResolveResult.java index ed17d4a7452a4..7bc6ca8ab76bc 100644 --- a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/internal/resolve/NativeBinaryResolveResult.java +++ b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/internal/resolve/NativeBinaryResolveResult.java @@ -21,7 +21,7 @@ import org.gradle.nativeplatform.NativeLibraryBinary; import org.gradle.nativeplatform.NativeDependencySet; import org.gradle.nativeplatform.NativeBinarySpec; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.ArrayList; import java.util.Collection; diff --git a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/PCHUtils.java b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/PCHUtils.java index 6bc60c66d5ebb..8387f5d1c3f67 100644 --- a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/PCHUtils.java +++ b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/PCHUtils.java @@ -23,7 +23,7 @@ import org.gradle.api.UncheckedIOException; import org.gradle.nativeplatform.toolchain.internal.compilespec.CPCHCompileSpec; import org.gradle.nativeplatform.toolchain.internal.compilespec.CppPCHCompileSpec; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.File; import java.io.IOException; diff --git a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/msvcpp/AbstractWindowsKitComponentLocator.java b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/msvcpp/AbstractWindowsKitComponentLocator.java index 9c093b681619f..0ee33a1b10f38 100644 --- a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/msvcpp/AbstractWindowsKitComponentLocator.java +++ b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/msvcpp/AbstractWindowsKitComponentLocator.java @@ -26,7 +26,7 @@ import org.gradle.platform.base.internal.toolchain.ComponentFound; import org.gradle.platform.base.internal.toolchain.ComponentNotFound; import org.gradle.platform.base.internal.toolchain.SearchResult; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.VersionNumber; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/msvcpp/DefaultVisualStudioLocator.java b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/msvcpp/DefaultVisualStudioLocator.java index abd7442b83a93..cdc8a467e3e4b 100644 --- a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/msvcpp/DefaultVisualStudioLocator.java +++ b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/msvcpp/DefaultVisualStudioLocator.java @@ -28,7 +28,7 @@ import org.gradle.platform.base.internal.toolchain.ComponentFound; import org.gradle.platform.base.internal.toolchain.ComponentNotFound; import org.gradle.platform.base.internal.toolchain.SearchResult; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.VersionNumber; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/msvcpp/EscapeUserArgs.java b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/msvcpp/EscapeUserArgs.java index 74bd13d18e93d..124e6e5e6dcad 100644 --- a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/msvcpp/EscapeUserArgs.java +++ b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/msvcpp/EscapeUserArgs.java @@ -17,7 +17,7 @@ package org.gradle.nativeplatform.toolchain.internal.msvcpp; import org.gradle.api.Transformer; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.List; diff --git a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/swift/SwiftCompiler.java b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/swift/SwiftCompiler.java index 0ad296575a6d3..3efda200dc5d9 100644 --- a/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/swift/SwiftCompiler.java +++ b/subprojects/platform-native/src/main/java/org/gradle/nativeplatform/toolchain/internal/swift/SwiftCompiler.java @@ -38,7 +38,7 @@ import org.gradle.nativeplatform.toolchain.internal.CommandLineToolInvocation; import org.gradle.nativeplatform.toolchain.internal.CommandLineToolInvocationWorker; import org.gradle.nativeplatform.toolchain.internal.compilespec.SwiftCompileSpec; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.GFileUtils; import org.gradle.util.VersionNumber; diff --git a/subprojects/platform-native/src/test/groovy/org/gradle/nativeplatform/plugins/NativeComponentModelPluginTest.groovy b/subprojects/platform-native/src/test/groovy/org/gradle/nativeplatform/plugins/NativeComponentModelPluginTest.groovy index c7344d3be5520..e5c3931845d8f 100644 --- a/subprojects/platform-native/src/test/groovy/org/gradle/nativeplatform/plugins/NativeComponentModelPluginTest.groovy +++ b/subprojects/platform-native/src/test/groovy/org/gradle/nativeplatform/plugins/NativeComponentModelPluginTest.groovy @@ -47,7 +47,7 @@ import org.gradle.util.TestUtil import spock.lang.Issue import static org.gradle.model.internal.type.ModelTypes.modelMap -import static org.gradle.util.CollectionUtils.single +import static org.gradle.util.internal.CollectionUtils.single class NativeComponentModelPluginTest extends AbstractProjectBuilderSpec { def registry diff --git a/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/AvailableToolChains.java b/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/AvailableToolChains.java index fd6cc7c3bbb4d..e9a7d04d9606e 100755 --- a/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/AvailableToolChains.java +++ b/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/AvailableToolChains.java @@ -46,7 +46,7 @@ import org.gradle.platform.base.internal.toolchain.SearchResult; import org.gradle.test.fixtures.file.TestFile; import org.gradle.testfixtures.internal.NativeServicesTestFixture; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.GUtil; import org.gradle.util.VersionNumber; diff --git a/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/NativeToolChainTestInterceptor.java b/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/NativeToolChainTestInterceptor.java index 6afec7f5e17ed..8492595d0979f 100755 --- a/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/NativeToolChainTestInterceptor.java +++ b/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/NativeToolChainTestInterceptor.java @@ -20,7 +20,7 @@ import com.google.common.collect.Maps; import org.gradle.api.specs.Spec; import org.gradle.integtests.fixtures.compatibility.AbstractContextualMultiVersionTestInterceptor; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.spockframework.runtime.extension.IMethodInvocation; import java.util.Collection; diff --git a/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/CppSourceElement.java b/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/CppSourceElement.java index e583df6ac4557..33d3fb6651dcd 100644 --- a/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/CppSourceElement.java +++ b/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/CppSourceElement.java @@ -18,7 +18,7 @@ import org.gradle.api.specs.Spec; import org.gradle.integtests.fixtures.SourceFile; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.ArrayList; import java.util.List; diff --git a/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/HelloWorldApp.java b/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/HelloWorldApp.java index 097f643572b0b..34a750a9b405c 100644 --- a/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/HelloWorldApp.java +++ b/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/HelloWorldApp.java @@ -18,7 +18,7 @@ import org.apache.commons.io.FilenameUtils; import org.gradle.api.Transformer; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.Collections; import java.util.List; diff --git a/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/SourceElement.java b/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/SourceElement.java index 6d9b09e94a036..a8af7b1566cdc 100644 --- a/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/SourceElement.java +++ b/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/SourceElement.java @@ -19,7 +19,7 @@ import org.gradle.api.Transformer; import org.gradle.integtests.fixtures.SourceFile; import org.gradle.test.fixtures.file.TestFile; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.ArrayList; import java.util.Arrays; diff --git a/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/XCTestSourceElement.java b/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/XCTestSourceElement.java index 4139a203f6ca6..f746bf7236abc 100644 --- a/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/XCTestSourceElement.java +++ b/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/XCTestSourceElement.java @@ -20,7 +20,7 @@ import org.gradle.api.Transformer; import org.gradle.integtests.fixtures.SourceFile; import org.gradle.integtests.fixtures.TestExecutionResult; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.List; diff --git a/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/XCTestSourceFileElement.java b/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/XCTestSourceFileElement.java index e9e45457bc793..0d38188005aba 100644 --- a/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/XCTestSourceFileElement.java +++ b/subprojects/platform-native/src/testFixtures/groovy/org/gradle/nativeplatform/fixtures/app/XCTestSourceFileElement.java @@ -21,7 +21,7 @@ import org.gradle.api.Transformer; import org.gradle.integtests.fixtures.SourceFile; import org.gradle.integtests.fixtures.TestClassExecutionResult; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.hamcrest.CoreMatchers; import java.util.List; diff --git a/subprojects/plugin-development/src/main/java/org/gradle/plugin/devel/tasks/PluginUnderTestMetadata.java b/subprojects/plugin-development/src/main/java/org/gradle/plugin/devel/tasks/PluginUnderTestMetadata.java index 834156092ec53..39c5ee28c7ac0 100644 --- a/subprojects/plugin-development/src/main/java/org/gradle/plugin/devel/tasks/PluginUnderTestMetadata.java +++ b/subprojects/plugin-development/src/main/java/org/gradle/plugin/devel/tasks/PluginUnderTestMetadata.java @@ -33,7 +33,7 @@ import java.util.List; import java.util.Properties; -import static org.gradle.util.CollectionUtils.collect; +import static org.gradle.util.internal.CollectionUtils.collect; /** * Custom task for generating the metadata for a plugin user test. diff --git a/subprojects/plugin-use/src/main/java/org/gradle/plugin/use/internal/DefaultPluginRequestApplicator.java b/subprojects/plugin-use/src/main/java/org/gradle/plugin/use/internal/DefaultPluginRequestApplicator.java index 9ec1e45cb7c59..6f7b27ac22dfc 100644 --- a/subprojects/plugin-use/src/main/java/org/gradle/plugin/use/internal/DefaultPluginRequestApplicator.java +++ b/subprojects/plugin-use/src/main/java/org/gradle/plugin/use/internal/DefaultPluginRequestApplicator.java @@ -53,7 +53,7 @@ import static com.google.common.collect.Maps.newLinkedHashMap; import static org.gradle.internal.classpath.CachedClasspathTransformer.StandardTransform.BuildLogic; -import static org.gradle.util.CollectionUtils.collect; +import static org.gradle.util.internal.CollectionUtils.collect; public class DefaultPluginRequestApplicator implements PluginRequestApplicator { private final PluginRegistry pluginRegistry; diff --git a/subprojects/plugins/src/integTest/groovy/org/gradle/java/JavaLibraryCompilationIntegrationTest.groovy b/subprojects/plugins/src/integTest/groovy/org/gradle/java/JavaLibraryCompilationIntegrationTest.groovy index 82cfcaae77d1a..c6ce7a50b45a9 100644 --- a/subprojects/plugins/src/integTest/groovy/org/gradle/java/JavaLibraryCompilationIntegrationTest.groovy +++ b/subprojects/plugins/src/integTest/groovy/org/gradle/java/JavaLibraryCompilationIntegrationTest.groovy @@ -411,7 +411,7 @@ class JavaLibraryCompilationIntegrationTest extends AbstractIntegrationSpec { }.files inputs.files(lazyInputs) doLast { - assert org.gradle.util.CollectionUtils.single(lazyInputs.files).toPath().endsWith('${expectedDirName}') + assert org.gradle.util.internal.CollectionUtils.single(lazyInputs.files).toPath().endsWith('${expectedDirName}') } } """ diff --git a/subprojects/plugins/src/main/java/org/gradle/api/internal/plugins/StartScriptGenerator.java b/subprojects/plugins/src/main/java/org/gradle/api/internal/plugins/StartScriptGenerator.java index d421838f3842c..35a797350f558 100644 --- a/subprojects/plugins/src/main/java/org/gradle/api/internal/plugins/StartScriptGenerator.java +++ b/subprojects/plugins/src/main/java/org/gradle/api/internal/plugins/StartScriptGenerator.java @@ -21,7 +21,7 @@ import org.gradle.jvm.application.scripts.JavaAppStartScriptGenerationDetails; import org.gradle.jvm.application.scripts.ScriptGenerator; import org.gradle.util.AntUtil; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.BufferedWriter; import java.io.File; diff --git a/subprojects/plugins/src/main/java/org/gradle/api/internal/plugins/StartScriptTemplateBindingFactory.java b/subprojects/plugins/src/main/java/org/gradle/api/internal/plugins/StartScriptTemplateBindingFactory.java index d3ed478569159..97f39bce3bcec 100644 --- a/subprojects/plugins/src/main/java/org/gradle/api/internal/plugins/StartScriptTemplateBindingFactory.java +++ b/subprojects/plugins/src/main/java/org/gradle/api/internal/plugins/StartScriptTemplateBindingFactory.java @@ -22,7 +22,7 @@ import org.apache.commons.lang.StringUtils; import org.gradle.api.Transformer; import org.gradle.jvm.application.scripts.JavaAppStartScriptGenerationDetails; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.text.CharacterIterator; import java.text.StringCharacterIterator; diff --git a/subprojects/plugins/src/main/java/org/gradle/api/tasks/Upload.java b/subprojects/plugins/src/main/java/org/gradle/api/tasks/Upload.java index f7ea22fe1793d..ecc3f08aae4e9 100644 --- a/subprojects/plugins/src/main/java/org/gradle/api/tasks/Upload.java +++ b/subprojects/plugins/src/main/java/org/gradle/api/tasks/Upload.java @@ -36,7 +36,7 @@ import java.io.File; import java.util.List; -import static org.gradle.util.CollectionUtils.collect; +import static org.gradle.util.internal.CollectionUtils.collect; /** * Uploads the artifacts of a {@link Configuration} to a set of repositories. diff --git a/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/DefaultGroovySourceSetTest.groovy b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/DefaultGroovySourceSetTest.groovy index 42038e4e1be26..25b83eda9e548 100644 --- a/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/DefaultGroovySourceSetTest.groovy +++ b/subprojects/plugins/src/test/groovy/org/gradle/api/internal/tasks/DefaultGroovySourceSetTest.groovy @@ -20,7 +20,7 @@ import org.gradle.api.file.SourceDirectorySet import org.gradle.api.internal.file.DefaultSourceDirectorySet import org.gradle.api.tasks.GroovySourceSet import org.gradle.test.fixtures.file.TestNameTestDirectoryProvider -import org.gradle.util.CollectionUtils +import org.gradle.util.internal.CollectionUtils import org.gradle.util.TestUtil import org.junit.Rule import spock.lang.Specification diff --git a/subprojects/reporting/src/main/java/org/gradle/api/reporting/GenerateBuildDashboard.java b/subprojects/reporting/src/main/java/org/gradle/api/reporting/GenerateBuildDashboard.java index 9ef31ad7e881d..f462197a9de10 100644 --- a/subprojects/reporting/src/main/java/org/gradle/api/reporting/GenerateBuildDashboard.java +++ b/subprojects/reporting/src/main/java/org/gradle/api/reporting/GenerateBuildDashboard.java @@ -33,7 +33,7 @@ import org.gradle.internal.Cast; import org.gradle.internal.reflect.Instantiator; import org.gradle.util.ClosureBackedAction; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.inject.Inject; import java.io.File; diff --git a/subprojects/resources-http/src/main/java/org/gradle/internal/resource/transport/http/HttpClientConfigurer.java b/subprojects/resources-http/src/main/java/org/gradle/internal/resource/transport/http/HttpClientConfigurer.java index a71ce846b6665..1d1bd0589f903 100644 --- a/subprojects/resources-http/src/main/java/org/gradle/internal/resource/transport/http/HttpClientConfigurer.java +++ b/subprojects/resources-http/src/main/java/org/gradle/internal/resource/transport/http/HttpClientConfigurer.java @@ -74,7 +74,7 @@ import org.gradle.internal.resource.UriTextResource; import org.gradle.internal.resource.transport.http.ntlm.NTLMCredentials; import org.gradle.internal.resource.transport.http.ntlm.NTLMSchemeFactory; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/subprojects/scala/src/main/java/org/gradle/api/internal/tasks/scala/NormalizingScalaCompiler.java b/subprojects/scala/src/main/java/org/gradle/api/internal/tasks/scala/NormalizingScalaCompiler.java index 27a441bb2d587..88fc02477c535 100644 --- a/subprojects/scala/src/main/java/org/gradle/api/internal/tasks/scala/NormalizingScalaCompiler.java +++ b/subprojects/scala/src/main/java/org/gradle/api/internal/tasks/scala/NormalizingScalaCompiler.java @@ -27,7 +27,7 @@ import org.gradle.api.tasks.WorkResult; import org.gradle.api.tasks.WorkResults; import org.gradle.language.base.internal.compile.Compiler; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.File; import java.util.List; diff --git a/subprojects/scala/src/main/java/org/gradle/api/tasks/scala/ScalaDocOptions.java b/subprojects/scala/src/main/java/org/gradle/api/tasks/scala/ScalaDocOptions.java index 4b79e700d7015..4576a41aed932 100644 --- a/subprojects/scala/src/main/java/org/gradle/api/tasks/scala/ScalaDocOptions.java +++ b/subprojects/scala/src/main/java/org/gradle/api/tasks/scala/ScalaDocOptions.java @@ -18,7 +18,7 @@ import org.gradle.api.tasks.Input; import org.gradle.api.tasks.Optional; import org.gradle.api.tasks.compile.AbstractOptions; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.util.List; diff --git a/subprojects/test-kit/src/main/java/org/gradle/testkit/runner/internal/DefaultBuildResult.java b/subprojects/test-kit/src/main/java/org/gradle/testkit/runner/internal/DefaultBuildResult.java index d6c44769b8bed..306662012c2ad 100644 --- a/subprojects/test-kit/src/main/java/org/gradle/testkit/runner/internal/DefaultBuildResult.java +++ b/subprojects/test-kit/src/main/java/org/gradle/testkit/runner/internal/DefaultBuildResult.java @@ -21,7 +21,7 @@ import org.gradle.testkit.runner.BuildResult; import org.gradle.testkit.runner.BuildTask; import org.gradle.testkit.runner.TaskOutcome; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.util.Collections; diff --git a/subprojects/test-kit/src/main/java/org/gradle/testkit/runner/internal/ToolingApiGradleExecutor.java b/subprojects/test-kit/src/main/java/org/gradle/testkit/runner/internal/ToolingApiGradleExecutor.java index cdb9816c4d295..8d05a8bd111a0 100644 --- a/subprojects/test-kit/src/main/java/org/gradle/testkit/runner/internal/ToolingApiGradleExecutor.java +++ b/subprojects/test-kit/src/main/java/org/gradle/testkit/runner/internal/ToolingApiGradleExecutor.java @@ -44,7 +44,7 @@ import org.gradle.tooling.internal.consumer.DefaultBuildLauncher; import org.gradle.tooling.internal.consumer.DefaultGradleConnector; import org.gradle.tooling.model.build.BuildEnvironment; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.GradleVersion; import org.gradle.wrapper.GradleUserHomeLookup; diff --git a/subprojects/testing-base/src/main/java/org/gradle/api/internal/tasks/testing/junit/result/AggregateTestResultsProvider.java b/subprojects/testing-base/src/main/java/org/gradle/api/internal/tasks/testing/junit/result/AggregateTestResultsProvider.java index b301edcd3b0bc..74acc278c7eec 100644 --- a/subprojects/testing-base/src/main/java/org/gradle/api/internal/tasks/testing/junit/result/AggregateTestResultsProvider.java +++ b/subprojects/testing-base/src/main/java/org/gradle/api/internal/tasks/testing/junit/result/AggregateTestResultsProvider.java @@ -32,7 +32,7 @@ import java.util.Map; import java.util.concurrent.atomic.AtomicLong; -import static org.gradle.util.CollectionUtils.any; +import static org.gradle.util.internal.CollectionUtils.any; public class AggregateTestResultsProvider implements TestResultsProvider { private final Iterable providers; diff --git a/subprojects/testing-base/src/main/java/org/gradle/api/internal/tasks/testing/worker/ForkingTestClassProcessor.java b/subprojects/testing-base/src/main/java/org/gradle/api/internal/tasks/testing/worker/ForkingTestClassProcessor.java index 47c4111c4d05f..e38336eb43d88 100755 --- a/subprojects/testing-base/src/main/java/org/gradle/api/internal/tasks/testing/worker/ForkingTestClassProcessor.java +++ b/subprojects/testing-base/src/main/java/org/gradle/api/internal/tasks/testing/worker/ForkingTestClassProcessor.java @@ -30,7 +30,7 @@ import org.gradle.process.internal.worker.WorkerProcess; import org.gradle.process.internal.worker.WorkerProcessBuilder; import org.gradle.process.internal.worker.WorkerProcessFactory; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.File; import java.net.URL; diff --git a/subprojects/testing-jvm/src/main/java/org/gradle/api/internal/tasks/testing/testng/TestNGTestClassProcessor.java b/subprojects/testing-jvm/src/main/java/org/gradle/api/internal/tasks/testing/testng/TestNGTestClassProcessor.java index 98bbe6ba028e7..dac67d267c257 100755 --- a/subprojects/testing-jvm/src/main/java/org/gradle/api/internal/tasks/testing/testng/TestNGTestClassProcessor.java +++ b/subprojects/testing-jvm/src/main/java/org/gradle/api/internal/tasks/testing/testng/TestNGTestClassProcessor.java @@ -28,7 +28,7 @@ import org.gradle.internal.reflect.JavaReflectionUtil; import org.gradle.internal.reflect.NoSuchMethodException; import org.gradle.internal.time.Clock; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.util.GFileUtils; import org.testng.IMethodInstance; import org.testng.IMethodInterceptor; diff --git a/subprojects/testing-jvm/src/main/java/org/gradle/api/tasks/testing/TestReport.java b/subprojects/testing-jvm/src/main/java/org/gradle/api/tasks/testing/TestReport.java index e602257e80e87..0ec3ff8d90d17 100644 --- a/subprojects/testing-jvm/src/main/java/org/gradle/api/tasks/testing/TestReport.java +++ b/subprojects/testing-jvm/src/main/java/org/gradle/api/tasks/testing/TestReport.java @@ -39,7 +39,7 @@ import java.util.List; import static org.gradle.internal.concurrent.CompositeStoppable.stoppable; -import static org.gradle.util.CollectionUtils.collect; +import static org.gradle.util.internal.CollectionUtils.collect; /** * Generates an HTML test report from the results of one or more {@link Test} tasks. diff --git a/subprojects/tooling-api-builders/src/main/java/org/gradle/tooling/internal/provider/runner/TestExecutionBuildConfigurationAction.java b/subprojects/tooling-api-builders/src/main/java/org/gradle/tooling/internal/provider/runner/TestExecutionBuildConfigurationAction.java index be5a89e14749f..491e62ec82e23 100644 --- a/subprojects/tooling-api-builders/src/main/java/org/gradle/tooling/internal/provider/runner/TestExecutionBuildConfigurationAction.java +++ b/subprojects/tooling-api-builders/src/main/java/org/gradle/tooling/internal/provider/runner/TestExecutionBuildConfigurationAction.java @@ -37,6 +37,7 @@ import org.gradle.tooling.internal.protocol.test.InternalDebugOptions; import org.gradle.tooling.internal.protocol.test.InternalJvmTestRequest; import org.gradle.tooling.internal.provider.TestExecutionRequestAction; +import org.gradle.util.internal.CollectionUtils; import java.util.ArrayList; import java.util.Collection; @@ -109,7 +110,7 @@ private List configureBuildForTestDescriptors(TestExecutionRequestAction t private List configureBuildForTestTasks(GradleInternal gradle, TestExecutionRequestAction testExecutionRequest) { final Collection testDescriptors = testExecutionRequest.getTestExecutionDescriptors(); - final List testTaskPaths = org.gradle.util.CollectionUtils.collect(testDescriptors, new Transformer() { + final List testTaskPaths = CollectionUtils.collect(testDescriptors, new Transformer() { @Override public String transform(InternalTestDescriptor testDescriptor) { return ((DefaultTestDescriptor) testDescriptor).getTaskPath(); diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/AbstractLongRunningOperation.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/AbstractLongRunningOperation.java index d7d28b52d3faf..60dd2549e8f6e 100644 --- a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/AbstractLongRunningOperation.java +++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/AbstractLongRunningOperation.java @@ -23,7 +23,7 @@ import org.gradle.tooling.ProgressListener; import org.gradle.tooling.events.OperationType; import org.gradle.tooling.internal.consumer.parameters.ConsumerOperationParameters; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.io.File; diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultBuildActionExecuter.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultBuildActionExecuter.java index fc0feb8cc4361..b03605e3152bb 100644 --- a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultBuildActionExecuter.java +++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultBuildActionExecuter.java @@ -27,7 +27,7 @@ import org.gradle.tooling.internal.consumer.connection.ConsumerAction; import org.gradle.tooling.internal.consumer.connection.ConsumerConnection; import org.gradle.tooling.internal.consumer.parameters.ConsumerOperationParameters; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import javax.annotation.Nullable; import java.util.Arrays; diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultPhasedBuildActionExecuter.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultPhasedBuildActionExecuter.java index 425bf18c0e313..0111b0f6c7ae6 100644 --- a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultPhasedBuildActionExecuter.java +++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultPhasedBuildActionExecuter.java @@ -24,7 +24,7 @@ import org.gradle.tooling.internal.consumer.connection.ConsumerAction; import org.gradle.tooling.internal.consumer.connection.ConsumerConnection; import org.gradle.tooling.internal.consumer.parameters.ConsumerOperationParameters; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.Arrays; diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultTestLauncher.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultTestLauncher.java index 01d4750d7ad2e..e277a408888f3 100644 --- a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultTestLauncher.java +++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultTestLauncher.java @@ -30,7 +30,7 @@ import org.gradle.tooling.internal.consumer.connection.ConsumerConnection; import org.gradle.tooling.internal.consumer.parameters.ConsumerOperationParameters; import org.gradle.tooling.internal.protocol.test.InternalJvmTestRequest; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.Arrays; import java.util.Collections; diff --git a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/TestExecutionRequest.java b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/TestExecutionRequest.java index e5b918b689f6e..b666fcd19963b 100644 --- a/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/TestExecutionRequest.java +++ b/subprojects/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/TestExecutionRequest.java @@ -24,7 +24,7 @@ import org.gradle.tooling.internal.protocol.test.InternalDebugOptions; import org.gradle.tooling.internal.protocol.test.InternalJvmTestRequest; import org.gradle.tooling.internal.protocol.test.InternalTestExecutionRequest; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.Collection; import java.util.List; diff --git a/subprojects/version-control/src/main/java/org/gradle/vcs/internal/DefaultVcsMappingsStore.java b/subprojects/version-control/src/main/java/org/gradle/vcs/internal/DefaultVcsMappingsStore.java index 8a8b8efc542c7..df1f115040d87 100644 --- a/subprojects/version-control/src/main/java/org/gradle/vcs/internal/DefaultVcsMappingsStore.java +++ b/subprojects/version-control/src/main/java/org/gradle/vcs/internal/DefaultVcsMappingsStore.java @@ -24,7 +24,7 @@ import org.gradle.api.artifacts.component.ModuleComponentSelector; import org.gradle.api.invocation.Gradle; import org.gradle.internal.Actions; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.vcs.VcsMapping; import org.gradle.vcs.VersionControlSpec; diff --git a/subprojects/version-control/src/main/java/org/gradle/vcs/internal/resolver/VcsDependencyResolver.java b/subprojects/version-control/src/main/java/org/gradle/vcs/internal/resolver/VcsDependencyResolver.java index a2c7d5eb7d0a6..75be9335272a3 100644 --- a/subprojects/version-control/src/main/java/org/gradle/vcs/internal/resolver/VcsDependencyResolver.java +++ b/subprojects/version-control/src/main/java/org/gradle/vcs/internal/resolver/VcsDependencyResolver.java @@ -53,7 +53,7 @@ import org.gradle.internal.resolve.result.BuildableArtifactSetResolveResult; import org.gradle.internal.resolve.result.BuildableComponentIdResolveResult; import org.gradle.internal.resolve.result.BuildableComponentResolveResult; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.vcs.VersionControlSpec; import org.gradle.vcs.internal.VcsResolver; import org.gradle.vcs.internal.VersionControlRepositoryConnection; diff --git a/subprojects/workers/src/main/java/org/gradle/workers/internal/DefaultWorkerExecutor.java b/subprojects/workers/src/main/java/org/gradle/workers/internal/DefaultWorkerExecutor.java index 3c65a6b162575..ca17d1baf89ba 100644 --- a/subprojects/workers/src/main/java/org/gradle/workers/internal/DefaultWorkerExecutor.java +++ b/subprojects/workers/src/main/java/org/gradle/workers/internal/DefaultWorkerExecutor.java @@ -39,7 +39,7 @@ import org.gradle.process.JavaForkOptions; import org.gradle.process.internal.JavaForkOptionsFactory; import org.gradle.process.internal.worker.child.WorkerDirectoryProvider; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import org.gradle.workers.ClassLoaderWorkerSpec; import org.gradle.workers.ProcessWorkerSpec; import org.gradle.workers.WorkAction; diff --git a/subprojects/workers/src/main/java/org/gradle/workers/internal/WorkerDaemonClientsManager.java b/subprojects/workers/src/main/java/org/gradle/workers/internal/WorkerDaemonClientsManager.java index 0e6187350b575..c4dd2c09ee1ee 100644 --- a/subprojects/workers/src/main/java/org/gradle/workers/internal/WorkerDaemonClientsManager.java +++ b/subprojects/workers/src/main/java/org/gradle/workers/internal/WorkerDaemonClientsManager.java @@ -34,7 +34,7 @@ import org.gradle.process.internal.health.memory.MemoryManager; import org.gradle.process.internal.health.memory.OsMemoryInfo; import org.gradle.process.internal.worker.WorkerProcess; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.util.ArrayList; import java.util.Iterator; diff --git a/subprojects/workers/src/main/java/org/gradle/workers/internal/WorkerDaemonStarter.java b/subprojects/workers/src/main/java/org/gradle/workers/internal/WorkerDaemonStarter.java index 470fc68a7f2f6..53f62fe0cd67d 100644 --- a/subprojects/workers/src/main/java/org/gradle/workers/internal/WorkerDaemonStarter.java +++ b/subprojects/workers/src/main/java/org/gradle/workers/internal/WorkerDaemonStarter.java @@ -30,7 +30,7 @@ import org.gradle.process.internal.worker.MultiRequestWorkerProcessBuilder; import org.gradle.process.internal.worker.WorkerProcess; import org.gradle.process.internal.worker.WorkerProcessFactory; -import org.gradle.util.CollectionUtils; +import org.gradle.util.internal.CollectionUtils; import java.io.File; import java.net.URISyntaxException;