Created
March 3, 2019 13:06
-
-
Save zhourui123/99e2b90d629acbe6975617dc27a7d044 to your computer and use it in GitHub Desktop.
build file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' | |
} | |
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' | |
} | |
} | |
} | |
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/war/mods" | |
} | |
copy { | |
from 'build/libs' | |
into "C:/work/workspace/mfbl_web/WebContent/WEB-INF/lib" | |
} | |
} | |
} | |
shadowJar.finalizedBy(copyJar) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment