Cleanup build.gradle. Added JEI as dependency. Changed mappings channel to official.
This commit is contained in:
108
build.gradle
108
build.gradle
@ -11,46 +11,20 @@ buildscript {
|
|||||||
|
|
||||||
apply plugin: 'net.minecraftforge.gradle'
|
apply plugin: 'net.minecraftforge.gradle'
|
||||||
|
|
||||||
group = 'dev.micle'
|
def archiveVersion = "Forge-${project.mcVersion}-${project.buildVersion}" as Object
|
||||||
version = 'Forge-1.16.5-1.1.1'
|
|
||||||
|
|
||||||
java {
|
java.toolchain.languageVersion = JavaLanguageVersion.of(8)
|
||||||
archivesBaseName = 'TotemOfReviving'
|
|
||||||
toolchain.languageVersion = JavaLanguageVersion.of(8)
|
|
||||||
}
|
|
||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
// The mappings can be changed at any time and must be in the following format.
|
mappings channel: 'official', version: mcVersion
|
||||||
// Channel: Version:
|
|
||||||
// snapshot YYYYMMDD Snapshot are built nightly.
|
|
||||||
// stable # Stables are built at the discretion of the MCP team.
|
|
||||||
// official MCVersion Official field/method names from Mojang mapping files
|
|
||||||
//
|
|
||||||
// You must be aware of the Mojang license when using the 'official' mappings.
|
|
||||||
// See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
|
|
||||||
//
|
|
||||||
// Use non-default mappings at your own risk. They may not always work.
|
|
||||||
// Simply re-run your setup task after changing the mappings to update your workspace.
|
|
||||||
mappings channel: 'snapshot', version: '20210309-1.16.5'
|
|
||||||
|
|
||||||
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
||||||
|
|
||||||
// Default run configurations.
|
|
||||||
// These can be tweaked, removed, or duplicated as needed.
|
|
||||||
runs {
|
runs {
|
||||||
client {
|
client {
|
||||||
workingDirectory project.file('run')
|
workingDirectory project.file('run')
|
||||||
|
|
||||||
// Recommended logging data for a userdev environment
|
|
||||||
// The markers can be added/removed as needed separated by commas.
|
|
||||||
// "SCAN": For mods scan.
|
|
||||||
// "REGISTRIES": For firing of registry events.
|
|
||||||
// "REGISTRYDUMP": For getting the contents of all registries.
|
|
||||||
property 'forge.logging.markers', 'REGISTRIES'
|
property 'forge.logging.markers', 'REGISTRIES'
|
||||||
|
|
||||||
// Recommended logging level for the console
|
|
||||||
// You can set various levels here.
|
|
||||||
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
|
|
||||||
property 'forge.logging.console.level', 'debug'
|
property 'forge.logging.console.level', 'debug'
|
||||||
|
|
||||||
mods {
|
mods {
|
||||||
@ -63,16 +37,7 @@ minecraft {
|
|||||||
server {
|
server {
|
||||||
workingDirectory project.file('run')
|
workingDirectory project.file('run')
|
||||||
|
|
||||||
// Recommended logging data for a userdev environment
|
|
||||||
// The markers can be added/removed as needed separated by commas.
|
|
||||||
// "SCAN": For mods scan.
|
|
||||||
// "REGISTRIES": For firing of registry events.
|
|
||||||
// "REGISTRYDUMP": For getting the contents of all registries.
|
|
||||||
property 'forge.logging.markers', 'REGISTRIES'
|
property 'forge.logging.markers', 'REGISTRIES'
|
||||||
|
|
||||||
// Recommended logging level for the console
|
|
||||||
// You can set various levels here.
|
|
||||||
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
|
|
||||||
property 'forge.logging.console.level', 'debug'
|
property 'forge.logging.console.level', 'debug'
|
||||||
|
|
||||||
mods {
|
mods {
|
||||||
@ -85,19 +50,9 @@ minecraft {
|
|||||||
data {
|
data {
|
||||||
workingDirectory project.file('run')
|
workingDirectory project.file('run')
|
||||||
|
|
||||||
// Recommended logging data for a userdev environment
|
|
||||||
// The markers can be added/removed as needed separated by commas.
|
|
||||||
// "SCAN": For mods scan.
|
|
||||||
// "REGISTRIES": For firing of registry events.
|
|
||||||
// "REGISTRYDUMP": For getting the contents of all registries.
|
|
||||||
property 'forge.logging.markers', 'REGISTRIES'
|
property 'forge.logging.markers', 'REGISTRIES'
|
||||||
|
|
||||||
// Recommended logging level for the console
|
|
||||||
// You can set various levels here.
|
|
||||||
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
|
|
||||||
property 'forge.logging.console.level', 'debug'
|
property 'forge.logging.console.level', 'debug'
|
||||||
|
|
||||||
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
|
|
||||||
args '--mod', 'totemofreviving', '--all',
|
args '--mod', 'totemofreviving', '--all',
|
||||||
'--existing', file('src/main/resources').toString(),
|
'--existing', file('src/main/resources').toString(),
|
||||||
'--existing', file('src/generated/resources').toString(),
|
'--existing', file('src/generated/resources').toString(),
|
||||||
@ -112,48 +67,43 @@ minecraft {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Include resources generated by data generators.
|
sourceSets.main.resources {
|
||||||
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
srcDir 'src/generated/resources'
|
||||||
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
// Put repositories for dependencies here
|
maven {
|
||||||
// ForgeGradle automatically adds the Forge maven and Maven Central for you
|
name = "Progwml6 maven"
|
||||||
|
url = "https://dvs1.progwml6.com/files/maven/"
|
||||||
// If you have mod jar dependencies in ./libs, you can declare them as a repository like so:
|
}
|
||||||
// flatDir {
|
maven {
|
||||||
// dir 'libs'
|
name = "ModMaven"
|
||||||
// }
|
url = "https://modmaven.k-4u.nl"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Specify the version of Minecraft to use. If this is any group other than 'net.minecraft' it is assumed
|
minecraft "net.minecraftforge:forge:${project.mcVersion}-${project.forgeVersion}"
|
||||||
// that the dep is a ForgeGradle 'patcher' dependency, and its patches will be applied.
|
|
||||||
// The userdev artifact is a special name and will get all sorts of transformations applied to it.
|
|
||||||
minecraft 'net.minecraftforge:forge:1.16.5-36.2.16'
|
|
||||||
|
|
||||||
// Real mod deobf dependency examples - these get remapped to your current mappings
|
// JEI
|
||||||
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}:api") // Adds JEI API as a compile dependency
|
if (project.hasProperty('jeiVersion')) {
|
||||||
// runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}:${jei_version}") // Adds the full JEI mod as a runtime dependency
|
// compile against JEI API but do not include it at runtime
|
||||||
// implementation fg.deobf("com.tterrag.registrate:Registrate:MC${mc_version}-${registrate_version}") // Adds registrate as a dependency
|
compileOnly fg.deobf("mezz.jei:jei-${project.mcVersion}:${project.jeiVersion}:api")
|
||||||
|
// at runtime, use full JEI jar
|
||||||
// Examples using mod jars from ./libs
|
runtimeOnly fg.deobf("mezz.jei:jei-${project.mcVersion}:${project.jeiVersion}")
|
||||||
// implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")
|
}
|
||||||
|
|
||||||
// For more info...
|
|
||||||
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
|
||||||
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Example for how to get properties into the manifest for reading at runtime.
|
|
||||||
jar {
|
jar {
|
||||||
|
archiveFileName = "${project.archivesBaseName}-${archiveVersion}.jar"
|
||||||
manifest {
|
manifest {
|
||||||
attributes([
|
attributes([
|
||||||
"Specification-Title" : "totemofreviving",
|
"Specification-Title" : project.name,
|
||||||
//"Specification-Vendor": "totemofreviving authors",
|
"Specification-Vendor" : project.author,
|
||||||
"Specification-Version" : "1", // We are version 1 of ourselves
|
"Specification-Version" : "1",
|
||||||
"Implementation-Title" : project.name,
|
"Implementation-Title" : project.name,
|
||||||
"Implementation-Version" : project.jar.archiveVersion,
|
"Implementation-Vendor" : project.author,
|
||||||
//"Implementation-Vendor": "totemofreviving authors",
|
"Implementation-Version" : archiveVersion,
|
||||||
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
|
@ -1,2 +1,14 @@
|
|||||||
org.gradle.jvmargs=-Xmx3G
|
org.gradle.jvmargs=-Xmx3G
|
||||||
org.gradle.daemon=false
|
org.gradle.daemon=false
|
||||||
|
|
||||||
|
group = dev.micle
|
||||||
|
archivesBaseName = TotemOfReviving
|
||||||
|
modID = totemofreviving
|
||||||
|
name = Micle's Totem of Reviving
|
||||||
|
author = Micle
|
||||||
|
|
||||||
|
buildVersion = 1.1.1
|
||||||
|
mcVersion = 1.16.5
|
||||||
|
forgeVersion = 36.2.16
|
||||||
|
|
||||||
|
jeiVersion = 7.+
|
||||||
|
@ -1 +1 @@
|
|||||||
rootProject.name = 'TotemOfReviving-1.16'
|
rootProject.name = "${archivesBaseName}-1.16"
|
||||||
|
Reference in New Issue
Block a user