Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zhourui123/99e2b90d629acbe6975617dc27a7d044 to your computer and use it in GitHub Desktop.
Save zhourui123/99e2b90d629acbe6975617dc27a7d044 to your computer and use it in GitHub Desktop.
build file
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