-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
91 lines (76 loc) · 2.46 KB
/
build.gradle.kts
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
79
80
81
82
83
84
85
86
87
88
89
90
91
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
plugins {
id("java-library")
id("maven-publish")
id("checkstyle")
}
group = "de.varoplugin"
version = "1.0.0-ALPHA-18"
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
withSourcesJar()
withJavadocJar()
}
tasks.compileJava { options.encoding = "UTF-8" }
tasks.javadoc { options.encoding = "UTF-8" }
repositories {
mavenCentral()
maven("https://oss.sonatype.org/content/repositories/snapshots/")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
}
dependencies {
implementation("com.github.cryptomorin:XSeries:11.2.1")
implementation("org.spigotmc:spigot-api:1.20.2-R0.1-SNAPSHOT")
compileOnly("com.googlecode.json-simple:json-simple:1.1.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.10.0")
testImplementation("org.junit.jupiter:junit-jupiter-engine:5.10.0")
}
tasks.jar {
if (project.hasProperty("destinationDir"))
destinationDirectory.set(file(project.property("destinationDir").toString()))
if (project.hasProperty("fileName"))
archiveFileName.set(project.property("fileName").toString())
}
tasks.test {
useJUnitPlatform()
testLogging {
exceptionFormat = TestExceptionFormat.FULL
showStandardStreams = true
outputs.upToDateWhen { false }
}
}
tasks.processResources {
outputs.upToDateWhen { false }
duplicatesStrategy = DuplicatesStrategy.INCLUDE
from(sourceSets.main.get().resources.srcDirs) {
include("**/plugin.yml")
expand("name" to project.name, "version" to project.version, "author" to "Cuuky")
}
}
checkstyle {
configDirectory.set(File("./checkstyle"))
toolVersion = "9.3"
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
name.set("CuukyFrameWork")
description.set("A powerful bukkit framework that runs on 1.7+ and makes coding with bukkit less painful")
url.set("https://github.com/CuukyOfficial/CFW")
}
artifactId = "cfw"
}
}
repositories {
maven {
setUrl("https://repo.varoplugin.de/repository/maven-releases/")
credentials {
username = System.getenv("REPO_USER")
password = System.getenv("REPO_PASSWORD")
}
}
}
}