Flywheel/build.gradle
PepperCode1 7c757fee80 Merge remote-tracking branch 'origin/1.18/dev' into 1.18/fabric/dev
Conflicts:
	build.gradle
	gradle.properties
	src/main/java/com/jozufozu/flywheel/core/QuadConverter.java
	src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingRenderer.java
	src/main/java/com/jozufozu/flywheel/core/vertex/BlockVertexList.java
	src/main/java/com/jozufozu/flywheel/event/ForgeEvents.java
	src/main/java/com/jozufozu/flywheel/mixin/ChunkRebuildHooksMixin.java
	src/main/java/com/jozufozu/flywheel/mixin/InstanceAddMixin.java
	src/main/java/com/jozufozu/flywheel/mixin/LevelRendererMixin.java
2022-11-10 18:05:46 -08:00

160 lines
4.3 KiB
Groovy

plugins {
id 'fabric-loom' version "${loom_version}"
id 'maven-publish'
id 'com.matthewprenger.cursegradle' version "${cursegradle_version}"
}
boolean dev = System.getenv('RELEASE') == null || System.getenv('RELEASE').equalsIgnoreCase('false');
ext.buildNumber = System.getenv('BUILD_NUMBER')
group = 'com.jozufozu.flywheel'
archivesBaseName = "flywheel-fabric-${artifact_minecraft_version}"
version = mod_version + (dev && buildNumber != null ? "-${buildNumber}" : '')
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
java.toolchain.languageVersion = JavaLanguageVersion.of(17)
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
repositories {
maven {
url 'https://www.cursemaven.com'
content {
includeGroup "curse.maven"
}
}
maven {
name 'tterrag maven'
url 'https://maven.tterrag.com/'
}
maven {
url 'https://maven.parchmentmc.org/'
}
maven {
name 'Modrinth'
url 'https://api.modrinth.com/maven'
}
maven {
url 'https://maven.vram.io'
}
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
}
dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings loom.layered() {
officialMojangMappings()
parchment("org.parchmentmc.data:parchment-${minecraft_version}:${parchment_version}@zip")
}
modImplementation "net.fabricmc:fabric-loader:${loader_version}"
// Fabric API
modImplementation "net.fabricmc.fabric-api:fabric-api:${fabric_version}"
modCompileOnly 'curse.maven:starlight-521783:3667443'
modCompileOnly 'maven.modrinth:iris:1.18.x-v1.2.5'
modCompileOnly 'maven.modrinth:sodium:mc1.18.2-0.4.1'
implementation 'com.google.code.findbugs:jsr305:3.0.2'
modCompileOnly 'maven.modrinth:indium:1.0.6+mc1.18.2'
modCompileOnly 'io.vram:frex-fabric-mc118:6.0.263'
}
loom {
runs {
client {
property('flw.loadRenderDoc', 'true')
}
}
}
processResources {
inputs.property 'version', project.version
filesMatching('fabric.mod.json') {
expand 'version': project.version
}
}
tasks.withType(JavaCompile).configureEach {
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
javadoc {
source = [sourceSets.main.allJava]
// prevent java 8's strict doclint for javadocs from failing builds
options.addStringOption('Xdoclint:none', '-quiet')
}
jar {
manifest {
attributes([
'Specification-Title' : 'flywheel',
//'Specification-Vendor': 'flywheel authors',
'Specification-Version' : '1', // We are version 1 of ourselves
'Implementation-Title' : project.jar.baseName,
'Implementation-Version' : project.jar.archiveVersion,
//'Implementation-Vendor': 'flywheel authors',
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'MixinConfigs' : 'flywheel.mixins.json'
])
}
}
java {
withSourcesJar()
withJavadocJar()
}
void addLicense(jarTask) {
jarTask.from('LICENSE.md') {
rename '(.*)\\.(.*)', '$1_' + archivesBaseName + '.$2'
}
}
addLicense(jar)
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = archivesBaseName
from components.java
}
}
repositories {
if (project.hasProperty('mavendir')) {
maven { url mavendir }
}
}
}
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
mainArtifact jar
addGameVersion '1.18.2'
}
}