dynmap-neoforge/build.gradle

69 lines
1.7 KiB
Groovy

plugins {
id 'eclipse'
id 'net.neoforged.gradle.userdev' version '7.1.20'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
group = 'us.dynmap'
version = '3.7-SNAPSHOT-Dev'
archivesBaseName = 'Dynmap-neoforge-1.21.1'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}
println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + ' Arch: ' + System.getProperty('os.arch'))
repositories {
mavenCentral()
maven { url 'https://maven.neoforged.net/releases' }
maven { url 'https://libraries.minecraft.net' }
// Local file dependencies
flatDir { dirs 'libs' }
}
minecraft {
accessTransformers {
file('src/main/resources/META-INF/accesstransformer.cfg')
}
}
dependencies {
implementation 'net.neoforged:neoforge:21.1.219'
// DynmapCore and DynmapCoreAPI as local jars (build these separately)
implementation fileTree(dir: 'libs', include: ['*.jar'])
}
processResources {
filesMatching('META-INF/neoforge.mods.toml') {
expand(
version: project.version,
mcversion: '1.21.1'
)
}
}
shadowJar {
configurations = [project.configurations.shadow]
mergeServiceFiles()
archiveBaseName = 'Dynmap'
archiveClassifier = 'neoforge-1.21.1'
}
tasks.jar {
manifest {
attributes([
'Specification-Title': 'dynmap',
'Specification-Vendor': 'mikeprimm',
'Specification-Version': '1',
'Implementation-Title': project.name,
'Implementation-Version': project.version,
'Implementation-Vendor': 'mikeprimm',
])
}
}
build.dependsOn(jar)