FastAsyncWorldEdit/worldedit-forge/build.gradle

107 Zeilen
3.0 KiB
Groovy

2019-07-11 01:33:21 +02:00
PlatformConfigKt.applyPlatformAndCoreConfiguration(project)
PlatformConfigKt.applyShadowConfiguration(project)
apply plugin: 'eclipse'
2018-11-18 08:47:43 +01:00
apply plugin: 'net.minecraftforge.gradle'
2019-06-27 04:44:42 +02:00
def minecraftVersion = "1.14.3"
def forgeVersion = "27.0.13"
2018-11-18 08:47:43 +01:00
2019-04-05 01:16:04 +02:00
configurations.all { Configuration it ->
it.resolutionStrategy { ResolutionStrategy rs ->
rs.force("com.google.guava:guava:21.0")
}
}
dependencies {
compile project(':worldedit-core')
compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.11.2'
2018-11-18 08:47:43 +01:00
2019-02-16 06:20:52 +01:00
minecraft "net.minecraftforge:forge:${minecraftVersion}-${forgeVersion}"
2018-11-18 08:47:43 +01:00
testCompile group: 'org.mockito', name: 'mockito-core', version: '1.9.0-rc1'
}
2017-08-17 01:07:18 +02:00
sourceCompatibility = 1.8
targetCompatibility = 1.8
minecraft {
2019-06-27 04:44:42 +02:00
mappings channel: 'snapshot', version: "20190626-${minecraftVersion}"
runs {
client = {
// recommended logging data for a userdev environment
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
// recommended logging level for the console
properties 'forge.logging.console.level': 'debug'
workingDirectory project.file('run').canonicalPath
source sourceSets.main
}
server = {
// recommended logging data for a userdev environment
properties 'forge.logging.markers': 'SCAN,REGISTRIES,REGISTRYDUMP'
// recommended logging level for the console
properties 'forge.logging.console.level': 'debug'
workingDirectory project.file('run').canonicalPath
source sourceSets.main
}
}
}
2018-11-18 08:47:43 +01:00
project.archivesBaseName = "${project.archivesBaseName}-mc${minecraftVersion}"
processResources {
2018-12-15 13:13:13 +01:00
// this will ensure that this task is redone when the versions change.
inputs.property 'version', project.internalVersion
inputs.property 'forgeVersion', forgeVersion
2018-12-15 13:13:13 +01:00
// replace stuff in mcmod.info, nothing else
from(sourceSets.main.resources.srcDirs) {
include 'META-INF/mods.toml'
2018-12-15 13:13:13 +01:00
// replace version and mcversion
expand 'version': project.internalVersion, 'forgeVersion': forgeVersion
}
2018-12-15 13:13:13 +01:00
// copy everything else except the mcmod.info
from(sourceSets.main.resources.srcDirs) {
exclude 'META-INF/mods.toml'
}
}
jar {
manifest {
attributes("WorldEdit-Version": version)
}
}
shadowJar {
dependencies {
2019-03-14 04:15:01 +01:00
relocate "org.slf4j", "com.sk89q.worldedit.slf4j"
relocate "org.apache.logging.slf4j", "com.sk89q.worldedit.log4jbridge"
include(dependency('org.slf4j:slf4j-api'))
include(dependency("org.apache.logging.log4j:log4j-slf4j-impl"))
include(dependency("de.schlichtherle:truezip"))
include(dependency("org.mozilla:rhino"))
}
}
afterEvaluate {
reobf {
shadowJar {
mappings = createMcpToSrg.output
}
}
}
task deobfJar(type: Jar) {
from sourceSets.main.output
getArchiveClassifier().set("dev")
}
artifacts {
archives deobfJar
}