2021-06-16 21:57:52 +02:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
maven { url = 'https://files.minecraftforge.net/maven' }
|
|
|
|
jcenter()
|
|
|
|
mavenCentral()
|
2021-06-30 21:43:54 +02:00
|
|
|
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
|
2021-06-16 21:57:52 +02:00
|
|
|
}
|
|
|
|
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.matthewprenger.cursegradle' version '1.4.0'
|
|
|
|
}
|
|
|
|
|
|
|
|
apply plugin: 'net.minecraftforge.gradle'
|
2021-06-21 22:56:27 +02:00
|
|
|
apply plugin: 'maven-publish'
|
2021-06-16 21:57:52 +02:00
|
|
|
apply plugin: 'org.spongepowered.mixin'
|
|
|
|
|
2021-06-21 01:20:18 +02:00
|
|
|
boolean dev = System.getenv('RELEASE') == null || System.getenv('RELEASE').equalsIgnoreCase('false');
|
2021-06-19 08:52:13 +02:00
|
|
|
|
2021-06-21 01:20:18 +02:00
|
|
|
ext.buildnumber = 0
|
|
|
|
project.buildnumber = System.getenv('BUILD_NUMBER') != null ? System.getenv('BUILD_NUMBER') : "custom"
|
|
|
|
|
|
|
|
version = "${mc_update_version}-${mod_version}" + (dev ? ".${buildnumber}" : '')
|
2021-06-21 22:56:27 +02:00
|
|
|
group = 'com.jozufozu.flywheel'
|
2021-06-16 21:57:52 +02:00
|
|
|
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')
|
|
|
|
|
|
|
|
runs {
|
|
|
|
client {
|
|
|
|
workingDirectory project.file('run')
|
|
|
|
|
|
|
|
property 'forge.logging.markers', ''
|
|
|
|
property 'forge.logging.console.level', 'debug'
|
2021-07-02 22:12:33 +02:00
|
|
|
property 'fml.earlyprogresswindow', 'false'
|
2021-06-16 21:57:52 +02:00
|
|
|
|
|
|
|
arg "-mixin.config=flywheel.mixins.json"
|
|
|
|
|
|
|
|
mods {
|
|
|
|
flywheel {
|
|
|
|
source sourceSets.main
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
server {
|
|
|
|
workingDirectory project.file('run')
|
|
|
|
|
|
|
|
property 'forge.logging.markers', 'REGISTRIES'
|
|
|
|
property 'forge.logging.console.level', 'debug'
|
|
|
|
|
|
|
|
arg "-mixin.config=flywheel.mixins.json"
|
|
|
|
|
|
|
|
mods {
|
|
|
|
flywheel {
|
|
|
|
source sourceSets.main
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
data {
|
|
|
|
workingDirectory project.file('run')
|
|
|
|
|
|
|
|
property 'forge.logging.markers', 'REGISTRIES'
|
|
|
|
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"
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
maven {
|
2021-06-20 01:52:23 +02:00
|
|
|
name "tterrag maven"
|
|
|
|
url "https://maven.tterrag.com/"
|
2021-06-16 21:57:52 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
|
|
|
|
2021-06-20 01:52:23 +02:00
|
|
|
annotationProcessor 'org.spongepowered:mixin:0.8.2:processor'
|
2021-06-16 21:57:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// 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')
|
2021-06-19 08:52:13 +02:00
|
|
|
|
2021-06-20 01:52:23 +02:00
|
|
|
task sourcesJar(type: Jar) {
|
|
|
|
from sourceSets.main.allSource
|
|
|
|
archiveBaseName.set(project.archivesBaseName)
|
|
|
|
archiveVersion.set("${project.version}")
|
|
|
|
archiveClassifier.set('sources')
|
|
|
|
}
|
|
|
|
|
2021-06-21 01:20:18 +02:00
|
|
|
artifacts {
|
|
|
|
archives jar, sourcesJar
|
|
|
|
}
|
|
|
|
|
2021-06-21 22:56:27 +02:00
|
|
|
publishing {
|
|
|
|
tasks.publish.dependsOn 'build'
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
artifact jar
|
|
|
|
artifact sourcesJar
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
if (project.hasProperty('mavendir')) {
|
|
|
|
maven { url mavendir }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-06-19 08:52:13 +02:00
|
|
|
tasks.curseforge.enabled = !dev && project.hasProperty('jozu_curseforge_key')
|
|
|
|
|
|
|
|
curseforge {
|
|
|
|
if (project.hasProperty('jozu_curseforge_key')) {
|
|
|
|
apiKey = project.jozu_curseforge_key
|
|
|
|
}
|
|
|
|
|
|
|
|
project {
|
|
|
|
id = project.projectId
|
|
|
|
changelog = file('changelog.txt')
|
|
|
|
releaseType = project.curse_type
|
2021-06-20 01:52:23 +02:00
|
|
|
mainArtifact jar
|
|
|
|
addArtifact sourcesJar
|
2021-06-19 08:52:13 +02:00
|
|
|
}
|
|
|
|
}
|