mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
Update to Loom 1.1 and Gradle 8
This commit is contained in:
@@ -8,9 +8,9 @@ buildscript {
|
||||
|
||||
plugins {
|
||||
id "architectury-plugin" version "3.4-SNAPSHOT"
|
||||
id "dev.architectury.loom" version "1.0-SNAPSHOT" apply false
|
||||
id "dev.architectury.loom" version "1.1-SNAPSHOT" apply false
|
||||
id "org.cadixdev.licenser" version "0.6.1"
|
||||
id "io.github.juuxel.loom-quiltflower" version "1.7.2" apply false
|
||||
id "io.github.juuxel.loom-quiltflower" version "1.8.0" apply false
|
||||
id "me.shedaniel.unified-publishing" version "0.1.+" apply false
|
||||
id "maven-publish"
|
||||
}
|
||||
|
||||
@@ -44,7 +44,8 @@ import java.nio.file.Path
|
||||
task generateAccessWidener {
|
||||
doLast {
|
||||
List<String> lines = ["", "##############################", "# This section is generated automatically with Gradle task generateAccessWidener!!!", "##############################", ""]
|
||||
Path inputJar = loom.namedMinecraftProvider.parentMinecraftProvider.mergedJar
|
||||
Path inputJar = loom.namedMinecraftProvider.parentMinecraftProvider.mergedJar.path
|
||||
logger.lifecycle("Generating access widener for $inputJar")
|
||||
|
||||
try (def fs = FileSystems.newFileSystem(URI.create("jar:${inputJar.toUri()}"), [create: false])) {
|
||||
generateItemConstructors(lines, fs)
|
||||
|
||||
@@ -45,28 +45,28 @@ shadowJar {
|
||||
exclude "architectury.common.json"
|
||||
|
||||
configurations = [project.configurations.shadowCommon]
|
||||
classifier "dev-shadow"
|
||||
archiveClassifier = "dev-shadow"
|
||||
}
|
||||
|
||||
remapJar {
|
||||
injectAccessWidener = true
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
classifier null
|
||||
archiveClassifier = null
|
||||
}
|
||||
|
||||
task renameJarForPublication(type: Zip, dependsOn: remapJar) {
|
||||
from remapJar.archiveFile.map { zipTree(it) }
|
||||
extension "jar"
|
||||
archiveExtension = "jar"
|
||||
metadataCharset "UTF-8"
|
||||
destinationDirectory = base.libsDirectory
|
||||
classifier project.name
|
||||
archiveClassifier = project.name
|
||||
}
|
||||
|
||||
assemble.dependsOn renameJarForPublication
|
||||
|
||||
jar {
|
||||
classifier "dev"
|
||||
archiveClassifier = "dev"
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
|
||||
@@ -48,7 +48,7 @@ shadowJar {
|
||||
exclude "architectury.common.json"
|
||||
|
||||
configurations = [project.configurations.shadowCommon]
|
||||
classifier "dev-shadow"
|
||||
archiveClassifier = "dev-shadow"
|
||||
|
||||
// Replace classes with forge's version
|
||||
exclude "dev/architectury/core/block/ArchitecturyLiquidBlock.class"
|
||||
@@ -65,21 +65,21 @@ shadowJar {
|
||||
remapJar {
|
||||
input.set shadowJar.archiveFile
|
||||
dependsOn shadowJar
|
||||
classifier null
|
||||
archiveClassifier = null
|
||||
}
|
||||
|
||||
task renameJarForPublication(type: Zip, dependsOn: remapJar) {
|
||||
from remapJar.archiveFile.map { zipTree(it) }
|
||||
extension "jar"
|
||||
archiveExtension = "jar"
|
||||
metadataCharset "UTF-8"
|
||||
destinationDirectory = base.libsDirectory
|
||||
classifier project.name
|
||||
archiveClassifier = project.name
|
||||
}
|
||||
|
||||
assemble.dependsOn renameJarForPublication
|
||||
|
||||
jar {
|
||||
classifier "dev"
|
||||
archiveClassifier = "dev"
|
||||
}
|
||||
|
||||
sourcesJar {
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,5 +1,5 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
||||
Reference in New Issue
Block a user