mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-12-27 07:26:48 +01:00
160 lines
5.9 KiB
Groovy
160 lines
5.9 KiB
Groovy
buildscript {
|
|
repositories {
|
|
maven { url = 'https://files.minecraftforge.net/maven' }
|
|
jcenter()
|
|
mavenCentral()
|
|
maven { url='https://repo.spongepowered.org/repository/maven-public/' }
|
|
}
|
|
dependencies {
|
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
|
classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT'
|
|
}
|
|
}
|
|
plugins {
|
|
id 'com.github.johnrengelman.shadow' version '5.2.0'
|
|
id 'com.matthewprenger.cursegradle' version '1.4.0'
|
|
}
|
|
|
|
apply plugin: 'net.minecraftforge.gradle'
|
|
apply plugin: 'org.spongepowered.mixin'
|
|
|
|
group = 'jozufozu'
|
|
version = "${mod_version}"
|
|
archivesBaseName = 'flywheel'
|
|
|
|
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
|
|
|
|
minecraft {
|
|
mappings channel: 'snapshot', version: "${mcp_mappings}"
|
|
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
|
|
|
|
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
|
|
|
// Default run configurations.
|
|
// These can be tweaked, removed, or duplicated as needed.
|
|
runs {
|
|
client {
|
|
workingDirectory project.file('run')
|
|
|
|
property 'forge.logging.markers', ''
|
|
property 'forge.logging.console.level', 'debug'
|
|
|
|
arg "-mixin.config=flywheel.mixins.json"
|
|
|
|
mods {
|
|
flywheel {
|
|
source sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
|
|
server {
|
|
workingDirectory project.file('run')
|
|
|
|
// Recommended logging data for a userdev environment
|
|
// The markers can be changed as needed.
|
|
// "SCAN": For mods scan.
|
|
// "REGISTRIES": For firing of registry events.
|
|
// "REGISTRYDUMP": For getting the contents of all 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'
|
|
|
|
arg "-mixin.config=flywheel.mixins.json"
|
|
|
|
mods {
|
|
flywheel {
|
|
source sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
|
|
data {
|
|
workingDirectory project.file('run')
|
|
|
|
// Recommended logging data for a userdev environment
|
|
// The markers can be changed as needed.
|
|
// "SCAN": For mods scan.
|
|
// "REGISTRIES": For firing of registry events.
|
|
// "REGISTRYDUMP": For getting the contents of all 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'
|
|
|
|
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
|
|
args '--mod', 'flywheel', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
|
|
|
|
mods {
|
|
flywheel {
|
|
source sourceSets.main
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
mixin {
|
|
add sourceSets.main, "flywheel.refmap.json"
|
|
}
|
|
|
|
// Include resources generated by data generators.
|
|
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
|
|
|
repositories {
|
|
maven {
|
|
//location of the maven for mixed mappings and registrate
|
|
name = "tterrag maven"
|
|
url = "https://maven.tterrag.com/"
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
// Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed
|
|
// that the dep is a ForgeGradle 'patcher' dependency. And it's 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:${minecraft_version}-${forge_version}"
|
|
|
|
// You may put jars on which you depend on in ./libs or you may define them like so..
|
|
// compile "some.group:artifact:version:classifier"
|
|
// compile "some.group:artifact:version"
|
|
|
|
// Real examples
|
|
// compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env
|
|
// compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
|
|
|
|
// The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
|
|
// provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
|
|
|
|
// These dependencies get remapped to your current MCP mappings
|
|
// deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'
|
|
|
|
// For more info...
|
|
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
|
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
|
|
|
annotationProcessor 'org.spongepowered:mixin:0.8:processor'
|
|
}
|
|
|
|
// Example for how to get properties into the manifest for reading by the runtime..
|
|
jar {
|
|
manifest {
|
|
attributes([
|
|
"Specification-Title" : "flywheel",
|
|
//"Specification-Vendor": "flywheel authors",
|
|
"Specification-Version" : "1", // We are version 1 of ourselves
|
|
"Implementation-Title" : project.name,
|
|
"Implementation-Version" : project.version,
|
|
//"Implementation-Vendor": "flywheel authors",
|
|
"MixinConfigs" : "flywheel.mixins.json",
|
|
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
|
|
])
|
|
}
|
|
}
|
|
|
|
jar.finalizedBy('reobfJar')
|