Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QuiltMC port #25

Open
wants to merge 10 commits into
base: 1.19
Choose a base branch
from
Open
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
34 changes: 34 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
tab_width = 4
trim_trailing_whitespace = true

[*.gradle]
indent_style = tab

[*.java]
indent_style = tab

[*.json]
indent_style = space
indent_size = 2

[quilt.mod.json]
indent_style = tab
tab_width = 2

[*.toml]
indent_style = tab
tab_width = 2

[*.properties]
indent_style = space
indent_size = 2

[.editorconfig]
indent_style = space
indent_size = 4
24 changes: 9 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,36 +1,30 @@
# gradle

# Gradle
.gradle/
build/
out/
classes/

# eclipse
# Quilt Loom
run/

# Eclipse
*.launch

# idea

# IntelliJ Idea
.idea/
*.iml
*.ipr
*.iws

# vscode

# Visual Studio Code
.settings/
.vscode/
bin/
.classpath
.project

# macos
# Eclipse JDT LS
workspace/

# macOS
*.DS_Store

# fabric

run/

# enviroment
.env
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Ngrok LAN Banner](https://github.com/Alujjdnd/Ngrok-LAN/blob/main/docs/assets/banner.png?raw=true)
![Ngrok LAN Banner](https://github.com/Alujjdnd/Ngrok-LAN/blob/1.18.2/docs/assets/banner.png?raw=true)

<h1 align="center">
Ngrok LAN
Expand All @@ -11,7 +11,7 @@
<a href="https://www.codacy.com/gh/Alujjdnd/Ngrok-LAN/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=Alujjdnd/Ngrok-LAN&amp;utm_campaign=Badge_Grade"><img src="https://app.codacy.com/project/badge/Grade/b38f7148f2934ad8b6d4413b70a173fd"/></a>
<img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/m/alujjdnd/ngrok-lan">
</br>
<img src=https://raw.githubusercontent.com/Alujjdnd/Ngrok-LAN/main/docs/assets/OSSrs.png>
<img src=https://raw.githubusercontent.com/Alujjdnd/Ngrok-LAN/1.18.2/docs/assets/OSSrs.png>
</div>

## Help Needed!
Expand All @@ -26,7 +26,7 @@ after you click on "Open Public Server".
For more on how Ngrok-LAN works, check out [What is Ngrok](#what-is-ngrok).

<div align="center">
<img src="https://raw.githubusercontent.com/Alujjdnd/Ngrok-LAN/main/docs/assets/demo.gif" alt="Network Diagram" width="70%"/>
<img src="https://raw.githubusercontent.com/Alujjdnd/Ngrok-LAN/1.18.2/docs/assets/demo.gif" alt="Network Diagram" width="70%"/>
</div>

# Installation/Quick Start
Expand Down Expand Up @@ -129,7 +129,7 @@ friends to connect to our server. This doesn't require any other configuration o
internet, and an Ngrok account, you can host your singleplayer world to your friends across the globe.

<div align="center">
<img src="https://raw.githubusercontent.com/Alujjdnd/Ngrok-LAN/main/docs/assets/Network.jpg" alt="Network Diagram" width="80%"/>
<img src="https://raw.githubusercontent.com/Alujjdnd/Ngrok-LAN/1.18.2/docs/assets/Network.jpg" alt="Network Diagram" width="80%"/>
</div>

## Ngrok Account Requirements
Expand Down
93 changes: 44 additions & 49 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
alias(libs.plugins.quilt.loom)
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '7.1.2'
id 'java'
id 'java'
id "com.modrinth.minotaur" version "2.+"
//id 'net.minecraftforge.gradle.forge' version '2.0.2'
//id 'com.matthewprenger.cursegradle' version '1.4.0'
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
version = project.version
group = project.maven_group

repositories {
Expand All @@ -23,65 +18,74 @@ repositories {
// for more information about repositories.

maven { url "https://maven.shedaniel.me/" }
maven { url "https://maven.terraformersmc.com/" }
maven { url "https://maven.terraformersmc.com/" }
}

// All the dependencies are declared at gradle/libs.version.toml and referenced with "libs.<id>"
// See https://docs.gradle.org/current/userguide/platforms.html for information on how version catalogs work.
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}"

//Java-Ngrok, a wrapper for the Ngrok service by providing a handy Java API to call it.
modImplementation(include("com.github.alexdlaird:java-ngrok:1.5.6"))

modImplementation(include("org.yaml:snakeyaml:1.8"))

modApi("me.shedaniel.cloth:cloth-config-fabric:7.0.72") {
exclude(group: "net.fabricmc.fabric-api")
}
minecraft libs.minecraft
mappings loom.layered {
addLayer quiltMappings.mappings("org.quiltmc:quilt-mappings:${libs.versions.quilt.mappings.get()}:v2")
// officialMojangMappings() // Uncomment if you want to use Mojang mappings as your primary mappings, falling back on QM for parameters and Javadocs
}
modImplementation libs.quilt.loader

modImplementation(include("blue.endless:jankson:1.2.1"))
// QSL is not a complete API; You will need Quilted Fabric API to fill in the gaps.
// Quilted Fabric API will automatically pull in the correct QSL version.
modImplementation libs.quilted.fabric.api

modImplementation(include("com.terraformersmc:modmenu:4.0.0"))
// Java-Ngrok, a wrapper for the Ngrok service by providing a handy Java API to call it.
modImplementation(include("com.github.alexdlaird:java-ngrok:${libs.versions.java.ngrok.get()}"))
// Cloth config
modApi("me.shedaniel.cloth:cloth-config-fabric:${libs.versions.cloth.config.get()}") {
exclude(group: "net.fabricmc.fabric-api")
}
// Mod menu
modImplementation(include("com.terraformersmc:modmenu:${libs.versions.modmenu.get()}"))
}

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

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

tasks.withType(JavaCompile).configureEach {
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.encoding = "UTF-8"
it.options.release = 17
}

java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// Still required by IDEs such as Eclipse and Visual Studio Code
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

// 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()

// If this mod is going to be a library, then it should also generate Javadocs in order to aid with development.
// Uncomment this line to generate them.
// withJavadocJar()
}

// If you plan to use a different file for the license, don't forget to change the file name here!
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
rename { "${it}_${archivesBaseName}" }
}
}

shadowJar {
manifest {
attributes 'Main-Class': 'com.example.ApplicationKt'
}
manifest {
attributes 'Main-Class': 'com.example.ApplicationKt'
}
}

// configure the maven publication
// Configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
Expand All @@ -102,21 +106,12 @@ import com.modrinth.minotaur.dependencies.ModDependency
modrinth {
token = System.getenv("MODRINTH_TOKEN") // This is the default. Remember to have the MODRINTH_TOKEN environment variable set or else this will fail, or set it to whatever you want - just make sure it stays private!
projectId = "oTa1qz6R"
versionNumber = project.mod_version // You don't need to set this manually. Will fail if Modrinth has this version already
versionNumber = version // You don't need to set this manually. Will fail if Modrinth has this version already
versionType = "release" // This is the default
uploadFile = remapJar // With Fabric Loom or Architectury Loom, this MUST be set to `remapJar` instead of `jar`!
gameVersions = [project.minecraft_version] // Must be an array, even with only one version
gameVersions = [libs.versions.minecraft] // Must be an array, even with only one version
loaders = ["fabric"] // Must also be an array - no need to specify this if you're using Fabric Loom or ForgeGradle
dependencies = [
new ModDependency("mOgUt4GM", "required")
]
}

//curseforge {
// apiKey = System.getenv("CURSEFORGE_TOKEN") // This should really be in a gradle.properties file
// project {
// id = '602252'
// changelog = 'Added content and fixed bugs' // A file can also be set using: changelog = file('changelog.txt')
// releaseType = 'release'
// }
//}
20 changes: 7 additions & 13 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.19
yarn_mappings=1.19+build.4
loader_version=0.14.8
# Gradle Properties
org.gradle.jvmargs = -Xmx1G
org.gradle.parallel = true

# Mod Properties
mod_version = 1.4.4-1.19
maven_group = alujjdnd.ngrok.lan
archives_base_name = ngrok-lan-expose-mod
version = 1.4.5
maven_group = alujjdnd.ngrok.lan
archives_base_name = ngrok-lan-expose-mod

# Dependencies
fabric_version=0.56.3+1.19
# Dependencies are managed at gradle/libs.versions.toml
Loading