Skip to content

Commit adcce97

Browse files
committed
Update gradle, switch to kotlin-gradle and tidy up build-script
1 parent 66ed276 commit adcce97

File tree

4 files changed

+81
-28
lines changed

4 files changed

+81
-28
lines changed

LICENSE_HEADER

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* This file is part of BlueMap, licensed under the MIT License (MIT).
3+
*
4+
* Copyright (c) Blue (Lukas Rieger) <https://bluecolored.de>
5+
* Copyright (c) contributors
6+
*
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in
15+
* all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
* THE SOFTWARE.
24+
*/

build.gradle

Lines changed: 0 additions & 27 deletions
This file was deleted.

build.gradle.kts

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
plugins {
2+
java
3+
`java-library`
4+
id("com.diffplug.spotless") version "6.1.2"
5+
}
6+
7+
group = "de.bluecolored.bluemap.api"
8+
9+
val apiVersion: String by project
10+
version = apiVersion
11+
12+
val javaTarget = 8
13+
java {
14+
sourceCompatibility = JavaVersion.toVersion(javaTarget)
15+
targetCompatibility = JavaVersion.toVersion(javaTarget)
16+
}
17+
18+
repositories {
19+
mavenCentral()
20+
}
21+
22+
dependencies {
23+
api ("com.flowpowered:flow-math:1.0.3")
24+
}
25+
26+
spotless {
27+
java {
28+
target ("src/*/java/**/*.java")
29+
30+
licenseHeaderFile("LICENSE_HEADER")
31+
indentWithSpaces()
32+
trimTrailingWhitespace()
33+
}
34+
}
35+
36+
tasks.withType(JavaCompile::class).configureEach {
37+
options.apply {
38+
encoding = "utf-8"
39+
}
40+
}
41+
42+
tasks.withType(AbstractArchiveTask::class).configureEach {
43+
isReproducibleFileOrder = true
44+
isPreserveFileTimestamps = false
45+
}
46+
47+
tasks.javadoc {
48+
options {
49+
this as StandardJavadocDocletOptions
50+
51+
links(
52+
"https://docs.oracle.com/javase/8/docs/api/",
53+
"https://javadoc.io/doc/com.flowpowered/flow-math/1.0.3/"
54+
)
55+
}
56+
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)