This repository has been archived by the owner on Jun 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle
126 lines (106 loc) · 3.39 KB
/
build.gradle
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
plugins {
id 'java'
id 'eclipse'
id "org.jetbrains.gradle.plugin.idea-ext" version "1.0.1"
id 'com.github.johnrengelman.shadow' version '7.1.0'
id 'org.jetbrains.kotlin.jvm' version '1.7.10'
}
group = 'ir.syrent'
version = findProperty("version")
repositories {
mavenCentral()
mavenLocal()
maven {
name = 'papermc-repo'
url = 'https://repo.papermc.io/repository/maven-public/'
}
maven {
name = "sonatype-oss-snapshots1"
url = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
}
maven {
name = "placeholderapi"
url = 'https://repo.extendedclip.com/content/repositories/placeholderapi/'
}
maven {
url = uri("https://maven.pkg.github.com/mohamad82bz/ruom")
credentials {
username = project.findProperty("gpr.user")
password = project.findProperty("gpr.key")
}
}
}
dependencies {
implementation 'com.github.cryptomorin:XSeries:9.1.0'
implementation 'com.moandjiezana.toml:toml4j:0.7.2'
implementation 'me.mohamad82:ruom-velocity:4.2.9'
implementation 'me.mohamad82:ruom-core:4.1.0'
implementation 'commons-io:commons-io:2.6'
compileOnly 'io.papermc.paper:paper-api:1.19.2-R0.1-SNAPSHOT'
compileOnly 'com.velocitypowered:velocity-api:3.1.1'
compileOnly 'me.clip:placeholderapi:2.11.2'
compileOnly 'net.dv8tion:JDA:5.0.0-alpha.18'
compileOnly 'org.xerial:sqlite-jdbc:3.39.3.0'
compileOnly files('libs/DBConnector-Velocity-1.0-all.jar')
annotationProcessor 'com.velocitypowered:velocity-api:3.1.1'
}
processResources {
def props = [version: version]
inputs.properties props
filteringCharset 'UTF-8'
filesMatching('plugin.yml') {
expand props
}
}
shadowJar {
relocate('me.mohamad82.ruom', 'me.sayandevelopment.velocityonlinetime.ruom')
archiveFileName = findProperty("plugin-name") + " v" + findProperty("version") + ".jar"
}
jar {
archiveFileName = findProperty("plugin-name") + " v" + findProperty("version") + " " + "unshaded" + ".jar"
}
def targetJavaVersion = 17
java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
sourceCompatibility = javaVersion
targetCompatibility = javaVersion
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
options.release = targetJavaVersion
}
}
tasks.withType(Jar) {
destinationDirectory = file("$rootDir/bin/")
}
clean.doLast {
file("${rootDir}/bin").deleteDir()
}
def templateSource = file('src/main/templates')
def templateDest = layout.buildDirectory.dir('generated/sources/templates')
def generateTemplates = tasks.register('generateTemplates', Copy) { task ->
def props = [
'version': project.version
]
task.inputs.properties props
task.from templateSource
task.into templateDest
task.expand props
}
sourceSets.main.java.srcDir(generateTemplates.map { it.outputs })
rootProject.idea.project.settings.taskTriggers.afterSync generateTemplates
project.eclipse.synchronizationTasks(generateTemplates)
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}