Update commons
ci/woodpecker/push/woodpecker Pipeline failed Details

This commit is contained in:
Johannes Frohnmeyer 2022-11-02 22:38:41 +01:00
parent 7ce6a764ec
commit 3eace3f6b8
Signed by: Johannes
GPG Key ID: E76429612C2929F4
5 changed files with 4 additions and 60 deletions

View File

@ -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

View File

@ -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"))

View File

@ -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.*;

View File

@ -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);
}
}

View File

@ -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);
}
}