From 5a14693aa95f24026a68e69350032f59f73008fd Mon Sep 17 00:00:00 2001 From: Kenzie Togami Date: Wed, 10 Jul 2019 17:59:23 -0700 Subject: [PATCH] Migrate Sponge, Libs to Kotlin DSL --- worldedit-forge/build.gradle.kts | 3 +- worldedit-libs/build.gradle | 3 -- worldedit-libs/build.gradle.kts | 3 ++ worldedit-sponge/build.gradle | 52 ------------------------------ worldedit-sponge/build.gradle.kts | 53 +++++++++++++++++++++++++++++++ 5 files changed, 57 insertions(+), 57 deletions(-) delete mode 100644 worldedit-libs/build.gradle create mode 100644 worldedit-libs/build.gradle.kts delete mode 100644 worldedit-sponge/build.gradle create mode 100644 worldedit-sponge/build.gradle.kts diff --git a/worldedit-forge/build.gradle.kts b/worldedit-forge/build.gradle.kts index 76abc2ac7..78c23c898 100644 --- a/worldedit-forge/build.gradle.kts +++ b/worldedit-forge/build.gradle.kts @@ -78,8 +78,7 @@ tasks.named("processResources") { tasks.named("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) } } diff --git a/worldedit-libs/build.gradle b/worldedit-libs/build.gradle deleted file mode 100644 index 29c096e2d..000000000 --- a/worldedit-libs/build.gradle +++ /dev/null @@ -1,3 +0,0 @@ -tasks.register("build") { - dependsOn(subprojects.collect { it.tasks.named("build") }) -} diff --git a/worldedit-libs/build.gradle.kts b/worldedit-libs/build.gradle.kts new file mode 100644 index 000000000..40b3746a9 --- /dev/null +++ b/worldedit-libs/build.gradle.kts @@ -0,0 +1,3 @@ +tasks.register("build") { + dependsOn(subprojects.map { it.tasks.named("build") }) +} diff --git a/worldedit-sponge/build.gradle b/worldedit-sponge/build.gradle deleted file mode 100644 index 81d445a5d..000000000 --- a/worldedit-sponge/build.gradle +++ /dev/null @@ -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') -} \ No newline at end of file diff --git a/worldedit-sponge/build.gradle.kts b/worldedit-sponge/build.gradle.kts new file mode 100644 index 000000000..1c5fa9453 --- /dev/null +++ b/worldedit-sponge/build.gradle.kts @@ -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") { + manifest { + attributes("Class-Path" to "truezip.jar WorldEdit/truezip.jar js.jar WorldEdit/js.jar", + "WorldEdit-Version" to project.version) + } +} + +tasks.named("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 { + sign("shadowJar") + } + + tasks.named("build").configure { + dependsOn("signShadowJar") + } +} \ No newline at end of file