From 59c2a15cdae831c90aa311050705f0d377727a22 Mon Sep 17 00:00:00 2001 From: Kenzie Togami Date: Wed, 10 Jul 2019 11:07:00 -0700 Subject: [PATCH] Further minor cleanup from Gradle 5 change --- build.gradle | 29 ++++++----------------------- settings.gradle | 11 ----------- settings.gradle.kts | 11 +++++++++++ worldedit-forge/build.gradle | 2 +- worldedit-libs/build.gradle | 7 +++---- 5 files changed, 21 insertions(+), 39 deletions(-) delete mode 100644 settings.gradle create mode 100644 settings.gradle.kts diff --git a/build.gradle b/build.gradle index dddd5470e..c3e908d37 100644 --- a/build.gradle +++ b/build.gradle @@ -1,25 +1,8 @@ -buildscript { - repositories { - mavenCentral() - maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" } - jcenter() - } - - configurations.all { - resolutionStrategy { - force 'commons-io:commons-io:2.4' - } - } - - dependencies { - classpath 'com.github.jengelman.gradle.plugins:shadow:2.0.4' - classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:4.8.1' - } -} - plugins { id 'net.minecrell.licenser' version '0.4.1' apply false - id "org.ajoberstar.grgit" version "2.3.0" + id "org.ajoberstar.grgit" version "3.1.1" + id "com.github.johnrengelman.shadow" version "5.1.0" + id "com.jfrog.artifactory" version "4.9.7" } println """ @@ -109,7 +92,7 @@ configure(['core', 'bukkit', 'forge', 'sponge', 'fabric'].collect { project(":wo } task javadocJar(type: Jar, dependsOn: javadoc) { - classifier = 'javadoc' + getArchiveClassifier().set('javadoc') from javadoc.destinationDir } @@ -120,7 +103,7 @@ configure(['core', 'bukkit', 'forge', 'sponge', 'fabric'].collect { project(":wo if (name == "worldedit-core" || name == "worldedit-bukkit") { task sourcesJar(type: Jar, dependsOn: classes) { - classifier = 'sources' + getArchiveClassifier().set('sources') from sourceSets.main.allSource } @@ -146,7 +129,7 @@ configure(['core', 'bukkit', 'forge', 'sponge', 'fabric'].collect { project(":wo configure(['bukkit', 'forge', 'sponge', 'fabric'].collect { project(":worldedit-$it") }) { shadowJar { - classifier 'dist' + getArchiveClassifier().set('dist') dependencies { include(project(":worldedit-libs:core")) include(project(":worldedit-libs:${project.name.replace("worldedit-", "")}")) diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index a7c14e8ee..000000000 --- a/settings.gradle +++ /dev/null @@ -1,11 +0,0 @@ -rootProject.name = 'worldedit' - -include 'worldedit-libs' - -['bukkit', 'core', 'forge', 'sponge', 'fabric'].forEach { - include "worldedit-libs:$it" - include "worldedit-$it" -} -include "worldedit-libs:core:ap" - -include "worldedit-core:doctools" diff --git a/settings.gradle.kts b/settings.gradle.kts new file mode 100644 index 000000000..6da7bedcc --- /dev/null +++ b/settings.gradle.kts @@ -0,0 +1,11 @@ +rootProject.name = "worldedit" + +include("worldedit-libs") + +listOf("bukkit", "core", "forge", "sponge", "fabric").forEach { + include("worldedit-libs:$it") + include("worldedit-$it") +} +include("worldedit-libs:core:ap") + +include("worldedit-core:doctools") diff --git a/worldedit-forge/build.gradle b/worldedit-forge/build.gradle index 920903932..0c389e66f 100644 --- a/worldedit-forge/build.gradle +++ b/worldedit-forge/build.gradle @@ -108,7 +108,7 @@ afterEvaluate { task deobfJar(type: Jar) { from sourceSets.main.output - classifier = 'dev' + getArchiveClassifier().set("dev") } artifacts { diff --git a/worldedit-libs/build.gradle b/worldedit-libs/build.gradle index b31760f52..cc3c681a0 100644 --- a/worldedit-libs/build.gradle +++ b/worldedit-libs/build.gradle @@ -13,7 +13,7 @@ dependents of `-core` to compile and work with WorldEdit's API. */ configure(subprojects + project("core:ap")) { - apply plugin: 'java' + apply plugin: 'java-base' apply plugin: 'maven' apply plugin: 'com.github.johnrengelman.shadow' apply plugin: 'com.jfrog.artifactory' @@ -24,8 +24,7 @@ configure(subprojects + project("core:ap")) { group = rootProject.group + ".worldedit-libs" - tasks.replace("jar", ShadowJar) - tasks.withType(ShadowJar).named("jar").configure { + tasks.register("jar", ShadowJar) { configurations = [project.configurations.shade] classifier = "" @@ -79,7 +78,7 @@ configure(subprojects + project("core:ap")) { } } - tasks.withType(Upload).named("install").configure { + tasks.register("install", Upload) { configuration = configurations.archives repositories.mavenInstaller { pom.version = project.version