Created
March 25, 2019 03:42
-
-
Save zhourui123/79d7b50fd45f996a3a49f682952b4f46 to your computer and use it in GitHub Desktop.
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' | |
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