Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Commit

Permalink
chore: Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
phinner committed Jul 27, 2023
1 parent 7bde523 commit b40dee9
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 40 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- Fix NPM exception
- Maintenance update
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ModLoaderPlugin

[![Build status](https://github.com/Xpdustry/ModLoaderPlugin/actions/workflows/build.yml/badge.svg?branch=master&event=push)](https://github.com/Xpdustry/ModLoaderPlugin/actions/workflows/build.yml)
[![Build status](https://github.com/xpdustry/mod-loader/actions/workflows/build.yml/badge.svg?branch=master&event=push)](https://github.com/xpdustry/mod-loader/actions/workflows/build.yml)
[![Mindustry 6.0 | 7.0 ](https://img.shields.io/badge/Mindustry-6.0%20%7C%207.0-ffd37f)](https://github.com/Anuken/Mindustry/releases)
[![Xpdustry latest](https://repo.xpdustry.fr/api/badge/latest/releases/fr/xpdustry/mod-loader-plugin?color=00FFFF&name=ModLoaderPlugin&prefix=v)](https://github.com/Xpdustry/ModLoaderPlugin/releases)
[![Xpdustry latest](https://maven.xpdustry.fr/api/badge/latest/releases/fr/xpdustry/mod-loader-plugin?color=00FFFF&name=mod-loader&prefix=v)](https://github.com/Xpdustry/ModLoaderPlugin/releases)

## Description

Expand Down
73 changes: 43 additions & 30 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,46 +1,44 @@
import fr.xpdustry.toxopid.util.ModMetadata
import fr.xpdustry.toxopid.extension.ModTarget
import fr.xpdustry.toxopid.dsl.mindustryDependencies
import net.ltgt.gradle.errorprone.CheckSeverity
import net.ltgt.gradle.errorprone.errorprone
import java.io.ByteArrayOutputStream

plugins {
java
`maven-publish`
id("net.ltgt.errorprone") version "2.0.2"
id("fr.xpdustry.toxopid") version "1.3.2"
id("com.github.ben-manes.versions") version "0.42.0"
id("net.kyori.indra") version "2.1.1"
id("net.kyori.indra.publishing") version "2.1.1"
id("net.kyori.indra") version "3.1.2"
id("net.kyori.indra.publishing") version "3.1.2"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("net.ltgt.errorprone") version "3.1.0"
id("fr.xpdustry.toxopid") version "3.2.0"
id("com.github.ben-manes.versions") version "0.47.0"
}

val metadata = ModMetadata(file("${rootProject.rootDir}/plugin.json"))
val metadata = fr.xpdustry.toxopid.spec.ModMetadata.fromJson(file("${rootProject.rootDir}/plugin.json"))
group = property("props.project-group").toString()
version = metadata.version + if (indraGit.headTag() == null) "-SNAPSHOT" else ""

toxopid {
modTarget.set(ModTarget.HEADLESS)
arcCompileVersion.set(metadata.minGameVersion)
mindustryCompileVersion.set(metadata.minGameVersion)
compileVersion.set("v${metadata.minGameVersion}")
platforms.add(fr.xpdustry.toxopid.spec.ModPlatform.HEADLESS)
}

repositories {
mavenCentral()
maven("https://maven.xpdustry.com/anuken") {
name = "xpdustry-anuken"
mavenContent { releasesOnly() }
}
}

dependencies {
val junit = "5.8.2"
testImplementation("org.junit.jupiter:junit-jupiter-params:$junit")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junit")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junit")
mindustryDependencies()

val jetbrains = "23.0.0"
val jetbrains = "24.0.1"
compileOnly("org.jetbrains:annotations:$jetbrains")
testCompileOnly("org.jetbrains:annotations:$jetbrains")

// Static analysis
annotationProcessor("com.uber.nullaway:nullaway:0.9.5")
errorprone("com.google.errorprone:error_prone_core:2.11.0")
annotationProcessor("com.uber.nullaway:nullaway:0.10.11")
errorprone("com.google.errorprone:error_prone_core:2.20.0")
}

tasks.withType(JavaCompile::class.java).configureEach {
Expand All @@ -54,6 +52,12 @@ tasks.withType(JavaCompile::class.java).configureEach {
}
}

tasks.shadowJar {
archiveFileName.set("mod-loader.jar")
archiveClassifier.set("plugin")
from(file("${rootProject.rootDir}/plugin.json"))
}

// Required if you want to use the Release GitHub action
tasks.create("getArtifactPath") {
doLast { println(tasks.shadowJar.get().archiveFile.get().toString()) }
Expand Down Expand Up @@ -81,6 +85,10 @@ tasks.create("createRelease") {
}
}

tasks.build {
dependsOn(tasks.shadowJar)
}

signing {
val signingKey: String? by project
val signingPassword: String? by project
Expand All @@ -93,24 +101,29 @@ indra {
minimumToolchain(17)
}

publishReleasesTo("xpdustry", "https://repo.xpdustry.fr/releases")
publishSnapshotsTo("xpdustry", "https://repo.xpdustry.fr/snapshots")
publishReleasesTo("xpdustry", "https://maven.xpdustry.com/releases")
publishSnapshotsTo("xpdustry", "https://maven.xpdustry.com/snapshots")

mitLicense()

if (metadata.repo != null) {
val repo = metadata.repo!!.split("/")
github(repo[0], repo[1]) {
ci(true)
issues(true)
scm(true)
}
github("xpdustry", "mod-loader") {
ci(true)
issues(true)
scm(true)
}

configurePublications {
pom {
organization {
name.set("Xpdustry")
url.set("https://www.xpdustry.fr")
}

developers {
developer { id.set(metadata.author) }
developer {
id.set("Phinner")
timezone.set("Europe/Brussels")
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The project name, used as the artifact name
props.project-name=mod-loader-plugin
props.project-name=mod-loader
# Group of the project, usually a domain backwards such as com.google
props.project-group=fr.xpdustry
# Root package for NullAway
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
10 changes: 5 additions & 5 deletions plugin.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "xpdustry-mod-loader-plugin",
"displayName": "Xpdustry ModLoader",
"author": "Xpdustry",
"displayName": "ModLoader",
"author": "xpdustry",
"description": "A custom mod loader plugin for jvm plugins/mods that rely on dependencies. ",
"version": "1.0.1",
"minGameVersion": "v126.2",
"version": "1.0.2",
"minGameVersion": "126",
"hidden": true,
"java": true,
"main": "fr.xpdustry.loader.ModLoaderPlugin",
"repo": "Xpdustry/ModLoaderPlugin",
"repo": "xpdustry/mod-loader",
"dependencies": []
}
5 changes: 5 additions & 0 deletions src/main/java/fr/xpdustry/loader/ModLoaderException.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
package fr.xpdustry.loader;

import java.io.Serial;

public class ModLoaderException extends Exception {

@Serial
private static final long serialVersionUID = -265108231696587650L;

public ModLoaderException(String message) {
super(message);
}
Expand Down

0 comments on commit b40dee9

Please sign in to comment.