Skip to content

Commit

Permalink
Updated to 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtleArmyMc committed Nov 30, 2021
1 parent 7277e37 commit dafa435
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 44 deletions.
62 changes: 25 additions & 37 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,27 +1,24 @@
plugins {
id 'fabric-loom' version '0.8-SNAPSHOT'
id 'fabric-loom' version '0.10-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version + "+mc" + project.minecraft_version
group = project.maven_group

minecraft {
repositories {
maven {
name = 'Terraformers'
url = 'https://maven.terraformersmc.com/releases/'
}
}

dependencies {
repositories {
maven {
name = 'Terraformers'
url = 'https://maven.terraformersmc.com/releases/'
}
}

//to change the versions see the gradle.properties file
// 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}"
Expand All @@ -39,46 +36,37 @@ 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).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 16
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
}

// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this task, sources will not be generated.
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = "sources"
from sourceSets.main.allSource
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()
}

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(jar) {
builtBy remapJar
}
artifact("${project.buildDir.absolutePath}/libs/${archivesBaseName}-${project.version}.jar"){
builtBy remapJar
}
artifact(sourcesJar) {
builtBy remapSourcesJar
}
from components.java
}
}

// select the repositories you want to publish to
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
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.
}
}
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
org.gradle.jvmargs = -Xmx1G

#Fabric properties
minecraft_version = 1.17
yarn_mappings = 1.17+build.5
loader_version = 0.11.3
minecraft_version = 1.18
yarn_mappings = 1.18+build.1
loader_version = 0.12.5

#Mod properties
mod_version = 1.0.1
maven_group = com.turtlearmymc.panoramatweaker
archives_base_name = panorama_tweaker

#Dependencies
modmenu_version = 2.0.0-beta.7
modmenu_version = 3.0.0
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ protected void init() {
this.addDrawableChild(new ButtonWidget(this.width / 2 - 154, this.height - y_padding, 150, 20,
new TranslatableText("gui.cancel"), (button) -> {
this.restoreConfig();
client.openScreen(parent);
client.setScreen(parent);
}));
this.addDrawableChild(new ButtonWidget(this.width / 2 + 4, this.height - y_padding, 150, 20,
new TranslatableText("gui.done"), (button) -> {
this.saveConfig();
client.openScreen(parent);
client.setScreen(parent);
}));

final int widgetCount = 6;
Expand Down

0 comments on commit dafa435

Please sign in to comment.