Skip to content

Commit

Permalink
feat: config option for the vanilla video settings screen (#17)
Browse files Browse the repository at this point in the history
* also, stonecutter is now set to target 1.21 instead
* some formatting changes
  • Loading branch information
UltimatChamp committed Jul 14, 2024
1 parent 351cc73 commit 662fa93
Show file tree
Hide file tree
Showing 21 changed files with 364 additions and 308 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Linux
/gradlew text eol=lf

# Windows
*.bat text eol=crlf
130 changes: 26 additions & 104 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,118 +1,40 @@
# User-specific stuff
.idea/

*.iml
*.ipr
*.iws
# gradle

# IntelliJ
.gradle/
build/
out/
# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory
classes/

# Linux trash folder which might appear on any partition or disk
.Trash-*
# eclipse

# .nfs files are created when an open file is removed but is still being accessed
.nfs*
*.launch

# General
.DS_Store
.AppleDouble
.LSOverride
# idea

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
.idea/
*.iml
*.ipr
*.iws

# Windows shortcuts
*.lnk
# vscode

.gradle
build/
.settings/
.vscode/
bin/
.classpath
.project

# Ignore Gradle GUI config
gradle-app.setting
# macos

# Cache of project
.gradletasknamecache
*.DS_Store

**/build/
# fabric

# Common working directory
run/

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
# java

hs_err_*.log
replay_*.log
*.hprof
*.jfr
53 changes: 26 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
plugins {
id 'fabric-loom' version '1.7.+'
id 'me.modmuss50.mod-publish-plugin' version '0.5.1'
id "fabric-loom" version "1.7.+"
id "me.modmuss50.mod-publish-plugin" version "0.5.2"
}

// for snapshots
def mcVer = ""
for (char c in (property('deps.minecraft_version') as List<Character>)) {
if (c.toString() != '-') {
for (char c in (property("deps.minecraft_version") as List<Character>)) {
if (c.toString() != "-") {
mcVer += c
}
}

version = project.mod_version + "+" + mcVer
group = project.maven_group

base {
archivesName = project.archives_base_name
}

repositories {
exclusiveContent {
forRepository {
Expand All @@ -28,24 +32,24 @@ repositories {
}
}

dependencies {
minecraft "com.mojang:minecraft:${property('deps.minecraft_version')}"
mappings "net.fabricmc:yarn:${property('deps.yarn_mappings')}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

modImplementation "net.fabricmc.fabric-api:fabric-api:${property('deps.fabric_version')}"
modImplementation "maven.modrinth:yacl:${property('deps.yacl_version')}"
modImplementation "maven.modrinth:modmenu:${property('deps.modmenu_version')}"
modImplementation "maven.modrinth:sodium:${property('deps.sodium_version')}"
}

loom {
runConfigs.all {
ideConfigGenerated true
runDir "../../run"
}
}

dependencies {
minecraft "com.mojang:minecraft:${property("deps.minecraft_version")}"
mappings "net.fabricmc:yarn:${property("deps.yarn_mappings")}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

modImplementation "net.fabricmc.fabric-api:fabric-api:${property("deps.fabric_version")}"
modImplementation "maven.modrinth:yacl:${property("deps.yacl_version")}"
modImplementation "maven.modrinth:modmenu:${property("deps.modmenu_version")}"
modImplementation "maven.modrinth:sodium:${property("deps.sodium_version")}"
}

if (stonecutter.current.isActive) {
rootProject.tasks.register("buildActive") {
group = "project"
Expand All @@ -56,10 +60,10 @@ if (stonecutter.current.isActive) {

processResources {
inputs.property "version", project.version
filteringCharset "UTF-8"
inputs.property "mcrange", project.property("deps.mc_range")

filesMatching("fabric.mod.json") {
expand "version": project.version
expand "version": project.version, "mcrange": project.property("deps.mc_range")
}
}

Expand All @@ -70,24 +74,19 @@ else
targetJavaVersion = 21

tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
it.options.release = targetJavaVersion
}
it.options.release = targetJavaVersion
}

java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
archivesBaseName = project.archives_base_name
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

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

Expand Down
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ modrinthId=m5T5xmUy
curseforgeId=1026394

# Dependencies
deps.mc_range=[VERSIONED]
deps.fabric_version=[VERSIONED]
deps.yacl_version=[VERSIONED]
deps.modmenu_version=[VERSIONED]
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 2 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 662fa93

Please sign in to comment.