Update gradle

This commit is contained in:
MattBDev 2019-08-07 19:16:44 -04:00
parent 289f01f7a2
commit 5ddbf3def4
7 changed files with 142 additions and 64 deletions

View file

@ -1,27 +1,30 @@
plugins {
id "com.github.johnrengelman.shadow"
}
repositories {
maven { url "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "http://nexus.hc.to/content/repositories/pub_releases" }
maven { url = "https://hub.spigotmc.org/nexus/content/repositories/snapshots/" }
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url = "http://nexus.hc.to/content/repositories/pub_releases" }
maven { url = "https://repo.codemc.org/repository/maven-public" }
maven {
name "papermc"
url "https://papermc.io/repo/repository/maven-public/"
name = "papermc"
url = "https://papermc.io/repo/repository/maven-public/"
}
mavenLocal()
}
apply plugin: "com.github.johnrengelman.shadow"
dependencies {
implementation project(":Core")
compile project(":Core")
compile "com.destroystokyo.paper:paper-api:1.14.4-R0.1-SNAPSHOT"
implementation(project(":Core"))
compile(project(":Core"))
compile("com.destroystokyo.paper:paper-api:1.14.4-R0.1-SNAPSHOT")
//implementation 'com.onarandombox.multiversecore:Multiverse-Core:3.0.0-SNAPSHOT'
implementation "org.spigotmc:spigot-api:1.14.4-R0.1-SNAPSHOT"
implementation("org.spigotmc:spigot-api:1.14.4-R0.1-SNAPSHOT")
compile(group: "com.sk89q.worldedit", name: "worldedit-bukkit", version: "7.0.0")
compile "io.papermc:paperlib:1.0.2"
compile("io.papermc:paperlib:1.0.2")
implementation ("net.kyori:text-adapter-bukkit:3.0.3")
compile("net.milkbowl.vault:VaultAPI:1.7") {
exclude module: "bukkit"
exclude(module: "bukkit")
}
}
@ -30,7 +33,7 @@ targetCompatibility = 1.8
processResources {
from("src/main/resources") {
include "plugin.yml"
include("plugin.yml")
expand(
name: project.parent.name,
version: project.parent.version
@ -50,8 +53,10 @@ shadowJar {
include(dependency("com.squareup.okio:okio:2.2.2"))
include(dependency("org.jetbrains.kotlin:kotlin-stdlib:1.3.30"))
include(dependency("io.papermc:paperlib:1.0.2"))
include(dependency("net.kyori:text-adapter-bukkit:3.0.3"))
}
relocate "io.papermc.lib", "com.github.intellectualsites.plotsquared.bukkit.paperlib"
relocate('net.kyori.text', 'com.github.intellectualsites.plotsquared.formatting.text')
relocate("io.papermc.lib", "com.github.intellectualsites.plotsquared.bukkit.paperlib")
// relocate('org.mcstats', 'com.plotsquared.stats')
archiveName = "${parent.name}-${project.name}-${parent.version}.jar"
destinationDir = file "../target"

View file

@ -1,21 +1,23 @@
repositories {
maven { url "https://jitpack.io" }
maven { url = "https://jitpack.io" }
}
def textVersion = "3.0.2"
dependencies {
implementation "org.yaml:snakeyaml:1.23"
//keep inline with Minecraft which uses gson 2.8.0
implementation "com.google.code.gson:gson:2.8.0"
implementation("org.projectlombok:lombok:1.18.6")
compileOnly("org.projectlombok:lombok:1.18.6")
testCompileOnly("org.projectlombok:lombok:1.18.6")
annotationProcessor("org.projectlombok:lombok:1.18.6")
testAnnotationProcessor("org.projectlombok:lombok:1.18.6")
implementation "net.kyori:text-adapter-bukkit:3.0.2"
implementation "com.github.Sauilitired:Jenkins4J:2.0-SNAPSHOT"
implementation "com.squareup.okhttp3:okhttp:3.14.0"
implementation "com.squareup.okio:okio:2.2.2"
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.3.30"
implementation("org.yaml:snakeyaml:1.23")
implementation ("com.google.code.gson:gson:2.8.0") {
because("Minecraft uses GSON 2.8.0")
force = true
}
implementation("org.projectlombok:lombok:1.18.8")
compileOnly("org.projectlombok:lombok:1.18.8")
testCompileOnly("org.projectlombok:lombok:1.18.8")
annotationProcessor("org.projectlombok:lombok:1.18.8")
testAnnotationProcessor("org.projectlombok:lombok:1.18.8")
implementation ("com.github.Sauilitired:Jenkins4J:2.0-SNAPSHOT")
implementation ("com.squareup.okhttp3:okhttp:3.14.0")
implementation ("com.squareup.okio:okio:2.2.2")
implementation ("org.jetbrains.kotlin:kotlin-stdlib:1.3.30")
}
sourceCompatibility = 1.8
@ -34,21 +36,21 @@ processResources {
}
jar.setArchiveName("PlotSquared-API-${project.parent.version}.jar")
jar.destinationDir = file "../mvn/com/github/intellectualsites/plotsquared/PlotSquared-API/" + project.parent.version
jar.destinationDir = file("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-API/" + project.parent.version)
task createPom {
doLast {
pom {
project {
groupId "com.github.intellectualsites.plotsquared"
artifactId "PlotSquared-API"
version project.parent.version
groupId = "com.github.intellectualsites.plotsquared"
artifactId = "PlotSquared-API"
version = project.parent.version
}
}.writeTo("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-API/${project.parent.version}/PlotSquared-API-${project.parent.version}.pom")
pom {
project {
groupId "com.github.intellectualsites.plotsquared"
artifactId "PlotSquared-API"
version "latest"
groupId = "com.github.intellectualsites.plotsquared"
artifactId = "PlotSquared-API"
version = "latest"
}
}.writeTo("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-API/latest/PlotSquared-API-latest.pom")
}
@ -57,13 +59,30 @@ task createPom {
task copyFiles {
doLast {
copy {
from "../mvn/com/github/intellectualsites/plotsquared/PlotSquared-API/${project.parent.version}/"
into "../mvn/com/github/intellectualsites/plotsquared/PlotSquared-API/latest/"
from("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-API/${project.parent.version}/")
into("../mvn/com/github/intellectualsites/plotsquared/PlotSquared-API/latest/")
include("*.jar")
rename("PlotSquared-API-${project.parent.version}.jar", "PlotSquared-API-latest.jar")
}
}
}
shadowJar {
dependencies {
include(dependency("net.kyori:text-api:3.0.2"))
include(dependency("net.kyori:text-serializer-gson:3.0.2"))
include(dependency("net.kyori:text-serializer-legacy:3.0.2"))
include(dependency("net.kyori:text-serializer-plain:3.0.2"))
}
relocate('net.kyori.text', 'com.github.intellectualsites.plotsquared.formatting.text')
}
shadowJar.doLast {
task ->
ant.checksum file: task.archivePath
}
build.dependsOn(shadowJar)
build.finalizedBy(copyFiles)
copyFiles.dependsOn(createPom)

View file

@ -7,11 +7,12 @@ buildscript {
jcenter()
}
dependencies {
classpath "com.github.jengelman.gradle.plugins:shadow:5.0.0"
classpath("com.github.jengelman.gradle.plugins:shadow:5.0.0")
}
configurations.all {
resolutionStrategy {
force "org.ow2.asm:asm:7.1"
force("org.ow2.asm:asm:7.1")
force("org.jetbrains:annotations:17.0.0")
}
}
}
@ -48,16 +49,16 @@ version = String.format("%s.%s", rootVersion, buildNumber)
description = rootProject.name
subprojects {
apply plugin: "java"
apply plugin: "maven"
apply plugin: "eclipse"
apply plugin: "idea"
apply plugin: "com.github.johnrengelman.shadow"
apply(plugin: "java")
apply(plugin: "maven")
apply(plugin: "eclipse")
apply(plugin: "idea")
apply(plugin: "com.github.johnrengelman.shadow")
group = "com.github.intellectualsites.plotsquared"
clean.doFirst {
delete "../target"
delete("../target")
}
dependencies {
@ -66,23 +67,45 @@ subprojects {
exclude(module: "mockito-core")
exclude(module: "dummypermscompat")
}
implementation "net.kyori:text-api:3.0.0"
//Minecraft uses Guava 21 as of 1.13.
compile "com.google.guava:guava:21.0"
compileOnly "org.jetbrains:annotations:17.0.0"
compile("org.projectlombok:lombok:1.18.6")
compileOnly("org.projectlombok:lombok:1.18.6")
testCompileOnly("org.projectlombok:lombok:1.18.6")
annotationProcessor("org.projectlombok:lombok:1.18.6")
testAnnotationProcessor("org.projectlombok:lombok:1.18.6")
testImplementation "junit:junit:4.12"
implementation ("net.kyori:text-api:3.0.2")
implementation ("net.kyori:text-serializer-gson:3.0.2")
implementation ("net.kyori:text-serializer-legacy:3.0.2")
implementation ("net.kyori:text-serializer-plain:3.0.2")
implementation("com.google.guava:guava:21.0") {
because("Minecraft uses Guava 21 as of 1.13")
}
compileOnly("org.jetbrains:annotations:17.0.0")
compileClasspath("org.projectlombok:lombok:1.18.8")
testCompileOnly("org.projectlombok:lombok:1.18.8")
annotationProcessor("org.projectlombok:lombok:1.18.8")
testAnnotationProcessor("org.projectlombok:lombok:1.18.8")
testImplementation("junit:junit:4.12")
}
configurations.all {
resolutionStrategy {
force("junit:junit:4.12")
force("com.google.guava:guava:21.0")
force("org.jetbrains:annotations:17.0.0")
force("com.google.code.findbugs:jsr305:3.0.2")
}
}
repositories {
mavenCentral()
maven { url "http://maven.sk89q.com/repo/" }
maven { url "http://repo.maven.apache.org/maven2" }
maven { url "https://jitpack.io" }
maven { url = "http://maven.sk89q.com/repo/" }
maven { url = "http://repo.maven.apache.org/maven2" }
maven { url = "https://jitpack.io" }
}
shadowJar {
dependencies {
include(dependency("net.kyori:text-api:3.0.2"))
}
relocate("io.papermc.lib", "com.github.intellectualsites.plotsquared.bukkit.paperlib")
// relocate('org.mcstats', 'com.plotsquared.stats')
archiveName = "${parent.name}-${project.name}-${parent.version}.jar"
destinationDir = file "../target"
}
}
@ -93,7 +116,7 @@ task aggregatedJavadocs(type: Javadoc, description: "Generate javadocs from all
options.links "http://docs.spring.io/spring/docs/4.3.x/javadoc-api/", "http://docs.oracle.com/javase/8/docs/api/", "http://docs.spring.io/spring-ws/docs/2.3.0.RELEASE/api/", "http://docs.spring.io/spring-security/site/docs/4.0.4.RELEASE/apidocs/"
options.addStringOption("Xdoclint:none", "-quiet")
delete "./docs"
delete("./docs")
subprojects.each { proj ->
proj.tasks.withType(Javadoc).each { javadocTask ->

Binary file not shown.

View file

@ -1,6 +1,5 @@
#Fri Dec 21 16:11:33 EST 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

18
gradlew vendored
View file

@ -1,5 +1,21 @@
#!/usr/bin/env sh
#
# Copyright 2015 the original author or authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
##
## Gradle start up script for UN*X
@ -28,7 +44,7 @@ APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

18
gradlew.bat vendored
View file

@ -1,3 +1,19 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@ -14,7 +30,7 @@ set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome