Update gradle, switch to kotlin-gradle and tidy up build-script
This commit is contained in:
parent
66ed276cc6
commit
adcce9769e
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* This file is part of BlueMap, licensed under the MIT License (MIT).
|
||||||
|
*
|
||||||
|
* Copyright (c) Blue (Lukas Rieger) <https://bluecolored.de>
|
||||||
|
* Copyright (c) contributors
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
|
* in the Software without restriction, including without limitation the rights
|
||||||
|
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
* copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
* THE SOFTWARE.
|
||||||
|
*/
|
27
build.gradle
27
build.gradle
|
@ -1,27 +0,0 @@
|
||||||
plugins {
|
|
||||||
id 'java'
|
|
||||||
id 'java-library'
|
|
||||||
}
|
|
||||||
|
|
||||||
repositories {
|
|
||||||
jcenter()
|
|
||||||
mavenCentral()
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
api 'com.flowpowered:flow-math:1.0.3'
|
|
||||||
}
|
|
||||||
|
|
||||||
apply plugin: 'java'
|
|
||||||
|
|
||||||
group = 'de.bluecolored.bluemap.api'
|
|
||||||
version = apiVersion
|
|
||||||
|
|
||||||
javadoc {
|
|
||||||
options {
|
|
||||||
links += [
|
|
||||||
'https://docs.oracle.com/javase/8/docs/api/',
|
|
||||||
'https://javadoc.io/doc/com.flowpowered/flow-math/1.0.3/'
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,56 @@
|
||||||
|
plugins {
|
||||||
|
java
|
||||||
|
`java-library`
|
||||||
|
id("com.diffplug.spotless") version "6.1.2"
|
||||||
|
}
|
||||||
|
|
||||||
|
group = "de.bluecolored.bluemap.api"
|
||||||
|
|
||||||
|
val apiVersion: String by project
|
||||||
|
version = apiVersion
|
||||||
|
|
||||||
|
val javaTarget = 8
|
||||||
|
java {
|
||||||
|
sourceCompatibility = JavaVersion.toVersion(javaTarget)
|
||||||
|
targetCompatibility = JavaVersion.toVersion(javaTarget)
|
||||||
|
}
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
api ("com.flowpowered:flow-math:1.0.3")
|
||||||
|
}
|
||||||
|
|
||||||
|
spotless {
|
||||||
|
java {
|
||||||
|
target ("src/*/java/**/*.java")
|
||||||
|
|
||||||
|
licenseHeaderFile("LICENSE_HEADER")
|
||||||
|
indentWithSpaces()
|
||||||
|
trimTrailingWhitespace()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(JavaCompile::class).configureEach {
|
||||||
|
options.apply {
|
||||||
|
encoding = "utf-8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(AbstractArchiveTask::class).configureEach {
|
||||||
|
isReproducibleFileOrder = true
|
||||||
|
isPreserveFileTimestamps = false
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.javadoc {
|
||||||
|
options {
|
||||||
|
this as StandardJavadocDocletOptions
|
||||||
|
|
||||||
|
links(
|
||||||
|
"https://docs.oracle.com/javase/8/docs/api/",
|
||||||
|
"https://javadoc.io/doc/com.flowpowered/flow-math/1.0.3/"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
|
@ -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.0.2-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
Loading…
Reference in New Issue