Skip to content

Commit

Permalink
Update to 1.18.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Pyrofab committed Apr 14, 2022
1 parent 9ca83c4 commit 9e8b525
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 98 deletions.
106 changes: 21 additions & 85 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,75 +3,50 @@ 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
minecraft "com.mojang:minecraft:${project.minecraft_version}"
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

Expand All @@ -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'
Expand All @@ -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'
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
------------------------------------------------------
Version 1.5.1
------------------------------------------------------
- Updated to MC 1.18.2

------------------------------------------------------
Version 1.5.0
------------------------------------------------------
Expand Down
13 changes: 6 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
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.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
7 changes: 5 additions & 2 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -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()
}
}

Expand Down
5 changes: 2 additions & 3 deletions src/main/resources/mixins.playerabilitylib.common.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"required": true,
"package": "io.github.ladysnake.pal.impl.mixin",
"compatibilityLevel": "JAVA_8",
"compatibilityLevel": "JAVA_17",
"minVersion": "0.7.11-SNAPSHOT",
"mixins": [
"ServerPlayerEntityMixin",
"ServerPlayerInteractionManagerMixin"
],
"injectors": {
"defaultRequire": 1
},
"refmap": "pal-refmap.json"
}
}

0 comments on commit 9e8b525

Please sign in to comment.