2021-06-11 14:33:10 -04:00
|
|
|
plugins {
|
2021-12-03 16:37:35 -05:00
|
|
|
id "com.github.johnrengelman.shadow" version "7.1.0"
|
2021-06-11 14:33:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
architectury {
|
|
|
|
platformSetupLoomIde()
|
|
|
|
forge()
|
|
|
|
}
|
|
|
|
|
2021-12-05 18:14:45 -05:00
|
|
|
loom {
|
|
|
|
forge {
|
|
|
|
mixinConfigs = ["flan.mixins.json", "flan.forge.mixins.json"]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-12-03 16:37:35 -05:00
|
|
|
configurations {
|
|
|
|
common
|
|
|
|
shadowCommon // Don't use shadow from the shadow plugin because we don't want IDEA to index this.
|
|
|
|
compileClasspath.extendsFrom common
|
|
|
|
runtimeClasspath.extendsFrom common
|
|
|
|
developmentForge.extendsFrom common
|
|
|
|
}
|
|
|
|
|
2021-07-20 18:27:08 -04:00
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
maven {
|
|
|
|
name = "FTB"
|
|
|
|
url = "https://maven.saps.dev/minecraft"
|
|
|
|
}
|
2021-07-30 12:20:35 -04:00
|
|
|
maven {
|
|
|
|
name = "CurseMaven"
|
|
|
|
url "https://www.cursemaven.com"
|
|
|
|
}
|
2022-11-26 14:33:32 -05:00
|
|
|
maven {
|
|
|
|
name = "minecolonies"
|
|
|
|
url "https://ldtteam.jfrog.io/ldtteam/modding/"
|
|
|
|
}
|
2021-07-20 18:27:08 -04:00
|
|
|
}
|
|
|
|
|
2021-06-11 14:33:10 -04:00
|
|
|
dependencies {
|
2023-05-21 17:59:43 -04:00
|
|
|
forge "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
|
2021-06-11 14:33:10 -04:00
|
|
|
|
2021-12-03 16:37:35 -05:00
|
|
|
common(project(path: ":common", configuration: "namedElements")) { transitive false }
|
|
|
|
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive = false }
|
2021-07-20 18:27:08 -04:00
|
|
|
|
2022-08-03 16:50:16 -04:00
|
|
|
modCompileOnly "dev.ftb.mods:ftb-ranks-forge:${ftb_ranks}"
|
|
|
|
modCompileOnly dicemcmm
|
2022-11-26 14:33:32 -05:00
|
|
|
|
2023-05-06 09:58:42 -04:00
|
|
|
//modRuntimeOnly "dev.ftb.mods:ftb-chunks-forge:${rootProject.ftb_chunks}"
|
2022-11-26 14:33:32 -05:00
|
|
|
//CompileOnly cause dependencies
|
|
|
|
modCompileOnly "com.ldtteam:minecolonies:${rootProject.minecolonies}"
|
2021-06-11 14:33:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
processResources {
|
|
|
|
inputs.property "version", project.version
|
|
|
|
|
2023-05-21 17:59:43 -04:00
|
|
|
def loader_version = (forge_version =~ /([0-9]+)\.([0-9]+)\.([0-9]+)/)[0][1]
|
2021-06-11 14:33:10 -04:00
|
|
|
filesMatching("META-INF/mods.toml") {
|
2023-05-21 18:39:21 -04:00
|
|
|
expand "version": project.version, "loader_version": loader_version, "homepage": curse_page_forge,
|
2023-05-21 18:46:24 -04:00
|
|
|
"mcversion": minecraft_version, "forge_version": forge_version
|
|
|
|
}
|
2021-06-11 14:33:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
shadowJar {
|
|
|
|
exclude "fabric.mod.json"
|
|
|
|
|
|
|
|
configurations = [project.configurations.shadowCommon]
|
|
|
|
classifier "dev-shadow"
|
|
|
|
}
|
|
|
|
|
|
|
|
remapJar {
|
|
|
|
input.set shadowJar.archiveFile
|
|
|
|
dependsOn shadowJar
|
2022-11-25 16:36:13 -05:00
|
|
|
classifier "forge"
|
2021-06-11 14:33:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
classifier "dev"
|
|
|
|
}
|
|
|
|
|
|
|
|
sourcesJar {
|
|
|
|
def commonSources = project(":common").sourcesJar
|
|
|
|
dependsOn commonSources
|
|
|
|
from commonSources.archiveFile.map { zipTree(it) }
|
2022-11-25 16:36:13 -05:00
|
|
|
classifier "forge-sources"
|
2021-06-11 14:33:10 -04:00
|
|
|
}
|
|
|
|
|
2021-12-03 16:37:35 -05:00
|
|
|
components.java {
|
|
|
|
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) {
|
|
|
|
skip()
|
|
|
|
}
|
|
|
|
}
|
2021-07-20 16:57:34 -04:00
|
|
|
|
|
|
|
task apiJar(type: Jar, dependsOn: classes) {
|
|
|
|
archiveClassifier.set "forge-api-source"
|
|
|
|
from project(":common").sourceSets.main.output + sourceSets.main.output
|
|
|
|
include "io/github/flemmli97/flan/api/**"
|
|
|
|
}
|
|
|
|
|
2021-07-20 18:27:08 -04:00
|
|
|
task remapApiJar(type: net.fabricmc.loom.task.RemapJarTask) {
|
2021-07-20 16:57:34 -04:00
|
|
|
archiveClassifier.set "forge-api"
|
|
|
|
input.set apiJar.archiveFile
|
|
|
|
addNestedDependencies = false
|
|
|
|
dependsOn apiJar
|
|
|
|
}
|
|
|
|
|
2021-06-11 14:33:10 -04:00
|
|
|
publishing {
|
|
|
|
publications {
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
// add all the jars that should be included when publishing to maven
|
|
|
|
artifact(remapJar) {
|
2022-11-25 16:36:13 -05:00
|
|
|
classifier null
|
2021-06-11 14:33:10 -04:00
|
|
|
builtBy remapJar
|
|
|
|
}
|
|
|
|
artifact(sourcesJar) {
|
2022-11-25 16:36:13 -05:00
|
|
|
classifier "sources"
|
2021-06-11 14:33:10 -04:00
|
|
|
builtBy remapSourcesJar
|
|
|
|
}
|
2023-05-06 11:04:27 -04:00
|
|
|
artifact(remapApiJar) {
|
|
|
|
classifier "api"
|
|
|
|
builtBy remapApiJar
|
|
|
|
}
|
2021-06-11 14:33:10 -04:00
|
|
|
artifactId project.archives_base_name
|
2022-11-23 18:48:21 -05:00
|
|
|
version project.version + "-forge"
|
2021-06-11 14:33:10 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
repositories {
|
2021-06-13 17:07:10 -04:00
|
|
|
maven {
|
2021-06-11 14:33:10 -04:00
|
|
|
url "https://gitlab.com/api/v4/projects/21830712/packages/maven"
|
|
|
|
//url "https://maven.pkg.github.com/flemmli97/<>"
|
|
|
|
credentials {
|
|
|
|
username = project.findProperty("gpr.user") ?: System.getenv("GPR_USER")
|
|
|
|
password = project.findProperty("gpr.gitlab.token") ?: System.getenv("GPR_GITLAB_TOKEN")
|
|
|
|
//password = project.findProperty("gpr.github.token") ?: System.getenv("GPR_TOKEN")
|
|
|
|
}
|
2021-06-13 17:07:10 -04:00
|
|
|
}
|
2021-06-11 14:33:10 -04:00
|
|
|
}
|
|
|
|
}
|