Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
buildscript {
repositories {
maven {
name = 'forge'
url = 'https://files.minecraftforge.net/maven'
}
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
}
}
plugins {
id 'org.spongepowered.plugin' version '0.9.0'
id 'com.github.johnrengelman.shadow' version '2.0.4'
}
apply plugin: 'java-library'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'net.minecraftforge.gradle.forge'
repositories {
jcenter()
maven {
url "https://jitpack.io"
}
}
minecraft {
// TODO: Configure Forge build here
forgeVersion = '1.12.2-14.23.5.2768'
//TODO: Replace with your mappings version, e.g. stable_39 or snapshot_20180814
// mappings = 'stable_39'
mappings = 'snapshot_20171003'
runDir="run"
}
group = 'halo.mfbl.common'
version = '1.0'
description = 'mfbl common plugin'
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
dependencies {
compile 'org.spongepowered:spongeapi:7.1.0'
compile group: 'org.mybatis', name: 'mybatis', version: '3.4.5'
compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.12'
testCompile 'junit:junit:4.11'
compile fileTree(dir: 'lib', include: ['*.jar'])
compile "com.github.pie-flavor:SpongyCord:1.1.0"
implementation 'com.github.randombyte-developer:holograms:v3.1.6'
compile group: 'commons-io', name: 'commons-io', version: '2.6'
}
shadowJar {
classifier = ""
relocate 'org.apache.ibatis', 'halo.mfbl.common.org.apache.ibatis'
dependencies {
include(dependency("org.mybatis:mybatis:3.4.5:withDependencies"))
include(dependency("mysql:mysql-connector-java:8.0.12:withDependencies"))
include(dependency("com.github.pie-flavor:SpongyCord:1.1.0:withDependencies"))
include(dependency("commons-io:commons-io:2.6:withDependencies"))
}
}
sponge {
plugin {
id = 'common'
meta {
name = 'common4mfbl'
version = '1.0.0'
description = 'common4mfbl'
}
}
}
reobf {
shadowJar{}
}
tasks.build.dependsOn reobfShadowJar
task copyJar {
doLast {
copy {
from 'build/libs'
into "C:/work/mc_test/lobby/mods"
}
copy {
from 'build/libs'
into "C:/work/mc_test/mini/mods"
}
copy {
from 'build/libs'
into "C:/work/mc_test/mini2/mods"
}
copy {
from 'build/libs'
into "C:/work/mc_test/mini3/mods"
}
copy {
from 'build/libs'
into "C:/work/mc_test/war/mods"
}
copy {
from 'build/libs'
into "C:/work/mc_test/survival_1/mods"
}
copy {
from 'build/libs'
into "C:/work/workspace/mfbl_web/WebContent/WEB-INF/lib"
}
}
}
build.finalizedBy(copyJar)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment