Skip to content
Permalink
Browse files

Migrate Sponge, Libs to Kotlin DSL

  • Loading branch information...
kenzierocks committed Jul 11, 2019
1 parent 0bd473d commit dd134d3193ac4de892e441e8eb7d2b391641814b
@@ -78,8 +78,7 @@ tasks.named<Copy>("processResources") {

tasks.named<Jar>("jar") {
manifest {
attributes("Class-Path" to "truezip.jar WorldEdit/truezip.jar js.jar WorldEdit/js.jar",
"WorldEdit-Version" to project.version)
attributes("WorldEdit-Version" to project.version)
}
}

This file was deleted.

@@ -0,0 +1,3 @@
tasks.register("build") {
dependsOn(subprojects.map { it.tasks.named("build") })
}

This file was deleted.

@@ -0,0 +1,53 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar

plugins {
id("org.spongepowered.plugin")
}

applyPlatformAndCoreConfiguration()
applyShadowConfiguration()

repositories {
maven { url = uri("https://repo.codemc.org/repository/maven-public") }
}

dependencies {
compile(project(":worldedit-core"))
compile(project(":worldedit-libs:sponge"))
compile("org.spongepowered:spongeapi:7.1.0")
compile("org.bstats:bstats-sponge:1.5")
testCompile("org.mockito:mockito-core:1.9.0-rc1")
}

sponge {
plugin {
id = "worldedit"
}
}

tasks.named<Jar>("jar") {
manifest {
attributes("Class-Path" to "truezip.jar WorldEdit/truezip.jar js.jar WorldEdit/js.jar",
"WorldEdit-Version" to project.version)
}
}

tasks.named<ShadowJar>("shadowJar") {
dependencies {
relocate ("org.bstats", "com.sk89q.worldedit.sponge.bstats") {
include(dependency("org.bstats:bstats-sponge:1.5"))
}
}
}

if (project.hasProperty("signing")) {
apply(plugin = "signing")

configure<SigningExtension> {
sign("shadowJar")
}

tasks.named("build").configure {
dependsOn("signShadowJar")
}
}

0 comments on commit dd134d3

Please sign in to comment.
You can’t perform that action at this time.