Skip to content

Commit

Permalink
Further minor cleanup from Gradle 5 change
Browse files Browse the repository at this point in the history
  • Loading branch information
octylFractal committed Jul 12, 2019
1 parent 4874c31 commit 59c2a15
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 39 deletions.
29 changes: 6 additions & 23 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -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 """
Expand Down Expand Up @@ -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
}

Expand All @@ -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
}

Expand All @@ -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-", "")}"))
Expand Down
11 changes: 0 additions & 11 deletions settings.gradle

This file was deleted.

11 changes: 11 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -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")
2 changes: 1 addition & 1 deletion worldedit-forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ afterEvaluate {

task deobfJar(type: Jar) {
from sourceSets.main.output
classifier = 'dev'
getArchiveClassifier().set("dev")
}

artifacts {
Expand Down
7 changes: 3 additions & 4 deletions worldedit-libs/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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 = ""

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 59c2a15

Please sign in to comment.