Skip to content
Open

1.20 #29

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,9 @@ out/
# fabric

run/
classes/
classes/
# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build
99 changes: 83 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,29 +1,96 @@
plugins {
id 'fabric-loom' version "0.5-SNAPSHOT"
id 'fabric-loom' version '1.3.1'
id 'maven-publish'
}

sourceCompatibility = 1.8
targetCompatibility = 1.8
version = project.mod_version
group = project.maven_group

archivesBaseName = "CustomSelectionBox"
version = "5.0.2"
repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.

minecraft {
maven {
url "https://maven.terraformersmc.com/releases/"
content {
includeGroup "com.terraformersmc"
}
}
}

repositories {
maven { url "https://dl.bintray.com/shedaniel/legacy-yarn-updated" }
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}"

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

// modmenu API
modImplementation("com.terraformersmc:modmenu:${project.modmenu_version}") {
transitive(false)
}
modApi("com.terraformersmc:modmenu:${project.modmenu_version}") {
transitive(false)
}
}

processResources {
filesMatching('fabric.mod.json') {
expand 'version': project.version
}
inputs.property "version", project.version
inputs.property "version", project.version
filteringCharset "UTF-8"

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

dependencies {
minecraft "com.mojang:minecraft:1.16.2"
mappings "me.shedaniel:legacy-yarn:1.16.2+build.9+legacy.20w09a+build.8:v2"
modCompile "net.fabricmc:fabric-loader:0.9.2+build.206"
def targetJavaVersion = 17
tasks.withType(JavaCompile).configureEach {
// 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
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
it.options.release = targetJavaVersion
}
}

java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
archivesBaseName = project.archives_base_name
// 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()
}

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

// configure the maven publication
publishing {
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.
}
}
15 changes: 15 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.14.22
# Mod Properties
mod_version=fabric-1.20.1
maven_group=me.shedaniel
archives_base_name=csb
# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.86.1+1.20.1
modmenu_version=7.2.2
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
5 changes: 3 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#Fri Dec 28 12:18:45 HKT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
Loading