2019-07-11 09:03:08 +02:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
maven { url = 'https://files.minecraftforge.net/maven' }
|
|
|
|
jcenter()
|
|
|
|
mavenCentral()
|
2021-03-08 17:29:42 +01:00
|
|
|
maven { url='https://repo.spongepowered.org/repository/maven-public/' }
|
2019-07-11 09:03:08 +02:00
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
2021-01-13 06:58:40 +01:00
|
|
|
classpath group: 'org.spongepowered', name: 'mixingradle', version: '0.7-SNAPSHOT'
|
2019-07-11 09:03:08 +02:00
|
|
|
}
|
|
|
|
}
|
2020-04-13 08:58:57 +02:00
|
|
|
plugins {
|
|
|
|
id 'com.github.johnrengelman.shadow' version '5.2.0'
|
2020-06-08 02:18:34 +02:00
|
|
|
id 'com.matthewprenger.cursegradle' version '1.4.0'
|
2020-04-13 08:58:57 +02:00
|
|
|
}
|
2020-06-08 02:18:34 +02:00
|
|
|
|
2021-06-16 20:19:33 +02:00
|
|
|
apply plugin: 'net.minecraftforge.gradle'
|
|
|
|
apply plugin: 'org.spongepowered.mixin'
|
2020-06-08 02:18:34 +02:00
|
|
|
|
2021-06-16 20:19:33 +02:00
|
|
|
group = 'jozufozu'
|
2021-06-16 20:58:17 +02:00
|
|
|
version = "${mod_version}"
|
2021-06-16 20:19:33 +02:00
|
|
|
archivesBaseName = 'flywheel'
|
2019-07-11 09:03:08 +02:00
|
|
|
|
2019-08-06 19:00:51 +02:00
|
|
|
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
|
2019-07-11 09:03:08 +02:00
|
|
|
|
|
|
|
minecraft {
|
2021-06-16 20:19:33 +02:00
|
|
|
mappings channel: 'snapshot', version: "${mcp_mappings}"
|
|
|
|
// makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
|
2021-04-10 01:23:49 +02:00
|
|
|
|
2021-06-16 20:19:33 +02:00
|
|
|
accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
|
|
|
|
|
|
|
|
// Default run configurations.
|
|
|
|
// These can be tweaked, removed, or duplicated as needed.
|
2021-04-10 01:23:49 +02:00
|
|
|
runs {
|
2021-06-16 20:19:33 +02:00
|
|
|
client {
|
2019-07-11 09:03:08 +02:00
|
|
|
workingDirectory project.file('run')
|
2021-06-16 20:19:33 +02:00
|
|
|
|
|
|
|
property 'forge.logging.markers', ''
|
|
|
|
property 'forge.logging.console.level', 'debug'
|
|
|
|
|
|
|
|
arg "-mixin.config=flywheel.mixins.json"
|
|
|
|
|
2019-07-11 09:03:08 +02:00
|
|
|
mods {
|
2021-06-16 20:19:33 +02:00
|
|
|
flywheel {
|
2019-07-11 09:03:08 +02:00
|
|
|
source sourceSets.main
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-08-06 21:51:02 +02:00
|
|
|
server {
|
2021-06-16 20:19:33 +02:00
|
|
|
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"
|
|
|
|
|
2019-08-06 19:00:51 +02:00
|
|
|
mods {
|
2021-06-16 20:19:33 +02:00
|
|
|
flywheel {
|
2019-08-06 19:00:51 +02:00
|
|
|
source sourceSets.main
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-07-11 09:03:08 +02:00
|
|
|
|
2019-08-06 21:51:02 +02:00
|
|
|
data {
|
2019-08-06 19:00:51 +02:00
|
|
|
workingDirectory project.file('run')
|
2021-06-16 20:19:33 +02:00
|
|
|
|
|
|
|
// 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
|
2019-07-11 09:03:08 +02:00
|
|
|
property 'forge.logging.console.level', 'debug'
|
2021-06-16 20:19:33 +02:00
|
|
|
|
|
|
|
// 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/')
|
|
|
|
|
2019-07-11 09:03:08 +02:00
|
|
|
mods {
|
2021-06-16 20:19:33 +02:00
|
|
|
flywheel {
|
2019-07-11 09:03:08 +02:00
|
|
|
source sourceSets.main
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-16 20:19:33 +02:00
|
|
|
mixin {
|
|
|
|
add sourceSets.main, "flywheel.refmap.json"
|
2020-07-18 20:07:22 +02:00
|
|
|
}
|
|
|
|
|
2021-06-16 20:19:33 +02:00
|
|
|
// Include resources generated by data generators.
|
|
|
|
sourceSets.main.resources { srcDir 'src/generated/resources' }
|
2020-04-26 06:58:38 +02:00
|
|
|
|
2019-09-16 12:27:28 +02:00
|
|
|
repositories {
|
2020-03-23 04:09:28 +01:00
|
|
|
maven {
|
2020-04-13 08:58:57 +02:00
|
|
|
//location of the maven for mixed mappings and registrate
|
2020-03-23 04:09:28 +01:00
|
|
|
name = "tterrag maven"
|
|
|
|
url = "https://maven.tterrag.com/"
|
|
|
|
}
|
2020-04-13 08:58:57 +02:00
|
|
|
}
|
|
|
|
|
2019-07-11 09:03:08 +02:00
|
|
|
dependencies {
|
2021-06-16 20:19:33 +02:00
|
|
|
// 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.
|
2020-06-08 02:18:34 +02:00
|
|
|
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
2021-04-10 01:23:49 +02:00
|
|
|
|
2021-06-16 20:19:33 +02:00
|
|
|
// 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
|
2020-10-11 15:43:04 +02:00
|
|
|
|
2021-06-16 20:19:33 +02:00
|
|
|
// 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'
|
2020-03-22 14:41:41 +01:00
|
|
|
|
2021-06-16 20:19:33 +02:00
|
|
|
// These dependencies get remapped to your current MCP mappings
|
|
|
|
// deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev'
|
2021-01-20 22:36:04 +01:00
|
|
|
|
2021-06-16 20:19:33 +02:00
|
|
|
// For more info...
|
|
|
|
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
|
|
|
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
2021-01-13 09:50:00 +01:00
|
|
|
|
2021-01-16 05:07:04 +01:00
|
|
|
annotationProcessor 'org.spongepowered:mixin:0.8:processor'
|
2019-07-11 09:03:08 +02:00
|
|
|
}
|
|
|
|
|
2021-06-16 20:19:33 +02:00
|
|
|
// Example for how to get properties into the manifest for reading by the runtime..
|
2019-07-11 09:03:08 +02:00
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes([
|
2021-06-16 20:19:33 +02:00
|
|
|
"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")
|
2019-07-11 09:03:08 +02:00
|
|
|
])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-16 20:19:33 +02:00
|
|
|
jar.finalizedBy('reobfJar')
|