forked from Mwexim/skript-parser
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
82 lines (75 loc) · 2.69 KB
/
build.gradle.kts
File metadata and controls
82 lines (75 loc) · 2.69 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
79
80
81
plugins {
id("java")
id("maven-publish")
id("checkstyle")
}
group = "com.github.SkriptDev"
version = "1.0.14"
repositories {
mavenCentral()
}
dependencies {
implementation("org.jetbrains:annotations:15.0")
implementation("com.google.code.findbugs:jsr305:3.0.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.4.1")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.4.1")
implementation("com.google.code.gson:gson:2.13.2")
testImplementation("junit:junit:4.12")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.4.1")
}
tasks {
compileJava {
options.release = 25
options.compilerArgs.add("-Xlint:unchecked")
options.compilerArgs.add("-Xlint:deprecation")
}
register("sourcesJar", Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
// Publish this project to maven local, then run the server task on the other repo
register<Exec>("server") {
dependsOn("publishToMavenLocal")
workingDir = file("../HySkript")
commandLine("./gradlew", "server")
}
javadoc {
title = "Skript-Parser API - " + project.version
options.overview = "src/main/javadoc/overview.html"
options.encoding = Charsets.UTF_8.name()
exclude(
"com/github/skriptdev/skript/plugin/elements",
"com/github/skriptdev/skript/plugin/command"
)
(options as StandardJavadocDocletOptions).links(
"https://javadoc.io/doc/org.jetbrains/annotations/latest/",
"https://skriptdev.github.io/docs/skript-parser/latest/"
)
(options as StandardJavadocDocletOptions).tags = listOf(
"attr", // Example: replace "attr" with your unknown tag name
"todo:X" // Example of explicitly excluding the @todo tag
)
(options as StandardJavadocDocletOptions).addBooleanOption("Xdoclint:none", true)
}
java {
withSourcesJar()
}
checkstyle {
// Specify the version of the Checkstyle tool to use
toolVersion = "10.21.0" // Use a recent version of Checkstyle
isIgnoreFailures = false
// Point to your custom Checkstyle configuration file
// The default location is config/checkstyle/checkstyleMain.xml
configFile = file("${rootProject.projectDir}/config/checkstyle/checkstyle.xml")
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
group = "com.github.SkriptDev"
version = project.version as String
artifactId = "skript-parser"
}
}
}
}