Files
architectury-loom/src/main/java/net/fabricmc/loom/configuration/InstallerData.java
modmuss50 d1902ecb0e Add versions used to compile/build against to jar manifest (#428)
* Add versions used to compile/build against to jar manifest

* checkstyle

* Move to post remap

* Fix build

* Add mc version and mixin group

* Typo

* Make test run across versions better.

(cherry picked from commit 2259a4efc8)
Signed-off-by: shedaniel <daniel@shedaniel.me>
2021-07-21 00:04:43 +08:00

66 lines
2.1 KiB
Java

/*
* This file is part of fabric-loom, licensed under the MIT License (MIT).
*
* Copyright (c) 2021 FabricMC
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package net.fabricmc.loom.configuration;
import java.util.Objects;
import com.google.gson.JsonObject;
public final class InstallerData {
private final String version;
private final JsonObject installerJson;
InstallerData(String version, JsonObject installerJson) {
this.version = version;
this.installerJson = installerJson;
}
public String version() {
return version;
}
public JsonObject installerJson() {
return installerJson;
}
@Override
public boolean equals(Object obj) {
if (obj == this) return true;
if (obj == null || obj.getClass() != this.getClass()) return false;
InstallerData that = (InstallerData) obj;
return Objects.equals(this.version, that.version) && Objects.equals(this.installerJson, that.installerJson);
}
@Override
public int hashCode() {
return Objects.hash(version, installerJson);
}
@Override
public String toString() {
return "InstallerData[" + "version=" + version + ", " + "installerJson=" + installerJson + ']';
}
}