2014-11-15 03:27:39 +08:00
|
|
|
buildscript {
|
|
|
|
repositories {
|
2018-11-18 15:47:43 +08:00
|
|
|
mavenLocal()
|
2014-11-15 03:27:39 +08:00
|
|
|
mavenCentral()
|
2018-12-15 20:13:13 +08:00
|
|
|
maven { url = "https://files.minecraftforge.net/maven" }
|
2014-11-15 03:27:39 +08:00
|
|
|
jcenter()
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
2018-11-18 15:47:43 +08:00
|
|
|
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true
|
2014-11-15 03:27:39 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-05-10 18:39:29 +08:00
|
|
|
apply plugin: 'eclipse'
|
2018-11-18 15:47:43 +08:00
|
|
|
apply plugin: 'net.minecraftforge.gradle'
|
2014-11-15 03:27:39 +08:00
|
|
|
|
2019-06-09 13:02:24 +08:00
|
|
|
def minecraftVersion = "1.14.2"
|
2019-06-23 03:42:20 +08:00
|
|
|
def forgeVersion = "26.0.48"
|
2018-11-18 15:47:43 +08:00
|
|
|
|
2019-04-05 07:16:04 +08:00
|
|
|
configurations.all { Configuration it ->
|
|
|
|
it.resolutionStrategy { ResolutionStrategy rs ->
|
|
|
|
rs.force("com.google.guava:guava:21.0")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-11-15 03:27:39 +08:00
|
|
|
dependencies {
|
|
|
|
compile project(':worldedit-core')
|
2019-05-06 13:06:20 +08:00
|
|
|
compile 'org.apache.logging.log4j:log4j-slf4j-impl:2.11.2'
|
2018-11-18 15:47:43 +08:00
|
|
|
|
2019-02-16 13:20:52 +08:00
|
|
|
minecraft "net.minecraftforge:forge:${minecraftVersion}-${forgeVersion}"
|
2018-11-18 15:47:43 +08:00
|
|
|
|
2016-02-23 09:54:50 +08:00
|
|
|
testCompile group: 'org.mockito', name: 'mockito-core', version: '1.9.0-rc1'
|
2014-11-15 03:27:39 +08:00
|
|
|
}
|
|
|
|
|
2017-08-17 07:07:18 +08:00
|
|
|
sourceCompatibility = 1.8
|
|
|
|
targetCompatibility = 1.8
|
|
|
|
|
2014-11-15 03:27:39 +08:00
|
|
|
minecraft {
|
2019-06-23 03:42:20 +08:00
|
|
|
mappings channel: 'snapshot', version: "20190621-${minecraftVersion}"
|
2018-12-26 20:46:18 +08:00
|
|
|
|
2019-01-28 13:54:27 +08:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-11-15 03:27:39 +08:00
|
|
|
}
|
|
|
|
|
2018-11-18 15:47:43 +08:00
|
|
|
project.archivesBaseName = "${project.archivesBaseName}-mc${minecraftVersion}"
|
2014-11-15 03:27:39 +08:00
|
|
|
|
|
|
|
processResources {
|
2018-12-15 20:13:13 +08:00
|
|
|
// this will ensure that this task is redone when the versions change.
|
2019-03-13 05:30:45 +08:00
|
|
|
inputs.property 'version', project.internalVersion
|
|
|
|
inputs.property 'forgeVersion', forgeVersion
|
2018-12-15 20:13:13 +08:00
|
|
|
|
|
|
|
// replace stuff in mcmod.info, nothing else
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
2019-03-13 05:30:45 +08:00
|
|
|
include 'META-INF/mods.toml'
|
2018-12-15 20:13:13 +08:00
|
|
|
|
|
|
|
// replace version and mcversion
|
2019-03-13 05:30:45 +08:00
|
|
|
expand 'version': project.internalVersion, 'forgeVersion': forgeVersion
|
2014-11-15 03:27:39 +08:00
|
|
|
}
|
|
|
|
|
2018-12-15 20:13:13 +08:00
|
|
|
// copy everything else except the mcmod.info
|
|
|
|
from(sourceSets.main.resources.srcDirs) {
|
2019-03-13 05:30:45 +08:00
|
|
|
exclude 'META-INF/mods.toml'
|
2014-11-15 03:27:39 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes("Class-Path": "truezip.jar WorldEdit/truezip.jar js.jar WorldEdit/js.jar",
|
2019-06-09 13:02:24 +08:00
|
|
|
"WorldEdit-Version": version)
|
2014-11-15 03:27:39 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
shadowJar {
|
|
|
|
dependencies {
|
2019-03-14 11:15:01 +08: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"))
|
2014-11-15 03:27:39 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-28 13:54:27 +08:00
|
|
|
afterEvaluate {
|
|
|
|
reobf {
|
|
|
|
shadowJar {
|
|
|
|
mappings = createMcpToSrg.output
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-11-15 03:27:39 +08:00
|
|
|
|
|
|
|
task deobfJar(type: Jar) {
|
|
|
|
from sourceSets.main.output
|
|
|
|
classifier = 'dev'
|
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
|
|
|
archives deobfJar
|
|
|
|
}
|