Flywheel/build.gradle
PepperBell dbe46a6f28 Merge remote-tracking branch 'origin/1.17/dev' into 1.17/fabric/dev
Conflicts:
	build.gradle
	gradle.properties
	src/main/java/com/jozufozu/flywheel/backend/Loader.java
	src/main/java/com/jozufozu/flywheel/backend/instancing/InstancedRenderDispatcher.java
	src/main/java/com/jozufozu/flywheel/config/BooleanConfig.java
	src/main/java/com/jozufozu/flywheel/config/SConfigureBooleanPacket.java
	src/main/java/com/jozufozu/flywheel/core/AtlasStitcher.java
	src/main/java/com/jozufozu/flywheel/core/PartialModel.java
	src/main/java/com/jozufozu/flywheel/core/crumbling/CrumblingRenderer.java
	src/main/java/com/jozufozu/flywheel/core/model/BakedModelModel.java
	src/main/java/com/jozufozu/flywheel/core/model/BlockModel.java
	src/main/java/com/jozufozu/flywheel/event/BeginFrameEvent.java
	src/main/java/com/jozufozu/flywheel/event/RenderLayerEvent.java
	src/main/java/com/jozufozu/flywheel/mixin/FixFabulousDepthMixin.java
	src/main/java/com/jozufozu/flywheel/mixin/RenderHooksMixin.java
	src/main/java/com/jozufozu/flywheel/util/BakedQuadWrapper.java
	src/main/java/com/jozufozu/flywheel/util/BufferBuilderReader.java
	src/main/resources/flywheel.mixins.json
	src/main/resources/pack.mcmeta
2021-11-20 09:54:22 -08:00

146 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 = 0
project.buildnumber = System.getenv('BUILD_NUMBER') != null ? System.getenv('BUILD_NUMBER') : 'custom'
version = "${mc_update_version}-${mod_version}" + (dev ? ".${buildnumber}" : '')
group = 'com.jozufozu.flywheel'
archivesBaseName = 'flywheel'
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
java.toolchain.languageVersion = JavaLanguageVersion.of(16)
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch'))
repositories {
maven {
name 'tterrag maven'
url 'https://maven.tterrag.com/'
}
maven {
url 'https://maven.parchmentmc.org/'
}
}
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}"
implementation 'com.google.code.findbugs:jsr305:3.0.2'
//implementation 'org.joml:joml:1.10.1'
}
processResources {
inputs.property 'version', project.version
filesMatching('fabric.mod.json') {
expand 'version': project.version
}
}
tasks.withType(JavaCompile).configureEach {
// ensure that the encoding is set to UTF-8, no matter what the system default is
// this fixes some edge cases with special characters not displaying correctly
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
// If Javadoc is generated, this must be specified in that task too.
it.options.encoding = 'UTF-8'
// Minecraft 1.17 (21w19a) upwards uses Java 16.
it.options.release = 16
}
java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}
jar {
from('LICENSE') {
rename { "${it}_${archivesBaseName}" }
}
}
// 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")
])
}
}
javadoc {
source = [sourceSets.main.allJava]
// prevent java 8's strict doclint for javadocs from failing builds
options.addStringOption('Xdoclint:none', '-quiet')
}
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
archiveClassifier.set('javadoc')
}
artifacts {
archives remapJar, sourcesJar, javadocJar
}
publishing {
tasks.publish.dependsOn 'build'
publications {
mavenJava(MavenPublication) {
artifact remapJar
artifact(sourcesJar) {
builtBy remapSourcesJar
}
artifact javadocJar
}
}
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.17.1'
}
}