-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
875 additions
and
502 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,120 @@ | ||
# gradle | ||
# User-specific stuff | ||
.idea/ | ||
|
||
.gradle/ | ||
build/ | ||
*.iml | ||
*.ipr | ||
*.iws | ||
|
||
# IntelliJ | ||
out/ | ||
classes/ | ||
# mpeltonen/sbt-idea plugin | ||
.idea_modules/ | ||
|
||
# eclipse | ||
# JIRA plugin | ||
atlassian-ide-plugin.xml | ||
|
||
*.launch | ||
# Compiled class file | ||
*.class | ||
|
||
# idea | ||
# Log file | ||
*.log | ||
|
||
.idea/ | ||
*.iml | ||
*.ipr | ||
*.iws | ||
# 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 | ||
|
||
# vscode | ||
# Linux trash folder which might appear on any partition or disk | ||
.Trash-* | ||
|
||
.settings/ | ||
.vscode/ | ||
bin/ | ||
.classpath | ||
.project | ||
# .nfs files are created when an open file is removed but is still being accessed | ||
.nfs* | ||
|
||
# macos | ||
# General | ||
.DS_Store | ||
.AppleDouble | ||
.LSOverride | ||
|
||
*.DS_Store | ||
# Icon must end with two \r | ||
Icon | ||
|
||
# fabric | ||
# 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 | ||
|
||
# Windows shortcuts | ||
*.lnk | ||
|
||
.gradle | ||
build/ | ||
|
||
# Ignore Gradle GUI config | ||
gradle-app.setting | ||
|
||
# Cache of project | ||
.gradletasknamecache | ||
|
||
**/build/ | ||
|
||
# Common working directory | ||
run/ | ||
fabric/run/ | ||
forge/run/ | ||
|
||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) | ||
!gradle-wrapper.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,51 @@ | ||
plugins { | ||
id 'fabric-loom' version '0.12-SNAPSHOT' | ||
id 'maven-publish' | ||
id "architectury-plugin" version "3.4-SNAPSHOT" | ||
id "dev.architectury.loom" version "1.2-SNAPSHOT" apply false | ||
} | ||
|
||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
|
||
archivesBaseName = project.archives_base_name | ||
version = project.mod_version | ||
group = project.maven_group | ||
|
||
repositories { | ||
// Add repositories to retrieve artifacts from in here. | ||
// You should only use this when depending on other mods because | ||
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically. | ||
// See https://docs.gradle.org/current/userguide/declaring_repositories.html | ||
// for more information about repositories. | ||
maven { url "https://maven.shedaniel.me/" } | ||
maven { url "https://maven.terraformersmc.com/"} | ||
architectury { | ||
minecraft = rootProject.minecraft_version | ||
} | ||
|
||
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}" | ||
|
||
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs. | ||
// You may need to force-disable transitiveness on them. | ||
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" | ||
modApi("me.shedaniel.cloth:cloth-config-fabric:${project.cloth_config_version}") { | ||
exclude(group: "net.fabricmc.fabric-api") | ||
} | ||
modImplementation "com.terraformersmc:modmenu:${project.mod_menu_version}" | ||
} | ||
subprojects { | ||
apply plugin: "dev.architectury.loom" | ||
|
||
processResources { | ||
inputs.property "version", project.version | ||
loom { | ||
silentMojangMappingsLicense() | ||
} | ||
|
||
filesMatching("fabric.mod.json") { | ||
expand "version": project.version | ||
} | ||
dependencies { | ||
minecraft "com.mojang:minecraft:${rootProject.minecraft_version}" | ||
// The following line declares the yarn mappings you may select this one as well. | ||
mappings "net.fabricmc:yarn:${rootProject.yarn_mappings}:v2" | ||
} | ||
} | ||
|
||
tasks.withType(JavaCompile).configureEach { | ||
// 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 | ||
// If Javadoc is generated, this must be specified in that task too. | ||
it.options.encoding = "UTF-8" | ||
allprojects { | ||
apply plugin: "java" | ||
apply plugin: "architectury-plugin" | ||
apply plugin: "maven-publish" | ||
|
||
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too | ||
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used. | ||
// We'll use that if it's available, but otherwise we'll use the older option. | ||
def targetVersion = 8 | ||
if (JavaVersion.current().isJava9Compatible()) { | ||
it.options.release = targetVersion | ||
} | ||
} | ||
|
||
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() | ||
} | ||
archivesBaseName = rootProject.archives_base_name | ||
version = rootProject.mod_version | ||
group = rootProject.maven_group | ||
|
||
jar { | ||
from("LICENSE") { | ||
rename { "${it}_${project.archivesBaseName}"} | ||
} | ||
} | ||
repositories { | ||
// Add repositories to retrieve artifacts from in here. | ||
// You should only use this when depending on other mods because | ||
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically. | ||
// See https://docs.gradle.org/current/userguide/declaring_repositories.html | ||
// for more information about repositories. | ||
maven { url "https://maven.shedaniel.me/" } | ||
maven { url "https://maven.terraformersmc.com/"} | ||
} | ||
|
||
// configure the maven publication | ||
publishing { | ||
publications { | ||
mavenJava(MavenPublication) { | ||
// add all the jars that should be included when publishing to maven | ||
artifact(remapJar) { | ||
builtBy remapJar | ||
} | ||
artifact(sourcesJar) { | ||
builtBy remapSourcesJar | ||
} | ||
} | ||
} | ||
tasks.withType(JavaCompile) { | ||
options.encoding = "UTF-8" | ||
options.release = 17 | ||
} | ||
|
||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. | ||
repositories { | ||
// 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. | ||
} | ||
java { | ||
withSourcesJar() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
architectury { | ||
common(project.enabled_platforms.split(",")) | ||
} | ||
|
||
dependencies { | ||
// We depend on fabric loader here to use the fabric @Environment annotations and get the mixin dependencies | ||
// Do NOT use other classes from fabric loader | ||
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}" | ||
modApi "me.shedaniel.cloth:cloth-config:${project.cloth_config_version}" | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenCommon(MavenPublication) { | ||
artifactId = rootProject.archives_base_name | ||
from components.java | ||
} | ||
} | ||
|
||
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. | ||
repositories { | ||
// Add repositories to publish to here. | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
common/src/main/java/dev/norbiros/emojitype/ConfigDirPlatform.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package dev.norbiros.emojitype; | ||
|
||
import dev.architectury.injectables.annotations.ExpectPlatform; | ||
|
||
import java.nio.file.Path; | ||
|
||
public class ConfigDirPlatform { | ||
|
||
@ExpectPlatform | ||
public static Path getConfigDirectory() { | ||
// Just throw an error, the content should get replaced at runtime. | ||
throw new AssertionError(); | ||
} | ||
} |
Oops, something went wrong.