Skip to content

Commit

Permalink
Update workspace, add support for >=1.19.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ChloeDawn committed Aug 2, 2022
1 parent 9afb7c7 commit f9d0685
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 51 deletions.
101 changes: 53 additions & 48 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import java.time.Instant

plugins {
id(/*net.fabricmc.*/ "fabric-loom") version "0.12.48"
id(/*net.fabricmc.*/ "fabric-loom") version "0.12.55"
id("io.github.juuxel.loom-quiltflower") version "1.7.3"
id("net.nemerosa.versioning") version "3.0.0"
id("org.gradle.signing")
}

group = "dev.sapphic"
version = "1.9.0+1.19"
version = "1.9.1+1.19"

if ("CI" in System.getenv()) {
version = "$version-${versioning.info.build}"
Expand Down Expand Up @@ -37,33 +38,38 @@ loom {
}

repositories {
maven("https://maven.terraformersmc.com/releases") {
content {
includeGroup("com.terraformersmc")
exclusiveContent {
forRepository {
maven("https://maven.terraformersmc.com/releases")
}

filter {
includeModule("com.terraformersmc", "modmenu")
}
}
}

dependencies {
minecraft("com.mojang:minecraft:1.19")

mappings(loom.layered {
officialMojangMappings {
nameSyntheticMembers = true
}
})

modImplementation("net.fabricmc:fabric-loader:0.14.7")
modImplementation("net.fabricmc:fabric-loader:0.14.8")

implementation("org.jetbrains:annotations:23.0.0")
implementation("org.checkerframework:checker-qual:3.22.1")

modImplementation(include(fabricApi.module("fabric-api-base", "0.55.3+1.19"))!!)
modImplementation(include(fabricApi.module("fabric-networking-api-v1", "0.55.3+1.19"))!!)
modImplementation(include(fabricApi.module("fabric-api-base", "0.58.0+1.19"))!!)
modImplementation(include(fabricApi.module("fabric-networking-api-v1", "0.58.0+1.19"))!!)

implementation(include("com.electronwill.night-config:core:3.6.5")!!)
implementation(include("com.electronwill.night-config:toml:3.6.5")!!)

modRuntimeOnly("com.terraformersmc:modmenu:4.0.0")
implementation("org.jetbrains:annotations:23.0.0")
implementation("org.checkerframework:checker-qual:3.23.0")

modRuntimeOnly("com.terraformersmc:modmenu:4.0.5")
}

tasks {
Expand All @@ -73,12 +79,12 @@ tasks {
encoding = "UTF-8"
isFork = true
compilerArgs.addAll(
listOf(
"-Xlint:all", "-Xlint:-processing",
// Enable parameter name class metadata
// https://openjdk.java.net/jeps/118
"-parameters"
)
listOf(
"-Xlint:all", "-Xlint:-processing",
// Enable parameter name class metadata
// https://openjdk.java.net/jeps/118
"-parameters"
)
)
release.set(17)
}
Expand All @@ -94,26 +100,23 @@ tasks {
from("/LICENSE")

manifest.attributes(
"Build-Timestamp" to Instant.now(),
"Build-Revision" to versioning.info.commit,
"Build-Jvm" to "${
System.getProperty("java.version")
} (${
System.getProperty("java.vendor")
} ${
System.getProperty("java.vm.version")
})",
"Built-By" to GradleVersion.current(),

"Implementation-Title" to project.name,
"Implementation-Version" to project.version,
"Implementation-Vendor" to project.group,

"Specification-Title" to "FabricMod",
"Specification-Version" to "1.0.0",
"Specification-Vendor" to project.group,

"Sealed" to "true"
"Build-Timestamp" to Instant.now(),
"Build-Revision" to versioning.info.commit,
"Build-Jvm" to "${
System.getProperty("java.version")
} (${
System.getProperty("java.vendor")
} ${
System.getProperty("java.vm.version")
})",
"Built-By" to GradleVersion.current(),
"Implementation-Title" to project.name,
"Implementation-Version" to project.version,
"Implementation-Vendor" to project.group,
"Specification-Title" to "FabricMod",
"Specification-Version" to "1.0.0",
"Specification-Vendor" to project.group,
"Sealed" to "true"
)
}

Expand All @@ -122,17 +125,19 @@ tasks {
val keystore = property("signing.mods.keystore")
val password = property("signing.mods.password")

fun Sign.antSignJar(task: Task) = task.outputs.files.forEach { file ->
ant.invokeMethod(
fun Sign.antSignJar(task: Task) =
task.outputs.files.forEach { file ->
ant.invokeMethod(
"signjar", mapOf(
"jar" to file,
"alias" to alias,
"storepass" to password,
"keystore" to keystore,
"verbose" to true,
"preservelastmodified" to true
))
}
"jar" to file,
"alias" to alias,
"storepass" to password,
"keystore" to keystore,
"verbose" to true,
"preservelastmodified" to true
)
)
}

val signJar by creating(Sign::class) {
dependsOn(remapJar)
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionSha256Sum=e6d864e3b5bc05cc62041842b306383fc1fefcec359e70cebb1d470a6094ca82
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip
distributionSha256Sum=97a52d145762adc241bad7fd18289bf7f6801e08ece6badf80402fe2b9f250b1
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ pluginManagement {
repositories {
gradlePluginPortal()
maven("https://maven.fabricmc.net")
maven("https://server.bbkr.space/artifactory/libs-release")
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"fabricloader": ">=0.14.6",
"fabric-api-base": ">=0.4.9",
"fabric-networking-api-v1": ">=1.0.27",
"minecraft": "1.19",
"minecraft": "1.19.x",
"java": ">=17"
},
"entrypoints": {
Expand Down

0 comments on commit f9d0685

Please sign in to comment.