-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
78 lines (65 loc) · 2.17 KB
/
build.gradle
File metadata and controls
78 lines (65 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
apply plugin: 'java-library'
apply plugin: 'checkstyle'
apply plugin: 'maven-publish'
group 'fr.fuluty.plugin.creative.bluemap'
version '1.0.32-SNAPSHOT'
compileJava.sourceCompatibility = JavaVersion.VERSION_11
compileJava.options.encoding = 'UTF-8'
libsDirName = "$rootProject.projectDir"
processResources {
inputs.property("version", project.version)
//noinspection UnnecessaryQualifiedReference
filter org.apache.tools.ant.filters.ReplaceTokens, tokens: [ 'VERSION': project.version ]
}
checkstyle {
configDirectory = rootProject.file('assets/checkstyle')
}
configurations {
shaded
compile.extendsFrom shaded
}
afterEvaluate {
jar {
dependsOn configurations.shaded
from configurations.shaded.collect { it.isDirectory() ? it : zipTree(it) }
}
}
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
repositories {
mavenLocal()
}
}
repositories {
maven { url 'https://hub.spigotmc.org/nexus/content/groups/public/' }
maven { url 'https://maven.enginehub.org/repo/' }
maven { url 'https://mvn.intellectualsites.com/content/groups/public/' }
maven { url 'https://jitpack.io' }
mavenCentral()
mavenLocal()
}
dependencies {
compileOnly 'org.jetbrains:annotations:20.1.0'
api 'com.intellectualsites.fawe:FAWE-Bukkit:1.16-725'
api 'com.plotsquared:PlotSquared-Core:5.13.3'
api 'com.github.BlueMap-Minecraft:BlueMapAPI:v1.5.0'
api 'org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT'
}
task incrementVersion {
doLast {
String[] versions = project.version.split( "-" )[ 0 ].split( "[.]" )
versions[ versions.length - 1 ] = Integer.parseInt( versions[ versions.length - 1 ] ) + 1
buildFile.setText( buildFile.getText().replaceFirst( "version '$version'" , "version '" + String.join( ".", versions ) + "-SNAPSHOT'" ) )
}
}
task removeLastJar {
doFirst {
String[] versions = project.version.split( "-" )[ 0 ].split( "[.]" )
versions[ versions.length - 1 ] = Integer.parseInt( versions[ versions.length - 1 ] ) - 1
delete project.name + "-" + String.join( ".", versions ) + "-SNAPSHOT.jar"
}
}