-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
58 lines (49 loc) · 1.25 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
buildscript {
ext {
kotlin_version = '2.1.10'
spigot_version = '1.18.2-R0.1-SNAPSHOT'
}
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
apply plugin: 'java'
apply plugin: 'kotlin'
group = 'click.seichi'
version = '2.0.0'
sourceCompatibility = '17'
targetCompatibility = '17'
configurations {
embed
compile.extendsFrom(embed)
}
repositories {
mavenCentral()
maven {
name = 'spigotmc-repo'
url = 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/'
}
maven {
name = 'sonatype'
url = 'https://oss.sonatype.org/content/groups/public/'
}
}
dependencies {
compileOnly "org.spigotmc:spigot-api:$spigot_version"
embed "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}
import org.apache.tools.ant.filters.ReplaceTokens
processResources {
filteringCharset = 'UTF-8'
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from(sourceSets.main.resources.srcDirs) {
filter ReplaceTokens, tokens: [version: version]
}
}
jar {
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
from configurations.embed.collect { it.isDirectory() ? it : zipTree(it) }
}