Skip to content

Commit

Permalink
upstream: gradle 8.1.1 and fabric
Browse files Browse the repository at this point in the history
  • Loading branch information
27rogi committed Jun 15, 2023
1 parent 7e9f5f3 commit 7c82494
Show file tree
Hide file tree
Showing 6 changed files with 216 additions and 149 deletions.
55 changes: 28 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ plugins {
id "org.jetbrains.kotlin.jvm"
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
version = "${project.mod_version}+${minecraft_version_group}"
group = project.maven_group

base {
archivesName = project.archives_base_name
}

repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url "https://maven.terraformersmc.com/" }
maven { url "https://maven.shedaniel.me/" }
Expand All @@ -20,6 +21,17 @@ repositories {
maven { url "https://maven.siphalor.de/" }
}

loom {
splitEnvironmentSourceSets()

mods {
"homabric" {
sourceSet sourceSets.main
sourceSet sourceSets.client
}
}
}

Set<String> fabricApiModules = [
"fabric-api-base",
"fabric-command-api-v2",
Expand All @@ -42,6 +54,7 @@ dependencies {
modImplementation include("com.github.Lortseam.completeconfig:base:2.3.1")
modImplementation include("xyz.nucleoid:server-translations-api:2.0.0-beta.2+1.19.4-pre2")
}

processResources {
inputs.property "version", project.version

Expand All @@ -50,47 +63,35 @@ 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) {
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"

// Minecraft 1.18.1 upwards uses Java 17.
it.options.release = 17
}

java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}

jar {
from ("LICENSE") {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
// add all the jars that should be included when publishing to maven
artifact(remapJar) {
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
from components.java
}
}

// select the repositories you want to publish to
repositories {
// uncomment to publish to the local maven
// mavenLocal()
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}

Expand Down
16 changes: 9 additions & 7 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
kotlin.code.style=official
org.gradle.jvmargs=-Xmx4G

minecraft_version_group=1.19.x

# Fabric Properties
# Check these on https://fabricmc.net/versions.html
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.2
loader_version=0.14.19
loader_version=0.14.21

# Fabric API
fabric_version=0.78.0+1.19.4
#Fabric api
fabric_version=0.83.0+1.19.4

loom_version=1.1-SNAPSHOT
loom_version=1.2-SNAPSHOT

# Mod Properties
mod_version = 2.0.3+1.19.x
mod_version = 2.0.4
maven_group = space.rogi27
archives_base_name = homabric

# Kotlin
kotlin_version=1.8.20
fabric_kotlin_version=1.9.3+kotlin.1.8.20
kotlin_version=1.8.22
fabric_kotlin_version=1.9.5+kotlin.1.8.22
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 7c82494

Please sign in to comment.