Skip to content

Commit

Permalink
Initial 1.20.6 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
VixidDev committed Jun 17, 2024
0 parents commit 871920b
Show file tree
Hide file tree
Showing 33 changed files with 1,413 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

37 changes: 37 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Automatically build the project and run any configured tests for every push
# and submitted pull request. This can help catch issues that only occur on
# certain platforms or Java versions, and provides a first line of defence
# against bad commits.

name: build
on: [pull_request, push]

jobs:
build:
strategy:
matrix:
# Use these Java versions
java: [
21, # Current Java LTS
]
runs-on: ubuntu-22.04
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: validate gradle wrapper
uses: gradle/wrapper-validation-action@v2
- name: setup jdk ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'microsoft'
- name: make gradle wrapper executable
run: chmod +x ./gradlew
- name: build
run: ./gradlew build
- name: capture build artifacts
if: ${{ matrix.java == '21' }} # Only upload artifacts built from latest java
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: build/libs/
40 changes: 40 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# gradle

.gradle/
build/
out/
classes/

# eclipse

*.launch

# idea

.idea/
*.iml
*.ipr
*.iws

# vscode

.settings/
.vscode/
bin/
.classpath
.project

# macos

*.DS_Store

# fabric

run/

# java

hs_err_*.log
replay_*.log
*.hprof
*.jfr
73 changes: 73 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
java
id("fabric-loom") version "1.6-SNAPSHOT"
id("maven-publish")
id("com.github.johnrengelman.shadow") version "8.1.1"
id("org.jetbrains.kotlin.jvm") version "2.0.0"
}

version = rootProject.property("mod_version").toString()
group = rootProject.property("maven_group").toString()

repositories {
mavenCentral()

maven("https://pkgs.dev.azure.com/djtheredstoner/DevAuth/_packaging/public/maven/v1")
maven("https://maven.notenoughupdates.org/releases/")
}

val shadowImpl: Configuration by configurations.creating {
configurations.implementation.get().extendsFrom(this)
}

val shadowModImpl: Configuration by configurations.creating {
configurations.modImplementation.get().extendsFrom(this)
}

dependencies {
// To change the versions see the gradle.properties file
"minecraft"("com.mojang:minecraft:${rootProject.property("minecraft_version")}")
"mappings"("net.fabricmc:yarn:${rootProject.property("yarn_mappings")}:v2")
modImplementation("net.fabricmc:fabric-loader:${rootProject.property("loader_version")}")

modApi("net.fabricmc.fabric-api:fabric-api:${rootProject.property("fabric_version")}")
modImplementation("net.fabricmc:fabric-language-kotlin:${rootProject.property("fabric_kotlin_version")}")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")

shadowImpl("com.github.kwhat:jnativehook:2.2.2")
shadowModImpl("org.notenoughupdates.moulconfig:modern:3.0.0-beta.11")
}

loom {
runs {
named("client") {
property("devauth.enabled", "true")
property("mixin.debug", "true")
}
}
}

tasks.shadowJar {
configurations = listOf(shadowModImpl)
relocate("io.github.notenoughupdates.moulconfig", "dev.vixid.vsm.deps.moulconfig")
}

tasks.processResources {
inputs.property("version", project.version)

filesMatching("fabric.mod.json") {
expand(inputs.properties)
}
}

val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "21"
}

java {
withSourcesJar()
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
}
18 changes: 18 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.20.6
yarn_mappings=1.20.6+build.3
loader_version=0.15.11
fabric_kotlin_version=1.11.0+kotlin.2.0.0

# Mod Properties
mod_version=1.0.0
maven_group=dev.vixid.vsm
archives_base_name=vsm

# Dependencies
fabric_version=0.99.4+1.20.6
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 871920b

Please sign in to comment.