Skip to content

Commit 6a09cbb

Browse files
committed
Begin working on LightConfig
1 parent 7a80092 commit 6a09cbb

25 files changed

+1296
-276
lines changed

LICENSE

Lines changed: 687 additions & 159 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ Join our discord: https://discord.gg/zqnXSUqedW
55

66
## License
77

8-
This project is licensed under the LGPL-3 license.
8+
This project is licensed under the GPL-3.0 license w/ Minecraft Linking Exception.

build.gradle

Lines changed: 0 additions & 65 deletions
This file was deleted.

build.gradle.kts

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
plugins {
2+
id("fabric-loom") version "1.12-SNAPSHOT"
3+
id("maven-publish")
4+
}
5+
6+
class Loader {
7+
val version = property("loader_version")
8+
}
9+
10+
class Mod {
11+
val version = property("mod_version").toString()
12+
val minecraftVersion = property("minecraft_version")
13+
val description = property("mod_description").toString()
14+
val mavenGroup = property("maven_group").toString()
15+
val archivesBaseName = property("archives_base_name").toString()
16+
val loader = Loader()
17+
}
18+
19+
val mod = Mod()
20+
version = mod.version
21+
group = mod.mavenGroup
22+
23+
base {
24+
archivesName = mod.archivesBaseName
25+
}
26+
27+
repositories {}
28+
29+
dependencies {
30+
minecraft("com.mojang:minecraft:${mod.minecraftVersion}")
31+
mappings(loom.officialMojangMappings())
32+
modImplementation("net.fabricmc:fabric-loader:${mod.loader.version}")
33+
}
34+
35+
tasks.processResources {
36+
val props = buildMap {
37+
put("version", mod.version)
38+
put("mod_description", mod.description)
39+
}
40+
props.forEach(inputs::property)
41+
filteringCharset = "UTF-8"
42+
filesMatching("fabric.mod.json") {
43+
expand(props)
44+
}
45+
}
46+
47+
tasks.withType<JavaCompile>().configureEach {
48+
options.encoding = "UTF-8"
49+
options.release = 21
50+
}
51+
52+
tasks.jar {
53+
from("LICENSE") {
54+
rename { "${it}_${project.base.archivesName.get()}" }
55+
}
56+
}
57+
58+
java {
59+
sourceCompatibility = JavaVersion.VERSION_21
60+
targetCompatibility = JavaVersion.VERSION_21
61+
}
62+
63+
// configure the maven publication
64+
publishing {
65+
publications {
66+
create<MavenPublication>("mavenJava") {
67+
artifactId = mod.archivesBaseName
68+
from(components["java"])
69+
}
70+
}
71+
72+
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
73+
repositories {
74+
}
75+
}

gradle.properties

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
# Done to increase the memory available to gradle.
2-
org.gradle.jvmargs=-Xmx3G
2+
org.gradle.jvmargs=-Xmx4G
33
org.gradle.parallel=true
44

5+
# IntelliJ IDEA is not yet fully compatible with configuration cache, see: https://github.com/FabricMC/fabric-loom/issues/1349
6+
org.gradle.configuration-cache=false
7+
58
# Fabric Properties
69
# check these on https://fabricmc.net/develop
7-
minecraft_version=1.21.4
8-
loader_version=0.16.10
9-
10-
# Dependencies
11-
fabric_version=0.115.0+1.21.4
12-
modmenu_version=13.0.1
10+
minecraft_version=1.21.10
11+
loader_version=0.17.3
1312

1413
# Mod Properties
1514
mod_version=1.0
16-
maven_group=btw.mixces.lightconfig
17-
archives_base_name=lightconfig
15+
mod_description=A config library.
16+
maven_group=org.visuals.legacy.lightconfig
17+
archives_base_name=lightconfig
18+
19+
# Dependencies
20+
fabric_version=0.137.0+1.21.10

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
#
4-
# Copyright © 2015-2021 the original authors.
4+
# Copyright © 2015 the original authors.
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -15,8 +15,6 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18-
# SPDX-License-Identifier: Apache-2.0
19-
#
2018

2119
##############################################################################
2220
#
@@ -57,7 +55,7 @@
5755
# Darwin, MinGW, and NonStop.
5856
#
5957
# (3) This script is generated from the Groovy template
60-
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
6159
# within the Gradle project.
6260
#
6361
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -86,8 +84,7 @@ done
8684
# shellcheck disable=SC2034
8785
APP_BASE_NAME=${0##*/}
8886
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89-
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90-
' "$PWD" ) || exit
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
9188

9289
# Use the maximum available, or set MAX_FD != -1 to use that value.
9390
MAX_FD=maximum

gradlew.bat

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16-
@rem SPDX-License-Identifier: Apache-2.0
17-
@rem
1816

1917
@if "%DEBUG%"=="" @echo off
2018
@rem ##########################################################################
@@ -45,11 +43,11 @@ set JAVA_EXE=java.exe
4543
%JAVA_EXE% -version >NUL 2>&1
4644
if %ERRORLEVEL% equ 0 goto execute
4745

48-
echo. 1>&2
49-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50-
echo. 1>&2
51-
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52-
echo location of your Java installation. 1>&2
46+
echo.
47+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48+
echo.
49+
echo Please set the JAVA_HOME variable in your environment to match the
50+
echo location of your Java installation.
5351

5452
goto fail
5553

@@ -59,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5957

6058
if exist "%JAVA_EXE%" goto execute
6159

62-
echo. 1>&2
63-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64-
echo. 1>&2
65-
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66-
echo location of your Java installation. 1>&2
60+
echo.
61+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62+
echo.
63+
echo Please set the JAVA_HOME variable in your environment to match the
64+
echo location of your Java installation.
6765

6866
goto fail
6967

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
pluginManagement {
22
repositories {
3-
maven {
4-
name = 'Fabric'
5-
url = 'https://maven.fabricmc.net/'
6-
}
73
mavenCentral()
84
gradlePluginPortal()
5+
maven("https://maven.fabricmc.net/")
96
}
107
}

src/main/java/btw/mixces/lightconfig/LightConfigClient.java

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)