2019-02-07 19:55:52 -08:00
|
|
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
|
|
|
2019-02-07 16:09:35 -08:00
|
|
|
buildscript {
|
2019-02-07 19:55:52 -08:00
|
|
|
repositories {
|
|
|
|
jcenter()
|
2019-02-07 16:09:35 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-02-07 19:55:52 -08:00
|
|
|
// Extras
|
|
|
|
var core by extra { project("core") }
|
|
|
|
// Bukkit/Spigot plugins
|
|
|
|
val bukkit by extra { project("bukkit") }
|
|
|
|
val bukkit_18 by extra { bukkit.project("1_8_8") }
|
|
|
|
val bukkit_112 by extra { bukkit.project("1_12") }
|
|
|
|
val bukkit_113 by extra { bukkit.project("1_13") }
|
|
|
|
|
|
|
|
// Sponge plugins
|
|
|
|
val sponge by extra { project("sponge") }
|
|
|
|
val sponge_7 by extra { sponge.project("api7") }
|
|
|
|
|
|
|
|
|
2019-02-07 16:09:35 -08:00
|
|
|
group = properties["pluginGroup"]!!
|
|
|
|
version = properties["pluginVersion"]!!
|
|
|
|
|
|
|
|
plugins {
|
|
|
|
`java-library`
|
|
|
|
java
|
2019-02-07 19:55:52 -08:00
|
|
|
id("com.github.johnrengelman.shadow") version "4.0.4"
|
2019-02-07 16:09:35 -08:00
|
|
|
}
|
|
|
|
|
2019-02-07 17:10:08 -08:00
|
|
|
// Set up defaults for all projects, maven repositories, java compatibility level and compiling encoding
|
2019-02-07 16:09:35 -08:00
|
|
|
allprojects {
|
|
|
|
apply(plugin="java-library")
|
2019-02-07 19:55:52 -08:00
|
|
|
apply(plugin="com.github.johnrengelman.shadow")
|
2019-02-07 16:09:35 -08:00
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
// World Edit
|
|
|
|
maven("https://maven.sk89q.com/repo")
|
|
|
|
// bStats
|
|
|
|
maven("https://repo.codemc.org/repository/maven-public")
|
|
|
|
}
|
2019-02-07 19:55:52 -08:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile("org.apache.tomcat", "tomcat-jdbc", "7.0.52") // tomcat JDBC
|
|
|
|
compile("org.apache.tomcat", "tomcat-juli", "7.0.52") // tomcat juli
|
|
|
|
testCompile("junit", "junit", "4.12")
|
|
|
|
}
|
2019-02-07 16:09:35 -08:00
|
|
|
java {
|
|
|
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
targetCompatibility = JavaVersion.VERSION_1_8
|
|
|
|
}
|
2019-02-07 17:10:08 -08:00
|
|
|
tasks.getting(JavaCompile::class) {
|
|
|
|
options.encoding = "UTF-8"
|
|
|
|
}
|
2019-02-07 19:55:52 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
val jar by tasks.getting(Jar::class) {
|
|
|
|
manifest {
|
|
|
|
attributes(mapOf(
|
|
|
|
"Implementation-Title" to "mcMMO",
|
|
|
|
"Implementation-Version" to rootProject.properties["pluginVersion"]!!,
|
|
|
|
"Main-Class" to "com.gmail.nossr50.mcMMO" // Main plugin class for bukkit
|
|
|
|
))
|
|
|
|
}
|
|
|
|
}
|
2019-02-07 17:10:08 -08:00
|
|
|
|
2019-02-07 19:55:52 -08:00
|
|
|
val shadowJar by tasks.getting(ShadowJar::class) {
|
|
|
|
dependencies {
|
|
|
|
include(project("core"))
|
|
|
|
include(dependency("org.bstats:bstats-bukkit:1.4"))
|
|
|
|
}
|
|
|
|
relocate("org.bstats", "com.gmail.nossr50.metrics.bstat")
|
2019-02-07 16:09:35 -08:00
|
|
|
}
|