This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
forked from rospino74/BanList
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
83 lines (69 loc) · 2.4 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
/*
* Copyright (c) 2021 Build The Earth Italia
* This file (build.gradle.kts) and its related project (DataList) are governed by the Apache 2.0 license.
* You may not use them except in compliance with the License which can be found at:
* http://www.apache.org/licenses/LICENSE-2.0
*/
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.time.Year
plugins {
kotlin("jvm") version "1.3.72"
id("com.github.johnrengelman.shadow") version "7.0.0"
java
}
group = "it.bteitalia.datalist"
version = "1.1"
val mainClassName = "$group.DataList"
repositories {
mavenCentral()
maven { url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") }
maven { url = uri("https://papermc.io/repo/repository/maven-public/") }
maven { url = uri("https://oss.sonatype.org/content/repositories/snapshots") }
maven { url = uri("https://ci.ender.zone/plugin/repository/everything/") }
maven { url = uri("https://jitpack.io") }
maven { url = uri("https://plugins.gradle.org/m2/") }
}
dependencies {
//plugin dependencies
compileOnly("org.spigotmc:spigot-api:1.12.2-R0.1-SNAPSHOT")
compileOnly("net.ess3:EssentialsX:2.17.2")
compileOnly("com.github.MilkBowl:VaultAPI:1.7")
//kotlin library
implementation(kotlin("stdlib-jdk8"))
}
java.targetCompatibility = JavaVersion.VERSION_1_8
java.sourceCompatibility = JavaVersion.VERSION_1_8
val compileKotlin: KotlinCompile by tasks
compileKotlin.kotlinOptions {
jvmTarget = "1.8"
}
tasks.named<ShadowJar>("shadowJar") {
// Rimuovo suffisso "all"
archiveClassifier.set("")
// Diminuisco la dimensione
minimize()
manifest {
attributes(
mapOf(
"Main-Class" to mainClassName,
"Implementation-Title" to project.name,
"Implementation-Version" to project.version
)
)
}
}
tasks.named<ProcessResources>("processResources") {
from ("src/${sourceSets.main.name}/resources" ) {
include("plugin.yml")
include("LICENSE.txt")
expand (
Pair("version", project.version),
Pair("main", mainClassName),
Pair("author", "MemoryOfLife"),
Pair("copyrighter", "Build The Earth Italia"),
Pair("year", Year.now())
)
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
}