getVersion in Mod.java, source publishing to Maven
This commit is contained in:
parent
d0f250752e
commit
6cbd3133e7
|
@ -1,4 +1,4 @@
|
|||
## Features targeted for 22.0.0.0-alpha.1
|
||||
## Features targeted for 22.1.0.0-alpha.0
|
||||
* `[PlutoGUI]` Initial implementation of the new font renderer
|
||||
* Full rewrite
|
||||
* High quality font rendering
|
||||
|
@ -7,7 +7,7 @@
|
|||
* Improve upon the support of thread-local Pluto instances
|
||||
* The long term goal is to allow an unlimited amount of Pluto applications at any given time
|
||||
|
||||
## Features targeted for 22.0.0.0-alpha.2
|
||||
## Features targeted for 22.2.0.0-alpha.0
|
||||
* The stage subsystem
|
||||
* A "stage", in this context, is a set of assets bound together
|
||||
by programming logic, not necessarily a game level.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
## 22.2.0.0-alpha.1
|
||||
* `[SDK]` Jar sources and JavaDoc are now published
|
||||
* `[PlutoRuntime]` `Mod` objects now properly contain the version number
|
||||
|
||||
## 22.2.0.0-alpha.0
|
||||
* Version bumped to 2022
|
||||
* `[SDK]` Maven version is now properly set again
|
||||
|
|
|
@ -22,7 +22,7 @@ object Versions {
|
|||
|
||||
const val isPrerelease = true
|
||||
const val prereleaseName = "alpha"
|
||||
const val prerealeaseUpdate = 0
|
||||
const val prerealeaseUpdate = 1
|
||||
|
||||
val versionFull =
|
||||
if (isPrerelease)
|
||||
|
|
|
@ -30,6 +30,9 @@ subprojects {
|
|||
configure<JavaPluginExtension> {
|
||||
sourceCompatibility = Versions.javaTargetVersion
|
||||
targetCompatibility = Versions.javaTargetVersion
|
||||
|
||||
withJavadocJar()
|
||||
withSourcesJar()
|
||||
}
|
||||
|
||||
configure<SourceSetContainer> {
|
||||
|
|
|
@ -32,25 +32,26 @@ import java.util.Objects;
|
|||
public class Mod implements Comparable<Mod>
|
||||
{
|
||||
private final VirtualAddress id;
|
||||
private final String version;
|
||||
private final Class<?>[] dependencies;
|
||||
|
||||
private Class<?> mainClass;
|
||||
|
||||
private Class<?>[] dependencies;
|
||||
|
||||
private ModManifest manifest;
|
||||
|
||||
private ResourceManager resourceManager;
|
||||
|
||||
private Mod(VirtualAddress id)
|
||||
public Mod(VirtualAddress id, String version, Class<?>[] dependencies)
|
||||
{
|
||||
this.id = id;
|
||||
this.version = version;
|
||||
this.dependencies = dependencies;
|
||||
}
|
||||
|
||||
static Mod from(VirtualAddress modID, Class<?>[] dependencies, Class<?> mainClass)
|
||||
static Mod from(VirtualAddress modID, Class<?>[] dependencies, String version, Class<?> mainClass)
|
||||
{
|
||||
var mod = new Mod(modID);
|
||||
var mod = new Mod(modID, version, dependencies);
|
||||
mod.mainClass = mainClass;
|
||||
mod.dependencies = dependencies;
|
||||
|
||||
var modIDStr = mod.id.toString();
|
||||
|
||||
|
@ -109,6 +110,11 @@ public class Mod implements Comparable<Mod>
|
|||
return this.mainClass;
|
||||
}
|
||||
|
||||
public String getVersion()
|
||||
{
|
||||
return this.version;
|
||||
}
|
||||
|
||||
public Class<?>[] getDependencies()
|
||||
{
|
||||
return this.dependencies;
|
||||
|
|
|
@ -102,7 +102,7 @@ public final class ModLoader extends PlutoLocalComponent
|
|||
return;
|
||||
}
|
||||
|
||||
var mod = Mod.from(modID, modInterface.dependencies(), modClass);
|
||||
var mod = Mod.from(modID, modInterface.dependencies(), modInterface.version(), modClass);
|
||||
|
||||
this.modNameLookup.put(modID, mod);
|
||||
this.modLookup.put(modClass, mod);
|
||||
|
|
Loading…
Reference in New Issue