This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
128 lines (101 loc) · 3.6 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.9.22"
id("org.sonarqube") version "4.0.0.2929"
id("com.github.johnrengelman.shadow") version "8.1.1"
java
`java-library`
jacoco
}
val pGroup = "us.teaminceptus.plasmaenchants"
val pVersion = "1.1.1"
val pAuthor = "Team-Inceptus"
val jvmVersion: JavaVersion = JavaVersion.VERSION_11
sonarqube {
properties {
property("sonar.projectKey", "${pAuthor}_PlasmaEnchants")
property("sonar.organization", "team-inceptus")
property("sonar.host.url", "https://sonarcloud.io")
}
}
allprojects {
apply<JavaPlugin>()
apply<JavaLibraryPlugin>()
apply(plugin = "org.jetbrains.kotlin.jvm")
group = pGroup
version = pVersion
description = "Advanced, Premium Custom Enchantments Plugin, written in Kotlin, and developed for Spigot 1.14+"
repositories {
mavenCentral()
mavenLocal()
maven("https://jitpack.io")
maven("https://plugins.gradle.org/m2/")
maven("https://oss.sonatype.org/content/repositories/snapshots")
maven("https://oss.sonatype.org/content/repositories/central")
maven("https://libraries.minecraft.net/")
maven("https://hub.spigotmc.org/nexus/content/repositories/snapshots/")
maven("https://hub.jeff-media.com/nexus/repository/jeff-media-public/")
}
}
subprojects {
apply<JacocoPlugin>()
apply(plugin = "org.sonarqube")
apply(plugin = "com.github.johnrengelman.shadow")
dependencies {
val kotlin = compileOnly("org.jetbrains.kotlin:kotlin-stdlib:1.9.22")
project.ext["kotlin_version"] = kotlin!!.version
compileOnly("org.jetbrains:annotations:24.1.0")
testImplementation("org.mockito:mockito-core:5.10.0")
testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
}
java {
sourceCompatibility = jvmVersion
targetCompatibility = jvmVersion
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = jvmVersion.toString()
}
jacocoTestReport {
dependsOn(test)
reports {
xml.required.set(false)
csv.required.set(false)
html.required.set(true)
html.outputLocation.set(layout.buildDirectory.dir("jacocoHtml"))
}
}
test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
finalizedBy(jacocoTestReport)
}
javadoc {
enabled = false
options.encoding = "UTF-8"
options.memberLevel = JavadocMemberLevel.PROTECTED
}
jar.configure {
dependsOn(shadowJar)
archiveClassifier.set("dev")
}
shadowJar {
manifest {
attributes["Implementation-Title"] = project.name
attributes["Implementation-Version"] = project.version
attributes["Implementation-Vendor"] = pAuthor
}
relocate("revxrsal.commands", "us.teaminceptus.plasmaenchants.shaded.lamp")
relocate("org.bstats", "us.teaminceptus.plasmaenchants.shaded.bstats")
relocate("com.jeff_media.updatechecker", "us.teaminceptus.plasmaenchants.shaded.updatechecker")
archiveFileName.set("${project.name}-${project.version}.jar")
archiveClassifier.set("")
}
}
artifacts {
add("default", tasks.getByName<ShadowJar>("shadowJar"))
}
}