HelloWorldFabric/exampleMod/build.gradle

55 lines
1.3 KiB
Groovy
Raw Normal View History

2023-11-25 06:44:12 +00:00
plugins {
id 'java'
id 'maven-publish'
}
2024-12-29 14:46:01 +00:00
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
2023-11-25 06:44:12 +00:00
version = "1.2.0"
group = "com.elitemastereric"
archivesBaseName = "examplemod"
repositories {
mavenCentral()
maven {
url 'https://jitpack.io'
}
maven {
url "https://repo.spongepowered.org/maven/"
}
maven {
url "https://maven.fabricmc.net/"
}
}
dependencies {
// Dependency on the Hello World app
implementation project(':app')
implementation project(':modLoader')
}
processResources {
inputs.property "version", project.version
filteringCharset "UTF-8"
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"
2024-12-29 14:46:01 +00:00
it.options.release = 17
2023-11-25 06:44:12 +00:00
}
task buildAndCopy(type: Copy) {
group 'build'
dependsOn 'assemble'
from "build/libs/"
into "../run/mods"
}