Files
CraterLib/build.gradle

128 lines
3.8 KiB
Groovy
Raw Normal View History

plugins {
id 'java'
2024-05-01 14:11:52 +02:00
id 'com.github.johnrengelman.shadow' version '8.1.1' apply false
id "xyz.wagyourtail.unimined" version "1.3.9" apply false
id "com.hypherionmc.modutils.modpublisher" version "2.1.6"
2024-05-19 14:18:58 +02:00
id "com.hypherionmc.modutils.orion" version "1.0.+"
id 'maven-publish'
}
2024-10-18 12:30:15 +02:00
var relType = project.properties["releaseType"] ?: "${release_type}"
ext {
isPort = (relType == 'port')
}
orion.setup {
2024-05-01 14:11:52 +02:00
multiProject = true
enableMirrorMaven = true
enableReleasesMaven = true
2024-10-22 18:44:15 +02:00
//enableSnapshotsMaven = isPort
2024-05-01 14:11:52 +02:00
dopplerToken = System.getenv("DOPPLER_KEY")
2023-05-28 21:52:26 +02:00
2024-05-01 14:11:52 +02:00
versioning {
2024-05-09 19:41:18 +02:00
identifier("${relType}")
2024-05-01 14:11:52 +02:00
}
2023-05-28 21:55:09 +02:00
}
2022-05-12 00:20:18 +02:00
group = project_group
2023-05-29 18:24:39 +02:00
2023-05-28 21:55:09 +02:00
subprojects {
apply plugin: "xyz.wagyourtail.unimined"
apply plugin: "java"
apply plugin: 'maven-publish'
apply plugin: 'com.github.johnrengelman.shadow'
2024-05-05 23:15:56 +02:00
apply plugin: 'com.hypherionmc.modutils.modpublisher'
2024-05-05 23:15:56 +02:00
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
2022-05-12 00:20:18 +02:00
2024-05-04 20:51:43 +02:00
group = rootProject.group
repositories {
mavenCentral()
2024-10-18 12:30:15 +02:00
mavenLocal()
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
}
configurations {
shade
modCompileOnly
stupidRemapArch
implementation.extendsFrom shade
compileOnly.extendsFrom modCompileOnly
compileOnly.extendsFrom stupidRemapArch
}
dependencies {
2024-05-01 14:11:52 +02:00
// All Projects
shade "me.hypherionmc.moon-config:core:${moon_config}"
shade "me.hypherionmc.moon-config:toml:${moon_config}"
shade "me.hypherionmc.moon-config:json:${moon_config}"
2024-05-01 14:11:52 +02:00
shade "com.hypherionmc:rpcsdk:${rpc_sdk}"
shade "me.hypherionmc.sdlink:mcdiscordformatter-1.20.3:${discord_formatter}"
shade "net.kyori:adventure-api:${adventure}"
shade "net.kyori:adventure-text-serializer-gson:${adventure}"
2024-08-31 12:19:08 +02:00
shade "net.kyori:adventure-text-minimessage:${adventure}"
compileOnly 'net.luckperms:api:5.4'
compileOnly("org.projectlombok:lombok:${lombok}")
annotationProcessor("org.projectlombok:lombok:${lombok}")
}
jar {
2022-05-12 00:18:53 +02:00
manifest {
attributes([
'Specification-Title' : mod_name,
'Specification-Vendor' : mod_author,
'Specification-Version' : project.jar.archiveVersion,
'Implementation-Title' : project.name,
'Implementation-Version' : project.jar.archiveVersion,
'Implementation-Vendor' : mod_author,
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'Timestamp' : System.currentTimeMillis(),
'Built-On-Java' : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})",
2024-05-01 14:11:52 +02:00
'Built-On-Minecraft' : minecraft_version
2022-05-12 00:18:53 +02:00
])
}
}
/**
* ===============================================================================
* = DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU ARE DOING =
* ===============================================================================
*/
unimined.minecraft(sourceSets.main, true) {
version minecraft_version
mappings {
mojmap()
devNamespace "mojmap"
}
mods {
remap(configurations.stupidRemapArch) {
catchAWNamespaceAssertion()
}
}
2022-05-12 00:18:53 +02:00
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
it.options.release = 21
2022-05-12 00:18:53 +02:00
}
2024-05-01 14:11:52 +02:00
tasks.withType(GenerateModuleMetadata).configureEach {
2022-05-12 00:18:53 +02:00
enabled = false
}
}
2024-05-01 14:11:52 +02:00
// TODO MODULE JARS