Build script updates.
Bump gradle. Copy a bunch from WE. Hopefully nothing breaks.
This commit is contained in:
parent
216b061172
commit
3549f04a33
|
@ -1,2 +1,34 @@
|
||||||
*.java diff=java
|
* text=auto eol=lf
|
||||||
|
# Force Batch files to CRLF
|
||||||
|
*.bat eol=crlf -text
|
||||||
|
|
||||||
|
# Java sources
|
||||||
|
*.java text diff=java
|
||||||
|
*.kt text diff=java
|
||||||
|
*.gradle text diff=java
|
||||||
|
*.gradle.kts text diff=java
|
||||||
|
|
||||||
|
# These files are text and should be normalized (Convert crlf => lf)
|
||||||
|
*.css text diff=css
|
||||||
|
*.df text
|
||||||
|
*.htm text diff=html
|
||||||
|
*.html text diff=html
|
||||||
|
*.js text
|
||||||
|
*.jsp text
|
||||||
|
*.jspf text
|
||||||
|
*.jspx text
|
||||||
|
*.properties text
|
||||||
|
*.tld text
|
||||||
|
*.tag text
|
||||||
|
*.tagx text
|
||||||
|
*.xml text
|
||||||
|
|
||||||
|
# These files are binary and should be left untouched
|
||||||
|
# (binary is a macro for -text -diff)
|
||||||
|
*.class binary
|
||||||
|
*.dll binary
|
||||||
|
*.ear binary
|
||||||
|
*.jar binary
|
||||||
|
*.so binary
|
||||||
|
*.war binary
|
||||||
|
*.jks binary
|
||||||
|
|
|
@ -11,7 +11,7 @@ repositories {
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(gradleApi())
|
implementation(gradleApi())
|
||||||
implementation("gradle.plugin.org.cadixdev.gradle:licenser:0.6.1")
|
implementation("gradle.plugin.org.cadixdev.gradle:licenser:0.6.1")
|
||||||
implementation("org.ajoberstar.grgit:grgit-gradle:4.1.0")
|
implementation("org.ajoberstar.grgit:grgit-gradle:4.1.1")
|
||||||
implementation("com.github.jengelman.gradle.plugins:shadow:6.1.0")
|
implementation("gradle.plugin.com.github.johnrengelman:shadow:7.1.2")
|
||||||
implementation("org.jfrog.buildinfo:build-info-extractor-gradle:4.21.0")
|
implementation("org.jfrog.buildinfo:build-info-extractor-gradle:4.27.1")
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ fun Project.applyCommonConfiguration() {
|
||||||
|
|
||||||
plugins.withId("java") {
|
plugins.withId("java") {
|
||||||
the<JavaPluginExtension>().toolchain {
|
the<JavaPluginExtension>().toolchain {
|
||||||
languageVersion.set(JavaLanguageVersion.of(16))
|
languageVersion.set(JavaLanguageVersion.of(17))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,86 @@
|
||||||
|
import org.gradle.api.Project
|
||||||
|
import org.gradle.api.plugins.JavaPluginExtension
|
||||||
|
import org.gradle.api.plugins.quality.CheckstyleExtension
|
||||||
|
import org.gradle.api.tasks.compile.JavaCompile
|
||||||
|
import org.gradle.api.tasks.javadoc.Javadoc
|
||||||
|
import org.gradle.api.tasks.testing.Test
|
||||||
|
import org.gradle.external.javadoc.StandardJavadocDocletOptions
|
||||||
|
import org.gradle.kotlin.dsl.apply
|
||||||
|
import org.gradle.kotlin.dsl.configure
|
||||||
|
import org.gradle.kotlin.dsl.dependencies
|
||||||
|
import org.gradle.kotlin.dsl.get
|
||||||
|
import org.gradle.kotlin.dsl.withType
|
||||||
|
|
||||||
|
fun Project.applyCommonJavaConfiguration(sourcesJar: Boolean, javaRelease: Int = 8, banSlf4j: Boolean = true) {
|
||||||
|
applyCommonConfiguration()
|
||||||
|
apply(plugin = "eclipse")
|
||||||
|
apply(plugin = "idea")
|
||||||
|
apply(plugin = "checkstyle")
|
||||||
|
|
||||||
|
tasks
|
||||||
|
.withType<JavaCompile>()
|
||||||
|
.matching { it.name == "compileJava" || it.name == "compileTestJava" }
|
||||||
|
.configureEach {
|
||||||
|
val disabledLint = listOf(
|
||||||
|
"processing", "path", "fallthrough", "serial"
|
||||||
|
)
|
||||||
|
options.release.set(javaRelease)
|
||||||
|
options.compilerArgs.addAll(listOf("-Xlint:all") + disabledLint.map { "-Xlint:-$it" })
|
||||||
|
options.isDeprecation = true
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
options.compilerArgs.add("-parameters")
|
||||||
|
}
|
||||||
|
|
||||||
|
configure<CheckstyleExtension> {
|
||||||
|
configFile = rootProject.file("config/checkstyle/checkstyle.xml")
|
||||||
|
toolVersion = "9.1"
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType<Test>().configureEach {
|
||||||
|
useJUnitPlatform()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
"compileOnly"("com.google.code.findbugs:jsr305:${Versions.FINDBUGS}")
|
||||||
|
"testImplementation"("org.junit.jupiter:junit-jupiter-api:${Versions.JUNIT}")
|
||||||
|
"testImplementation"("org.junit.jupiter:junit-jupiter-params:${Versions.JUNIT}")
|
||||||
|
"testImplementation"("org.mockito:mockito-core:${Versions.MOCKITO}")
|
||||||
|
"testImplementation"("org.mockito:mockito-junit-jupiter:${Versions.MOCKITO}")
|
||||||
|
"testRuntimeOnly"("org.junit.jupiter:junit-jupiter-engine:${Versions.JUNIT}")
|
||||||
|
}
|
||||||
|
|
||||||
|
// Java 8 turns on doclint which we fail
|
||||||
|
tasks.withType<Javadoc>().configureEach {
|
||||||
|
options.encoding = "UTF-8"
|
||||||
|
(options as StandardJavadocDocletOptions).apply {
|
||||||
|
addStringOption("Xdoclint:none", "-quiet")
|
||||||
|
tags(
|
||||||
|
"apiNote:a:API Note:",
|
||||||
|
"implSpec:a:Implementation Requirements:",
|
||||||
|
"implNote:a:Implementation Note:"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
configure<JavaPluginExtension> {
|
||||||
|
disableAutoTargetJvm()
|
||||||
|
withJavadocJar()
|
||||||
|
if (sourcesJar) {
|
||||||
|
withSourcesJar()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (banSlf4j) {
|
||||||
|
configurations["compileClasspath"].apply {
|
||||||
|
resolutionStrategy.componentSelection {
|
||||||
|
withModule("org.slf4j:slf4j-api") {
|
||||||
|
reject("No SLF4J allowed on compile classpath")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.named("check").configure {
|
||||||
|
dependsOn("checkstyleMain", "checkstyleTest")
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.api.plugins.ExtraPropertiesExtension
|
import org.gradle.api.plugins.ExtraPropertiesExtension
|
||||||
import org.gradle.api.plugins.JavaPluginConvention
|
import org.gradle.api.plugins.JavaPluginExtension
|
||||||
import org.gradle.api.tasks.SourceSetContainer
|
import org.gradle.api.tasks.SourceSetContainer
|
||||||
import org.gradle.kotlin.dsl.getByType
|
import org.gradle.kotlin.dsl.getByType
|
||||||
import org.gradle.kotlin.dsl.the
|
import org.gradle.kotlin.dsl.the
|
||||||
|
@ -9,4 +9,4 @@ val Project.ext: ExtraPropertiesExtension
|
||||||
get() = extensions.getByType()
|
get() = extensions.getByType()
|
||||||
|
|
||||||
val Project.sourceSets: SourceSetContainer
|
val Project.sourceSets: SourceSetContainer
|
||||||
get() = the<JavaPluginConvention>().sourceSets
|
get() = the<JavaPluginExtension>().sourceSets
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||||
import org.gradle.api.Plugin
|
import org.gradle.api.Plugin
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
|
import org.gradle.api.artifacts.ExternalModuleDependency
|
||||||
import org.gradle.api.artifacts.ModuleDependency
|
import org.gradle.api.artifacts.ModuleDependency
|
||||||
import org.gradle.api.attributes.Bundling
|
import org.gradle.api.attributes.Bundling
|
||||||
import org.gradle.api.attributes.Category
|
import org.gradle.api.attributes.Category
|
||||||
|
@ -52,22 +53,22 @@ fun Project.applyLibrariesConfiguration() {
|
||||||
}
|
}
|
||||||
val altConfigFiles = { artifactType: String ->
|
val altConfigFiles = { artifactType: String ->
|
||||||
val deps = configurations["shade"].incoming.dependencies
|
val deps = configurations["shade"].incoming.dependencies
|
||||||
.filterIsInstance<ModuleDependency>()
|
.filterIsInstance<ModuleDependency>()
|
||||||
.map { it.copy() }
|
.map { it.copy() }
|
||||||
.map { dependency ->
|
.map { dependency ->
|
||||||
dependency.artifact {
|
dependency.artifact {
|
||||||
name = dependency.name
|
name = dependency.name
|
||||||
type = artifactType
|
type = artifactType
|
||||||
extension = "jar"
|
extension = "jar"
|
||||||
classifier = artifactType
|
classifier = artifactType
|
||||||
}
|
|
||||||
dependency
|
|
||||||
}
|
}
|
||||||
|
dependency
|
||||||
|
}
|
||||||
|
|
||||||
files(configurations.detachedConfiguration(*deps.toTypedArray())
|
files(configurations.detachedConfiguration(*deps.toTypedArray())
|
||||||
.resolvedConfiguration.lenientConfiguration.artifacts
|
.resolvedConfiguration.lenientConfiguration.artifacts
|
||||||
.filter { it.classifier == artifactType }
|
.filter { it.classifier == artifactType }
|
||||||
.map { zipTree(it.file) })
|
.map { zipTree(it.file) })
|
||||||
}
|
}
|
||||||
tasks.register<Jar>("sourcesJar") {
|
tasks.register<Jar>("sourcesJar") {
|
||||||
from({
|
from({
|
||||||
|
@ -161,11 +162,26 @@ fun Project.applyLibrariesConfiguration() {
|
||||||
applyCommonArtifactoryConfig()
|
applyCommonArtifactoryConfig()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A horrible hack because `softwareComponentFactory` has to be gotten via plugin
|
||||||
|
// gradle why
|
||||||
internal open class LibsConfigPluginHack @Inject constructor(
|
internal open class LibsConfigPluginHack @Inject constructor(
|
||||||
private val softwareComponentFactory: SoftwareComponentFactory
|
private val softwareComponentFactory: SoftwareComponentFactory
|
||||||
) : Plugin<Project> {
|
) : Plugin<Project> {
|
||||||
override fun apply(project: Project) {
|
override fun apply(project: Project) {
|
||||||
val libsComponents = softwareComponentFactory.adhoc("libs")
|
val libsComponents = softwareComponentFactory.adhoc("libs")
|
||||||
project.components.add(libsComponents)
|
project.components.add(libsComponents)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun Project.constrainDependenciesToLibsCore() {
|
||||||
|
evaluationDependsOn(":worldguard-libs:core")
|
||||||
|
val coreDeps = project(":worldguard-libs:core").configurations["shade"].dependencies
|
||||||
|
.filterIsInstance<ExternalModuleDependency>()
|
||||||
|
dependencies.constraints {
|
||||||
|
for (coreDep in coreDeps) {
|
||||||
|
add("shade", "${coreDep.group}:${coreDep.name}:${coreDep.version}") {
|
||||||
|
because("libs should align with libs:core")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,78 +1,30 @@
|
||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
||||||
import org.gradle.api.Project
|
import org.gradle.api.Project
|
||||||
import org.gradle.api.component.AdhocComponentWithVariants
|
import org.gradle.api.component.AdhocComponentWithVariants
|
||||||
import org.gradle.api.plugins.JavaPluginExtension
|
|
||||||
import org.gradle.api.plugins.quality.CheckstyleExtension
|
|
||||||
import org.gradle.api.publish.PublishingExtension
|
import org.gradle.api.publish.PublishingExtension
|
||||||
import org.gradle.api.publish.maven.MavenPublication
|
import org.gradle.api.publish.maven.MavenPublication
|
||||||
import org.gradle.api.tasks.javadoc.Javadoc
|
|
||||||
import org.gradle.api.tasks.testing.Test
|
|
||||||
import org.gradle.external.javadoc.StandardJavadocDocletOptions
|
|
||||||
import org.gradle.kotlin.dsl.apply
|
import org.gradle.kotlin.dsl.apply
|
||||||
import org.gradle.kotlin.dsl.configure
|
import org.gradle.kotlin.dsl.configure
|
||||||
import org.gradle.kotlin.dsl.dependencies
|
|
||||||
import org.gradle.kotlin.dsl.get
|
import org.gradle.kotlin.dsl.get
|
||||||
import org.gradle.kotlin.dsl.named
|
import org.gradle.kotlin.dsl.named
|
||||||
import org.gradle.kotlin.dsl.register
|
import org.gradle.kotlin.dsl.register
|
||||||
import org.gradle.kotlin.dsl.withType
|
|
||||||
import org.gradle.kotlin.dsl.the
|
|
||||||
|
|
||||||
fun Project.applyPlatformAndCoreConfiguration() {
|
fun Project.applyPlatformAndCoreConfiguration(javaRelease: Int = 17) {
|
||||||
applyCommonConfiguration()
|
applyCommonConfiguration()
|
||||||
apply(plugin = "java")
|
apply(plugin = "java")
|
||||||
apply(plugin = "eclipse")
|
|
||||||
apply(plugin = "idea")
|
|
||||||
apply(plugin = "maven-publish")
|
apply(plugin = "maven-publish")
|
||||||
apply(plugin = "checkstyle")
|
|
||||||
apply(plugin = "com.jfrog.artifactory")
|
apply(plugin = "com.jfrog.artifactory")
|
||||||
|
applyCommonJavaConfiguration(
|
||||||
|
sourcesJar = true,
|
||||||
|
javaRelease = javaRelease,
|
||||||
|
banSlf4j = false
|
||||||
|
)
|
||||||
|
|
||||||
ext["internalVersion"] = "$version+${rootProject.ext["gitCommitHash"]}"
|
ext["internalVersion"] = "$version+${rootProject.ext["gitCommitHash"]}"
|
||||||
|
|
||||||
configure<CheckstyleExtension> {
|
|
||||||
configFile = rootProject.file("config/checkstyle/checkstyle.xml")
|
|
||||||
toolVersion = "8.34"
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.withType<Test>().configureEach {
|
|
||||||
useJUnitPlatform()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
"compileOnly"("com.google.code.findbugs:jsr305:3.0.2")
|
|
||||||
"testCompileOnly"("com.google.code.findbugs:jsr305:3.0.2")
|
|
||||||
"testImplementation"("org.junit.jupiter:junit-jupiter-api:${Versions.JUNIT}")
|
|
||||||
"testImplementation"("org.junit.jupiter:junit-jupiter-params:${Versions.JUNIT}")
|
|
||||||
"testImplementation"("org.mockito:mockito-core:${Versions.MOCKITO}")
|
|
||||||
"testImplementation"("org.mockito:mockito-junit-jupiter:${Versions.MOCKITO}")
|
|
||||||
"testRuntimeOnly"("org.junit.jupiter:junit-jupiter-engine:${Versions.JUNIT}")
|
|
||||||
}
|
|
||||||
|
|
||||||
// Java 8 turns on doclint which we fail
|
|
||||||
tasks.withType<Javadoc>().configureEach {
|
|
||||||
(options as StandardJavadocDocletOptions).apply {
|
|
||||||
addStringOption("Xdoclint:none", "-quiet")
|
|
||||||
tags(
|
|
||||||
"apiNote:a:API Note:",
|
|
||||||
"implSpec:a:Implementation Requirements:",
|
|
||||||
"implNote:a:Implementation Note:"
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
the<JavaPluginExtension>().withJavadocJar()
|
|
||||||
|
|
||||||
if (name == "worldguard-core" || name == "worldguard-bukkit") {
|
|
||||||
the<JavaPluginExtension>().withSourcesJar()
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks.named("check").configure {
|
|
||||||
dependsOn("checkstyleMain", "checkstyleTest")
|
|
||||||
}
|
|
||||||
|
|
||||||
configure<PublishingExtension> {
|
configure<PublishingExtension> {
|
||||||
publications {
|
publications {
|
||||||
register<MavenPublication>("maven") {
|
register<MavenPublication>("maven") {
|
||||||
from(components["java"])
|
|
||||||
versionMapping {
|
versionMapping {
|
||||||
usage("java-api") {
|
usage("java-api") {
|
||||||
fromResolutionOf("runtimeClasspath")
|
fromResolutionOf("runtimeClasspath")
|
||||||
|
@ -105,8 +57,10 @@ fun Project.applyShadowConfiguration() {
|
||||||
exclude("GradleStart**")
|
exclude("GradleStart**")
|
||||||
exclude(".cache")
|
exclude(".cache")
|
||||||
exclude("LICENSE*")
|
exclude("LICENSE*")
|
||||||
|
exclude("META-INF/maven/**")
|
||||||
}
|
}
|
||||||
val javaComponent = components["java"] as AdhocComponentWithVariants
|
val javaComponent = components["java"] as AdhocComponentWithVariants
|
||||||
|
// I don't think we want this published (it's the shadow jar)
|
||||||
javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) {
|
javaComponent.withVariantsFromConfiguration(configurations["shadowRuntimeElements"]) {
|
||||||
skip()
|
skip()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
object Versions {
|
object Versions {
|
||||||
// const val PISTON = "0.4.3"
|
const val WORLDEDIT = "7.2.9"
|
||||||
// const val AUTO_VALUE = "1.6.5"
|
const val PISTON = "0.5.7"
|
||||||
const val WORLDEDIT = "7.2.7"
|
const val AUTO_VALUE = "1.9"
|
||||||
const val JUNIT = "5.7.0"
|
const val JUNIT = "5.8.1"
|
||||||
|
const val MOCKITO = "4.3.1"
|
||||||
const val SQUIRRELID = "0.3.0"
|
const val SQUIRRELID = "0.3.0"
|
||||||
const val GUAVA = "31.0.1-jre"
|
const val GUAVA = "31.0.1-jre"
|
||||||
const val MOCKITO = "3.7.7"
|
const val FINDBUGS = "3.0.2"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
group=com.sk89q.worldguard
|
group=com.sk89q.worldguard
|
||||||
version=7.0.8-SNAPSHOT
|
version=7.1.0-SNAPSHOT
|
||||||
|
|
Binary file not shown.
|
@ -1,5 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
|
@ -1,89 +1,89 @@
|
||||||
@rem
|
@rem
|
||||||
@rem Copyright 2015 the original author or authors.
|
@rem Copyright 2015 the original author or authors.
|
||||||
@rem
|
@rem
|
||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
@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 not use this file except in compliance with the License.
|
||||||
@rem You may obtain a copy of the License at
|
@rem You may obtain a copy of the License at
|
||||||
@rem
|
@rem
|
||||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||||
@rem
|
@rem
|
||||||
@rem Unless required by applicable law or agreed to in writing, software
|
@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 distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%" == "" @echo off
|
@if "%DEBUG%" == "" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@rem
|
@rem
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|
||||||
@rem Set local scope for the variables with windows NT shell
|
@rem Set local scope for the variables with windows NT shell
|
||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%" == "" set DIRNAME=.
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@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="-Xmx64m" "-Xms64m"
|
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if "%ERRORLEVEL%" == "0" goto execute
|
if "%ERRORLEVEL%" == "0" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
echo.
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation.
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:findJavaFromJavaHome
|
:findJavaFromJavaHome
|
||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
if exist "%JAVA_EXE%" goto execute
|
||||||
|
|
||||||
echo.
|
echo.
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
echo.
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation.
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
exit /b 1
|
exit /b 1
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|
||||||
:omega
|
:omega
|
||||||
|
|
|
@ -8,10 +8,10 @@ dependencies {
|
||||||
"api"(project(":worldguard-libs:core"))
|
"api"(project(":worldguard-libs:core"))
|
||||||
"api"("com.sk89q.worldedit:worldedit-core:${Versions.WORLDEDIT}")
|
"api"("com.sk89q.worldedit:worldedit-core:${Versions.WORLDEDIT}")
|
||||||
"implementation"("org.flywaydb:flyway-core:3.0")
|
"implementation"("org.flywaydb:flyway-core:3.0")
|
||||||
"implementation"("org.yaml:snakeyaml:1.29")
|
"implementation"("org.yaml:snakeyaml:1.30")
|
||||||
"implementation"("com.google.guava:guava:${Versions.GUAVA}")
|
"implementation"("com.google.guava:guava:${Versions.GUAVA}")
|
||||||
|
|
||||||
"compileOnly"("com.google.code.findbugs:jsr305:1.3.9")
|
"compileOnly"("com.google.code.findbugs:jsr305:${Versions.FINDBUGS}")
|
||||||
"testImplementation"("org.hamcrest:hamcrest-library:1.2.1")
|
"testImplementation"("org.hamcrest:hamcrest-library:1.2.1")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
applyLibrariesConfiguration()
|
applyLibrariesConfiguration()
|
||||||
|
constrainDependenciesToLibsCore()
|
Loading…
Reference in New Issue