Skip to content

Commit

Permalink
Upgrade to gradle 8.12
Browse files Browse the repository at this point in the history
  • Loading branch information
polina4096 committed Jan 2, 2025
1 parent bfe16c3 commit 808c65b
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 49 deletions.
97 changes: 50 additions & 47 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,81 +1,84 @@
plugins {
id 'fabric-loom' version '1.6-SNAPSHOT'
id 'maven-publish'
id "org.jetbrains.kotlin.jvm" version "1.9.20-Beta2"
id 'org.jetbrains.kotlin.plugin.serialization' version '1.9.20-Beta2'
id "fabric-loom" version "1.9-SNAPSHOT"
id "maven-publish"
id "org.jetbrains.kotlin.jvm" version "2.1.20-Beta1"
id "org.jetbrains.kotlin.plugin.serialization" version "2.1.20-Beta1"
}

sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21

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

base {
archivesName = project.archives_base_name
}

repositories {
maven { url 'https://api.modrinth.com/maven/' }
maven { url 'https://maven.terraformersmc.com/releases/' }
maven { url 'https://maven.isxander.dev/releases/' }
maven { url "https://api.modrinth.com/maven/" }
maven { url "https://maven.terraformersmc.com/releases/" }
maven { url "https://maven.isxander.dev/releases/" }
}

dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
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}"
modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}"
modImplementation "dev.isxander:yet-another-config-lib:3.5.0+1.21-fabric"
modCompileOnly "com.terraformersmc:modmenu:11.0.1"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modImplementation "net.fabricmc:fabric-language-kotlin:${project.fabric_kotlin_version}"
modImplementation "dev.isxander:yet-another-config-lib:3.5.0+1.21-fabric"
modCompileOnly "com.terraformersmc:modmenu:11.0.1"

modRuntimeOnly "dev.isxander:yet-another-config-lib:3.5.0+1.21-fabric"
modRuntimeOnly "com.terraformersmc:modmenu:11.0.1"
modRuntimeOnly "dev.isxander:yet-another-config-lib:3.5.0+1.21-fabric"
modRuntimeOnly "com.terraformersmc:modmenu:11.0.1"
}

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

filesMatching("fabric.mod.json") {
expand "version": project.version
}
filesMatching("fabric.mod.json") {
expand "version": project.version
}
}

tasks.withType(JavaCompile).configureEach {
it.options.release = 21
it.options.release = 21
}

tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = 21
}
kotlinOptions {
jvmTarget = 21
}
}

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()
// 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_21
targetCompatibility = JavaVersion.VERSION_21
}

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

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
publications {
mavenJava(MavenPublication) {
from components.java
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// 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.
}
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// 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.
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ maven_group=polina4096.resquake
archives_base_name=resquake

# Dependencies
fabric_version=0.100.4+1.21
fabric_version=0.100.4+1.21
2 changes: 1 addition & 1 deletion 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
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down

0 comments on commit 808c65b

Please sign in to comment.