Migrate Sponge, Libs to Kotlin DSL

This commit is contained in:
Kenzie Togami 2019-07-10 17:59:23 -07:00
parent 3bdc1c1cf2
commit 5a14693aa9
No known key found for this signature in database
GPG Key ID: 5D200B325E157A81
5 changed files with 57 additions and 57 deletions

View File

@ -78,8 +78,7 @@ tasks.named<Copy>("processResources") {
tasks.named<Jar>("jar") { tasks.named<Jar>("jar") {
manifest { manifest {
attributes("Class-Path" to "truezip.jar WorldEdit/truezip.jar js.jar WorldEdit/js.jar", attributes("WorldEdit-Version" to project.version)
"WorldEdit-Version" to project.version)
} }
} }

View File

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

View File

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

View File

@ -1,52 +0,0 @@
plugins {
id("org.spongepowered.plugin")
}
PlatformConfigKt.applyPlatformAndCoreConfiguration(project)
PlatformConfigKt.applyShadowConfiguration(project)
repositories {
maven { url "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 group: 'org.mockito', name: 'mockito-core', version:'1.9.0-rc1'
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
sponge {
plugin {
id = 'worldedit'
}
}
jar {
manifest {
attributes("Class-Path": "truezip.jar WorldEdit/truezip.jar js.jar WorldEdit/js.jar",
"WorldEdit-Version": version)
}
}
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'
signing {
sign shadowJar
}
build.dependsOn('signShadowJar')
}

View File

@ -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")
}
}