From 9e8b5257d118e0c06ac26643e96dc8a795ce27fd Mon Sep 17 00:00:00 2001 From: Pyrofab Date: Thu, 14 Apr 2022 15:39:14 +0200 Subject: [PATCH] Update to 1.18.2 --- build.gradle | 106 ++++-------------- changelog.md | 5 + gradle.properties | 13 +-- gradle/wrapper/gradle-wrapper.properties | 2 +- settings.gradle | 7 +- .../mixins.playerabilitylib.common.json | 5 +- 6 files changed, 40 insertions(+), 98 deletions(-) diff --git a/build.gradle b/build.gradle index 367d2f5..0a2186e 100644 --- a/build.gradle +++ b/build.gradle @@ -3,63 +3,33 @@ import net.fabricmc.loom.task.RemapJarTask import java.time.Year plugins { - id 'fabric-loom' version '0.10-SNAPSHOT' - id "org.cadixdev.licenser" version "0.6.1" - id 'com.matthewprenger.cursegradle' version '1.4.0' - id 'com.jfrog.artifactory' version '4.21.0' - id 'org.ajoberstar.grgit' version '3.1.1' - id 'com.github.breadmoirai.github-release' version '2.2.12' - id 'java-library' - id 'maven-publish' + id 'io.github.ladysnake.chenille' version '0.7.0' + id 'io.github.juuxel.loom-quiltflower' version "1.6.0" } -sourceCompatibility = JavaVersion.VERSION_17 -targetCompatibility = JavaVersion.VERSION_17 - archivesBaseName = project.archives_base_name version = project.mod_version group = project.maven_group -sourceSets { - testmod { - compileClasspath += main.compileClasspath - runtimeClasspath += main.runtimeClasspath +chenille { + configurePublishing { + withArtifactory() + withCurseforgeRelease() + withGithubRelease() } -} - -loom { - refmapName = 'pal-refmap.json' - runs { - testmodClient { - client() - name = "Testmod Client" - source sourceSets.testmod - } - testmodServer { - server() - name = "Testmod Server" - source sourceSets.testmod - } - gametest { - inherit testmodServer - name = "Game Test" - - // Enable the gametest runner - vmArg "-Dfabric-api.gametest" - vmArg "-Dfabric-api.gametest.report-file=${project.buildDir}/junit.xml" - runDir "build/gametest" - } - autoTestServer { - inherit testmodServer + configureTestmod { + withBaseTestRuns() + withDependencyConfiguration() + } - name = "Auto Test Server" + license = project.license_header + javaVersion = 17 +} - vmArg "-Dfabric.autoTest" - } - } +repositories { + chenille.repositories.ladysnake() } -check.dependsOn runGametest dependencies { //to change the versions see the gradle.properties file @@ -67,11 +37,16 @@ dependencies { mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" + modTestImplementation "io.github.ladysnake:elmendorf:0.5.2" api "org.jetbrains:annotations:19.0.0" testmodImplementation sourceSets.main.output } +java { + withSourcesJar() +} + processResources { inputs.property "version", project.version @@ -80,21 +55,6 @@ processResources { } } -// ensure that the encoding is set to UTF-8, no matter what the system default is -// this fixes some edge cases with special characters not displaying correctly -// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html -tasks.withType(JavaCompile) { - options.encoding = "UTF-8" -} - -// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task -// if it is present. -// If you remove this task, sources will not be generated. -task sourcesJar(type: Jar, dependsOn: classes) { - archiveClassifier = "sources" - from sourceSets.main.allSource -} - task testmodJar(type: Jar, dependsOn: testmodClasses) { archiveBaseName = 'PalTest' archiveClassifier = 'dev' @@ -114,27 +74,3 @@ task remapTestmodJar(type: RemapJarTask, dependsOn: project.testmodJar) { } build.dependsOn(remapTestmodJar) - -license { - header = rootProject.file("code_quality/${project.license_header}_HEADER.txt") - - include "**/*.java" - - newLine = false // Disables the empty line between the header and package name - //ignoreFailures = true //Ignore failures and only print a warning on license violations - - //export variables - ext { - year = Year.now() - projectDisplayName = project.display_name - projectOwners = rootProject.owners - if (project.license_header.contains('GPL')) { - if (!project.hasProperty("gpl_version")) { - throw new RuntimeException("GPL version needs to be specified through the 'gpl_version' property") - } - gplVersion = project.gpl_version - } - } -} - -apply from: 'release.gradle' diff --git a/changelog.md b/changelog.md index a042b0b..8694b4a 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,8 @@ +------------------------------------------------------ +Version 1.5.1 +------------------------------------------------------ +- Updated to MC 1.18.2 + ------------------------------------------------------ Version 1.5.0 ------------------------------------------------------ diff --git a/gradle.properties b/gradle.properties index eaa5071..6b17bf5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,14 +3,14 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://fabricmc.net/use -minecraft_version=1.18-pre1 -yarn_mappings=1.18-pre1+build.3 -loader_version=0.12.5 +minecraft_version=1.18.2 +yarn_mappings=1.18.2+build.2 +loader_version=0.13.3 #Fabric api -fabric_version=0.42.2+1.18 +fabric_version=0.50.0+1.18.2 # Mod Properties -mod_version = 1.5.0 +mod_version = 1.5.1 maven_group = io.github.ladysnake archives_base_name = pal @@ -20,7 +20,6 @@ display_name = PlayerAbilityLib license_header = LGPL gpl_version = 3 curseforge_id = 359522 -curseforge_versions = 1.18-Snapshot +curseforge_versions = 1.18-Snapshot; 1.18; 1.18.1; 1.18.2 cf_requirements = fabric-api release_type = release -changelog_url = https://github.com/Ladysnake/PlayerAbilityLib/blob/1.18/changelog.md diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e750102..41dfb87 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/settings.gradle b/settings.gradle index f6d43f2..7f86d9c 100644 --- a/settings.gradle +++ b/settings.gradle @@ -1,12 +1,15 @@ pluginManagement { repositories { - jcenter() - mavenLocal() maven { name = 'Fabric' url = 'https://maven.fabricmc.net/' } + maven { + name = 'Cotton' + url = 'https://server.bbkr.space/artifactory/libs-release/' + } gradlePluginPortal() + mavenLocal() } } diff --git a/src/main/resources/mixins.playerabilitylib.common.json b/src/main/resources/mixins.playerabilitylib.common.json index 84e4599..182f8b9 100644 --- a/src/main/resources/mixins.playerabilitylib.common.json +++ b/src/main/resources/mixins.playerabilitylib.common.json @@ -1,7 +1,7 @@ { "required": true, "package": "io.github.ladysnake.pal.impl.mixin", - "compatibilityLevel": "JAVA_8", + "compatibilityLevel": "JAVA_17", "minVersion": "0.7.11-SNAPSHOT", "mixins": [ "ServerPlayerEntityMixin", @@ -9,6 +9,5 @@ ], "injectors": { "defaultRequire": 1 - }, - "refmap": "pal-refmap.json" + } }