2023-03-02 14:07:48 +01:00
|
|
|
plugins {
|
2023-03-23 01:33:03 +01:00
|
|
|
id 'fabric-loom' version '1.1-SNAPSHOT' apply false
|
2022-11-07 00:38:54 +01:00
|
|
|
}
|
|
|
|
|
2023-03-02 14:07:48 +01:00
|
|
|
allprojects {
|
2022-11-07 00:09:52 +01:00
|
|
|
apply plugin: 'maven-publish'
|
2023-03-19 19:38:08 +01:00
|
|
|
apply plugin: 'fabric-loom'
|
2023-03-02 14:07:48 +01:00
|
|
|
|
|
|
|
group = project.maven_group
|
|
|
|
version = project.maven_version
|
|
|
|
|
2022-11-07 00:09:52 +01:00
|
|
|
sourceCompatibility = JavaVersion.VERSION_17
|
|
|
|
targetCompatibility = JavaVersion.VERSION_17
|
|
|
|
|
2023-03-02 14:07:48 +01:00
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
name 'altarik-snapshots'
|
|
|
|
url 'https://repo.altarik.fr/snapshots/'
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
name 'altarik-releases'
|
|
|
|
url 'https://repo.altarik.fr/releases/'
|
|
|
|
}
|
|
|
|
maven {
|
|
|
|
name = 'Fabric'
|
|
|
|
url = 'https://maven.fabricmc.net/'
|
|
|
|
}
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
|
2022-11-07 00:09:52 +01:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
2023-03-02 14:07:48 +01:00
|
|
|
from components.java
|
2022-11-07 00:09:52 +01:00
|
|
|
}
|
2023-03-23 01:33:03 +01:00
|
|
|
}
|
2022-11-07 00:09:52 +01:00
|
|
|
repositories {
|
|
|
|
maven {
|
|
|
|
name 'altarik'
|
2022-11-07 00:38:54 +01:00
|
|
|
url 'https://repo.altarik.fr/'.concat(project.version.endsWith('SNAPSHOT') ? 'snapshots/' : 'releases/')
|
2022-11-07 00:09:52 +01:00
|
|
|
credentials {
|
|
|
|
username = project.repo_username
|
|
|
|
password = project.repo_password
|
|
|
|
}
|
|
|
|
}
|
2022-09-19 23:52:14 +02:00
|
|
|
}
|
|
|
|
}
|
2023-03-02 14:07:48 +01:00
|
|
|
|
2023-03-19 19:38:08 +01:00
|
|
|
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"
|
|
|
|
|
|
|
|
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
|
|
|
|
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used.
|
|
|
|
// We'll use that if it's available, but otherwise we'll use the older option.
|
|
|
|
def targetVersion = 17
|
|
|
|
if (JavaVersion.current().isJava9Compatible()) {
|
|
|
|
it.options.release = targetVersion
|
|
|
|
}
|
|
|
|
}
|
2022-11-07 00:09:52 +01:00
|
|
|
|
2023-02-27 00:13:09 +01:00
|
|
|
dependencies {
|
|
|
|
testImplementation "org.junit.jupiter:junit-jupiter-api:${project.junit_version}"
|
|
|
|
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${project.junit_version}"
|
2023-03-19 19:38:08 +01:00
|
|
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
|
|
|
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
|
|
|
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
|
|
|
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
2023-02-27 00:13:09 +01:00
|
|
|
}
|
2023-02-03 12:31:51 +01:00
|
|
|
|
|
|
|
java {
|
|
|
|
withSourcesJar()
|
|
|
|
withJavadocJar()
|
|
|
|
}
|
|
|
|
|
2023-02-27 00:13:09 +01:00
|
|
|
test {
|
|
|
|
useJUnitPlatform()
|
|
|
|
}
|
2023-02-03 12:31:51 +01:00
|
|
|
|
2023-03-02 14:07:48 +01:00
|
|
|
}
|
2022-11-07 00:09:52 +01:00
|
|
|
|
2023-03-19 19:38:08 +01:00
|
|
|
dependencies {
|
2023-03-23 01:33:03 +01:00
|
|
|
include subprojects.collect { project -> project }
|
2023-03-19 19:38:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/*jar {
|
2023-03-02 14:07:48 +01:00
|
|
|
dependsOn subprojects.jar
|
|
|
|
subprojects.each { project ->
|
|
|
|
from(project.jar) {
|
|
|
|
into("META-INF/jars/")
|
|
|
|
}
|
2022-09-19 23:52:14 +02:00
|
|
|
}
|
2023-03-19 19:38:08 +01:00
|
|
|
}*/
|