PlotSquared/Bukkit/build.gradle

98 lines
3.4 KiB
Groovy
Raw Normal View History

2019-08-08 01:16:44 +02:00
plugins {
id "com.github.johnrengelman.shadow"
}
2016-07-01 23:13:49 +02:00
repositories {
2019-08-08 01:16:44 +02:00
maven { url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url = "https://jitpack.io" }
maven { url = "https://repo.codemc.org/repository/maven-public" }
maven {
2019-08-08 01:16:44 +02:00
name = "papermc"
url = "https://papermc.io/repo/repository/maven-public/"
}
2016-11-21 04:24:27 +01:00
mavenLocal()
2016-07-01 23:13:49 +02:00
}
2019-08-05 19:33:27 +02:00
2016-02-23 05:11:28 +01:00
dependencies {
2019-08-08 01:16:44 +02:00
implementation(project(":Core"))
compile(project(":Core"))
compile("com.destroystokyo.paper:paper-api:1.15.2-R0.1-SNAPSHOT")
//implementation 'com.onarandombox.multiversecore:Multiverse-Core:3.0.0-SNAPSHOT'
2020-01-22 23:54:37 +01:00
implementation("org.spigotmc:spigot-api:1.15.2-R0.1-SNAPSHOT")
2019-12-27 17:33:52 +01:00
compile(group: "com.sk89q.worldedit", name: "worldedit-bukkit", version: "7.0.1")
2019-08-08 01:16:44 +02:00
compile("io.papermc:paperlib:1.0.2")
2019-09-04 03:04:51 +02:00
implementation("net.kyori:text-adapter-bukkit:3.0.3")
compile("com.github.MilkBowl:VaultAPI:1.7") {
2019-08-08 01:16:44 +02:00
exclude(module: "bukkit")
2016-11-21 04:24:27 +01:00
}
2016-02-23 05:11:28 +01:00
}
2018-11-15 00:06:20 +01:00
sourceCompatibility = 1.8
targetCompatibility = 1.8
processResources {
2019-08-06 21:05:04 +02:00
from("src/main/resources") {
2019-08-08 01:16:44 +02:00
include("plugin.yml")
expand(
2018-08-10 17:01:10 +02:00
name: project.parent.name,
version: project.parent.version
)
}
}
2019-10-30 15:05:52 +01:00
//noinspection GroovyAssignabilityCheck
jar.archiveFileName = "PlotSquared-BukkitAPI-${project.parent.version}.jar"
jar.destinationDirectory = file("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-BukkitAPI/" + project.parent.version)
task createPom {
doLast {
pom {
project {
groupId = "com.github.intellectualsites.plotsquared"
artifactId = "PlotSquared-BukkitAPI"
version = project.parent.version
}
}.writeTo("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-BukkitAPI/${project.parent.version}/PlotSquared-BukkitAPI-${project.parent.version}.pom")
pom {
project {
groupId = "com.github.intellectualsites.plotsquared"
artifactId = "PlotSquared-BukkitAPI"
version = "latest"
}
}.writeTo("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-BukkitAPI/latest/PlotSquared-BukkitAPI-latest.pom")
}
}
task copyFiles {
doLast {
copy {
from("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-BukkitAPI/${project.parent.version}/")
into("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-BukkitAPI/latest/")
include("PlotSquared-BukkitAPI*.jar")
rename("PlotSquared-BukkitAPI-${project.parent.version}.jar", "PlotSquared-BukkitAPI-latest.jar")
}
}
}
2016-07-01 23:13:49 +02:00
2016-02-23 05:11:28 +01:00
shadowJar {
dependencies {
2019-08-06 21:05:04 +02:00
include(dependency(":Core"))
2019-08-05 19:33:27 +02:00
include(dependency("io.papermc:paperlib:1.0.2"))
2019-08-08 01:16:44 +02:00
include(dependency("net.kyori:text-adapter-bukkit:3.0.3"))
2016-02-23 05:11:28 +01:00
}
2019-08-08 01:16:44 +02:00
relocate('net.kyori.text', 'com.github.intellectualsites.plotsquared.formatting.text')
relocate("io.papermc.lib", "com.github.intellectualsites.plotsquared.bukkit.paperlib")
2019-09-07 22:46:13 +02:00
archiveFileName = "${parent.name}-${project.name}-${parent.version}.jar"
destinationDirectory = file "../target"
}
2016-07-01 23:13:49 +02:00
shadowJar.doLast {
task ->
2018-08-10 17:01:10 +02:00
ant.checksum file: task.archivePath
2016-02-23 05:11:28 +01:00
}
build.dependsOn(shadowJar)
2019-10-30 15:05:52 +01:00
build.finalizedBy(copyFiles)
copyFiles.dependsOn(createPom)