-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
--- Signed-off-by: AterAnimAvis <AterAnimAvis@gmail.com>
- Loading branch information
1 parent
d9e4cb8
commit 0c41196
Showing
105 changed files
with
3,092 additions
and
1,346 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,141 @@ | ||
/*================================================================================================== BuildScript ==== */ | ||
buildscript { | ||
repositories { | ||
maven(url = "https://files.minecraftforge.net/maven") | ||
jcenter() | ||
mavenCentral() | ||
} | ||
|
||
dependencies { | ||
classpath(group = "net.minecraftforge.gradle", name = "ForgeGradle", version = "3.+") { | ||
isChanging = true | ||
} | ||
} | ||
} | ||
|
||
/*========================================================================================== Config -> Minecraft ==== */ | ||
val forgeVersion: String by extra | ||
val mappingsChannel: String by extra | ||
val mappingsVersion: String by extra | ||
val minecraftVersion: String by extra | ||
|
||
/*================================================================================================ Config -> Mod ==== */ | ||
val modId: String by extra | ||
val modVersion: String by extra | ||
val modGroup: String by extra | ||
val vendor: String by extra | ||
|
||
/*========================================================================================= Config -> Run Config ==== */ | ||
val level: String by extra | ||
val markers: String by extra | ||
|
||
/*======================================================================================= Config -> Dependencies ==== */ | ||
val jetbrainsAnnotationVersion: String by extra | ||
|
||
/*================================================================================== Config -> Test Dependencies ==== */ | ||
val junitVersion: String by extra | ||
|
||
/*====================================================================================================== Plugins ==== */ | ||
plugins { | ||
`java-library` | ||
} | ||
|
||
apply(plugin = "net.minecraftforge.gradle") | ||
|
||
/*========================================================================================= Minecraft Dependency ==== */ | ||
|
||
/* Note: Due to the way kotlin gradle works we need to define the minecraft dependency before we configure Minecraft */ | ||
dependencies { | ||
"minecraft"(group = "net.minecraftforge", name = "forge", version = "$minecraftVersion-$forgeVersion") | ||
} | ||
|
||
/*==================================================================================================== Minecraft ==== */ | ||
|
||
minecraft { | ||
mappingChannel = mappingsChannel | ||
mappingVersion = mappingsVersion | ||
|
||
runs { | ||
config("client") | ||
config("server") | ||
|
||
// config("data") { | ||
// args("--mod", modId, "--all", "--output", file("src/generated/resources/")) | ||
// } | ||
} | ||
} | ||
|
||
/*======================================================================================================== Setup ==== */ | ||
project.group = modGroup | ||
project.version = "$minecraftVersion-$modVersion" | ||
|
||
/* Java 8 Target + Parameter Names */ | ||
tasks.withType<JavaCompile> { | ||
sourceCompatibility = "1.8" | ||
targetCompatibility = "1.8" | ||
options.compilerArgs.add("-parameters") | ||
} | ||
|
||
/* Finalize the jar by Reobf */ | ||
tasks.named<Jar>("jar") { | ||
finalizedBy("reobfJar") | ||
} | ||
|
||
/* Manifest */ | ||
tasks.withType<Jar> { | ||
manifest { | ||
attributes( | ||
"Specification-Title" to modId, | ||
"Specification-Vendor" to vendor, | ||
"Specification-Version" to modVersion, | ||
"Implementation-Title" to project.name, | ||
"Implementation-Version" to project.version, | ||
"Implementation-Vendor" to vendor, | ||
"Implementation-Timestamp" to Date().format("yyyy-MM-dd'T'HH:mm:ssZ") | ||
) | ||
} | ||
} | ||
|
||
/* Generate Package Infos */ | ||
apply(from = "utils.gradle.kts") | ||
|
||
/*================================================================================================= Dependencies ==== */ | ||
|
||
dependencies { | ||
/* JUnit 5 */ | ||
testImplementation(group = "org.junit.jupiter", name = "junit-jupiter", version = junitVersion) | ||
|
||
/* Jetbrains Annotations */ | ||
implementation(group = "org.jetbrains", name = "annotations", version = jetbrainsAnnotationVersion) | ||
} | ||
|
||
/*==================================================================================================== Utilities ==== */ | ||
|
||
typealias Date = java.util.Date | ||
typealias SimpleDateFormat = java.text.SimpleDateFormat | ||
|
||
fun Date.format(format: String) = SimpleDateFormat(format).format(this) | ||
|
||
typealias RunConfig = net.minecraftforge.gradle.common.util.RunConfig | ||
typealias UserDevExtension = net.minecraftforge.gradle.userdev.UserDevExtension | ||
|
||
typealias RunConfiguration = RunConfig.() -> Unit | ||
|
||
fun minecraft(configuration: UserDevExtension.() -> Unit) = | ||
configuration(extensions.getByName("minecraft") as UserDevExtension) | ||
|
||
fun NamedDomainObjectContainerScope<RunConfig>.config(name: String, additionalConfiguration: RunConfiguration = {}) { | ||
val runDirectory = project.file("run") | ||
val sourceSet = the<JavaPluginConvention>().sourceSets["main"] | ||
|
||
create(name) { | ||
workingDirectory(runDirectory) | ||
property("forge.logging.markers", markers) | ||
property("forge.logging.console.level", level) | ||
environment("MOD_VERSION", modVersion) | ||
|
||
additionalConfiguration(this) | ||
|
||
mods { create(modId) { source(sourceSet) } } | ||
} | ||
} |
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,2 +1,31 @@ | ||
org.gradle.jvmargs=-Xmx3G | ||
org.gradle.daemon=false | ||
################################## Intellij ################################### | ||
# suppress inspection "UnusedProperty" for whole file | ||
|
||
################################### Gradle #################################### | ||
# Default Memory for Gradle Commands. Required for Minecraft de-compilation | ||
org.gradle.jvmargs =-Xmx3G | ||
# ForgeGradle shouldn't be run as a Daemon. | ||
org.gradle.daemon =false | ||
|
||
################################## Minecraft ################################## | ||
forgeVersion =32.0.108 | ||
mappingsChannel =snapshot | ||
mappingsVersion =20200820-1.16.1 | ||
minecraftVersion =1.16.1 | ||
|
||
##################################### Mod ##################################### | ||
modId =block_renderer | ||
modVersion =1.4.0 | ||
modGroup =com.unascribed | ||
vendor =AterAnimAvis | ||
|
||
################################# Run Config ################################## | ||
level =debug | ||
markers =NONE | ||
defaultMarkers =SCAN,REGISTRIES,REGISTRYDUMP | ||
|
||
################################ Dependencies ################################# | ||
jetbrainsAnnotationVersion=20.1.+ | ||
|
||
############################## Test Dependencies ############################## | ||
junitVersion =5.6.+ |
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,6 +1,5 @@ | ||
#Tue Apr 28 18:20:48 BST 2020 | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip | ||
distributionUrl =https\://services.gradle.org/distributions/gradle-5.3-all.zip | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
zipStorePath=wrapper/dists | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath =wrapper/dists | ||
zipStoreBase =GRADLE_USER_HOME |
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,9 +1,15 @@ | ||
package com.unascribed.blockrenderer; | ||
|
||
import net.minecraftforge.fml.loading.FMLEnvironment; | ||
import net.minecraftforge.fml.loading.JarVersionLookupHandler; | ||
|
||
public interface Reference { | ||
|
||
String MOD_ID = "block_renderer"; | ||
String NAME = "BlockRenderer"; | ||
String VERSION = "1.2.0"; | ||
|
||
String VERSION = JarVersionLookupHandler.getSpecificationVersion(Reference.class).orElseGet(() -> System.getenv("MOD_VERSION")); | ||
|
||
boolean isDebug = !FMLEnvironment.production; | ||
|
||
} |
26 changes: 0 additions & 26 deletions
26
src/main/java/com/unascribed/blockrenderer/annotation/MethodsReturnNonnullByDefault.java
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...ribed/blockrenderer/init/Keybindings.java → ...lockrenderer/client/init/Keybindings.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
4 changes: 4 additions & 0 deletions
4
src/main/java/com/unascribed/blockrenderer/client/init/package-info.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,4 @@ | ||
@NonnullDefault | ||
package com.unascribed.blockrenderer.client.init; | ||
|
||
import org.lwjgl.system.NonnullDefault; |
Oops, something went wrong.