2018-02-10 16:54:43 +00:00
|
|
|
|
|
|
|
buildscript {
|
|
|
|
repositories {
|
|
|
|
jcenter()
|
|
|
|
maven { url = "http://files.minecraftforge.net/maven" }
|
|
|
|
mavenCentral()
|
|
|
|
}
|
|
|
|
dependencies {
|
|
|
|
classpath "net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-10 17:08:42 +00:00
|
|
|
plugins {
|
|
|
|
id "com.github.johnrengelman.shadow" version "1.2.4"
|
|
|
|
}
|
|
|
|
|
2018-02-10 16:54:43 +00:00
|
|
|
apply plugin: 'net.minecraftforge.gradle.forge'
|
|
|
|
|
2018-02-15 15:51:30 +00:00
|
|
|
version = project.mc_version + "-" + project.mod_version
|
2018-02-10 17:08:42 +00:00
|
|
|
|
2018-02-15 15:51:30 +00:00
|
|
|
archivesBaseName = project.mod_name
|
2018-02-10 17:08:42 +00:00
|
|
|
|
|
|
|
sourceCompatibility = targetCompatibility = '1.8'
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile project(':core')
|
2018-02-15 15:51:30 +00:00
|
|
|
compile group: "net.shadowfacts", name: "Forgelin", version: project.forgelin_version
|
2018-02-10 17:08:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
shadowJar {
|
|
|
|
classifier ''
|
|
|
|
|
|
|
|
relocate "org.apache.http", "matterlink.repack.org.apache.http"
|
|
|
|
relocate "org.apache.commons.logging", "matterlink.repack.org.apache.commons.logging"
|
|
|
|
dependencies {
|
|
|
|
include(project(":core"))
|
|
|
|
include(dependency("org.apache.httpcomponents:httpclient:4.3.3"))
|
|
|
|
include(dependency("org.apache.httpcomponents:httpcore:4.3.2"))
|
|
|
|
include(dependency('commons-logging:commons-logging:1.1.3'))
|
|
|
|
}
|
|
|
|
|
|
|
|
exclude 'dummyThing'
|
|
|
|
}
|
|
|
|
|
2018-02-10 16:54:43 +00:00
|
|
|
minecraft {
|
2018-02-15 15:51:30 +00:00
|
|
|
version = project.mc_version + "-" + project.forge_version
|
2018-02-10 18:05:10 +00:00
|
|
|
runDir = "run"
|
2018-02-10 16:54:43 +00:00
|
|
|
|
2018-02-15 15:51:30 +00:00
|
|
|
mappings = project.mcp_mappings
|
2018-02-10 16:54:43 +00:00
|
|
|
|
2018-02-15 21:10:38 +00:00
|
|
|
replaceIn 'Constants.kt'
|
2018-02-17 03:07:22 +00:00
|
|
|
replace '@MODVERSION@', project.mod_version
|
|
|
|
replace '@MCVERSION@', project.mc_version
|
2018-02-15 15:51:30 +00:00
|
|
|
replace '@FORGELIN-VERSION@', project.forgelin_version
|
|
|
|
replace '@FORGE-VERSION@', project.forge_version
|
2018-02-10 16:54:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
processResources {
|
|
|
|
// this will ensure that this task is redone when the versions change.
|
2018-02-15 21:10:38 +00:00
|
|
|
inputs.property "version", project.mod_version
|
2018-02-10 16:54:43 +00:00
|
|
|
inputs.property "mcversion", project.minecraft.version
|
|
|
|
|
|
|
|
// replace stuff in mcmod.info, nothing else
|
|
|
|
from(project(":core").sourceSets.main.resources.srcDirs) {
|
|
|
|
include 'mcmod.info'
|
|
|
|
|
|
|
|
// replace version and mcversion
|
2018-02-15 21:10:38 +00:00
|
|
|
expand 'version': project.mod_version, 'mcversion': project.minecraft.version
|
2018-02-10 16:54:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// copy everything else except the mcmod.info
|
|
|
|
from(project(":core").sourceSets.main.resources.srcDirs) {
|
|
|
|
exclude 'mcmod.info'
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2018-02-10 19:06:42 +00:00
|
|
|
sourceJar {
|
|
|
|
classifier 'sources'
|
|
|
|
// copy all the minecraftforge specific classes
|
|
|
|
from sourceSets.main.allSource
|
|
|
|
|
|
|
|
// copy everything else except the mcmod.info
|
|
|
|
from (project(":core").sourceSets.main.allSource) {
|
|
|
|
exclude 'mcmod.info'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-10 16:54:43 +00:00
|
|
|
reobf {
|
|
|
|
shadowJar { mappingType = 'SEARGE' }
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.reobfShadowJar.mustRunAfter shadowJar
|