Update commons
ci/woodpecker/push/woodpecker Pipeline failed
Details
ci/woodpecker/push/woodpecker Pipeline failed
Details
This commit is contained in:
parent
7ce6a764ec
commit
3eace3f6b8
|
@ -1,3 +1,5 @@
|
|||
#link https://jfmods.gitlab.io/scripts/docs.yml
|
||||
|
||||
pipeline:
|
||||
export_metadata:
|
||||
image: gradle:alpine
|
||||
|
@ -96,5 +98,3 @@ pipeline:
|
|||
strip_prefix: public/
|
||||
when:
|
||||
- branch: master
|
||||
|
||||
include: https://jfmods.gitlab.io/scripts/docs.yml
|
|
@ -12,7 +12,7 @@ allprojects {
|
|||
|
||||
val lwjglVersion by extra("3.3.1")
|
||||
val imguiVersion by extra("1.86.4")
|
||||
val jfCommonsVersion by extra("2022.11.1+18-31-34")
|
||||
val jfCommonsVersion by extra("2022.11.2+21-36-56")
|
||||
val gsonCompileVersion by extra("1.0-SNAPSHOT")
|
||||
val jlhttpVersion by extra("2.6")
|
||||
val flavorProp: String by extra(prop("flavor", "custom"))
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package io.gitlab.jfronny.inceptum.launcher.system.exporter;
|
||||
|
||||
import io.gitlab.jfronny.commons.StreamIterable;
|
||||
import io.gitlab.jfronny.inceptum.common.Utils;
|
||||
import io.gitlab.jfronny.inceptum.launcher.system.instance.*;
|
||||
import io.gitlab.jfronny.inceptum.launcher.util.*;
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
package io.gitlab.jfronny.inceptum.launcher.util;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
final class OnceSupplier<T> implements Supplier<T> {
|
||||
private final T value;
|
||||
private boolean supplied = false;
|
||||
|
||||
public OnceSupplier(T value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public T get() {
|
||||
if (supplied) throw new IllegalStateException("Attempted to use already used OnceSupplier");
|
||||
supplied = true;
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) return true;
|
||||
if (!(obj instanceof OnceSupplier<?> that)) return false;
|
||||
return Objects.equals(this.value, that.value);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(value);
|
||||
}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
package io.gitlab.jfronny.inceptum.launcher.util;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public record StreamIterable<T>(Supplier<Stream<T>> source) implements Iterable<T> {
|
||||
public StreamIterable(Stream<T> source) {
|
||||
this(new OnceSupplier<>(source));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Iterator<T> iterator() {
|
||||
return source.get().iterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forEach(Consumer<? super T> action) {
|
||||
this.source.get().forEach(action);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue