98 lines
No EOL
3.4 KiB
Groovy
98 lines
No EOL
3.4 KiB
Groovy
plugins {
|
|
id 'com.github.ben-manes.versions'
|
|
id 'org.javamodularity.moduleplugin' version '1.8.3' apply false
|
|
id 'org.cadixdev.licenser'
|
|
}
|
|
apply plugin: 'java-library'
|
|
apply plugin: 'jacoco'
|
|
apply plugin: 'org.javamodularity.moduleplugin'
|
|
|
|
dependencyUpdates.rejectVersionIf { isNonStable(it.candidate.version) }
|
|
configurations.forEach{ it.transitive = false }
|
|
|
|
dependencies {
|
|
compileOnly("org.jetbrains:annotations:${JETBRAINS_ANNOTATIONS_VERSION}")
|
|
|
|
api("org.ow2.asm:asm:${ASM_VERSION}")
|
|
api("org.ow2.asm:asm-tree:${ASM_VERSION}")
|
|
api("org.ow2.asm:asm-commons:${ASM_VERSION}")
|
|
api("net.minecraftforge:forgespi:${SPI_VERSION}")
|
|
api("net.minecraftforge:mergetool:${MERGETOOL_VERSION}:api")
|
|
api("org.apache.logging.log4j:log4j-api:${LOG4J_VERSION}")
|
|
api("org.slf4j:slf4j-api:${SLF4J_API_VERSION}")
|
|
api("com.google.guava:guava:${GUAVA_VERSION}")
|
|
api("com.google.code.gson:gson:${GSON_VERSION}")
|
|
api("org.apache.maven:maven-artifact:${APACHE_MAVEN_ARTIFACT_VERSION}")
|
|
api("org.apache.commons:commons-lang3:${APACHE_COMMONS_LANG3_VERSION}")
|
|
api("com.electronwill.night-config:core:${NIGHTCONFIG_VERSION}")
|
|
api("com.electronwill.night-config:toml:${NIGHTCONFIG_VERSION}")
|
|
api("cpw.mods:modlauncher:${MODLAUNCHER_VERSION}")
|
|
api("net.minecraftforge:coremods:${COREMODS_VERSION}")
|
|
api("com.mojang:logging:${MOJANG_LOGGING_VERSION}")
|
|
api "net.minecraftforge:JarJarSelector:${JARJAR_VERSION}"
|
|
api "net.minecraftforge:JarJarMetadata:${JARJAR_VERSION}"
|
|
|
|
implementation("net.sf.jopt-simple:jopt-simple:${JOPT_SIMPLE_VERSION}")
|
|
implementation("cpw.mods:securejarhandler:${SECUREJARHANDLER_VERSION}")
|
|
implementation("net.minecraftforge:accesstransformers:${ACCESSTRANSFORMERS_VERSION}")
|
|
implementation("net.minecrell:terminalconsoleappender:${TERMINALCONSOLEAPPENDER_VERSION}")
|
|
// implementation("org.jline:jline:${JLINE_VERSION}")
|
|
|
|
implementation("org.apache.logging.log4j:log4j-core:${LOG4J_VERSION}")
|
|
annotationProcessor("org.apache.logging.log4j:log4j-core:${LOG4J_VERSION}")
|
|
|
|
testCompileOnly("org.jetbrains:annotations:${JETBRAINS_ANNOTATIONS_VERSION}")
|
|
testRuntimeOnly("cpw.mods:bootstraplauncher:${BOOTSTRAPLAUNCHER_VERSION}")
|
|
}
|
|
|
|
task sourcesJar(type: Jar) {
|
|
archiveClassifier = 'sources'
|
|
from sourceSets.main.allSource
|
|
}
|
|
|
|
ext {
|
|
MANIFESTS = [
|
|
'/': [
|
|
'Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
|
|
'Git-Commit': GIT_INFO.abbreviatedId,
|
|
'Git-Branch': GIT_INFO.branch,
|
|
'Build-Number': "${System.getenv('BUILD_NUMBER')?:0}",
|
|
] as LinkedHashMap,
|
|
'net/minecraftforge/fml/loading/': [
|
|
'Specification-Title': 'FMLLoader',
|
|
'Specification-Vendor': 'Forge Development LLC',
|
|
'Specification-Version': '1',
|
|
'Implementation-Title': 'FML Loader',
|
|
'Implementation-Version': '1.0',
|
|
'Implementation-Vendor': 'Forge'
|
|
] as LinkedHashMap
|
|
]
|
|
}
|
|
|
|
jar.doFirst {
|
|
manifest.attributes['Automatic-Module-Name'] = project.name
|
|
MANIFESTS.each { pkg, values ->
|
|
manifest.attributes(values, pkg)
|
|
}
|
|
}
|
|
|
|
tasks.withType(JavaCompile) {
|
|
options.compilerArgs << '-Xlint:unchecked'
|
|
}
|
|
|
|
license {
|
|
header = rootProject.file('LICENSE-header.txt')
|
|
|
|
ext {
|
|
year = new Date().format("yyyy")
|
|
}
|
|
|
|
exclude 'net/minecraftforge/'
|
|
|
|
exclude '**/log4j2.xml'
|
|
}
|
|
|
|
artifacts {
|
|
archives jar
|
|
archives sourcesJar
|
|
} |