DG_LAB/build.gradle
3944Realms 2c2a7077a3
Some checks failed
Build and Release / build (push) Failing after 1m39s
Build and Release / release (push) Has been skipped
2026-06-10-1
project_version=4.4.14.20
* 添加FML库声明
2026-06-10 14:19:19 +08:00

80 lines
2.2 KiB
Groovy

plugins {
id("idea")
id("eclipse")
id("maven-publish")
}
group = "${project_version}"
version = "${project_version}"
allprojects {
repositories {
mavenCentral()
}
}
subprojects {
apply {
plugin('java')
plugin("maven-publish")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
tasks.named('jar', Jar).configure {
manifest {
attributes([
'FMLModType': 'LIBRARY',
'Automatic-Module-Name': project.name.replace('-', '.'),
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Implementation-Vendor': group
])
}
}
dependencies {
implementation 'org.realityforge.org.jetbrains.annotations:org.jetbrains.annotations:1.7.0'
implementation 'org.apache.logging.log4j:log4j-core:2.23.1'
implementation 'org.apache.logging.log4j:log4j-api:2.23.1'
implementation 'org.apache.logging.log4j:log4j-slf4j2-impl:2.23.1'
implementation 'org.apache.commons:commons-lang3:3.17.0'
implementation 'com.google.guava:guava:33.3.0-jre'
implementation 'io.netty:netty-all:4.1.109.Final'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'org.slf4j:slf4j-api:2.0.16'
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
}
tasks.test {
useJUnitPlatform()
}
tasks.withType(PublishToMavenRepository) {
dependsOn assemble
}
publishing {
repositories {
maven {
name = "local"
url = layout.buildDirectory.dir("repo")
}
maven {
name = 'LTDNexus'
url = 'https://nexus.bot.leisuretimedock.top/repository/maven-releases/'
credentials {
username = System.getenv('LTDNexusUsername') ?: ''
password = System.getenv('LTDNexusPassword') ?: ''
}
}
}
}
}