forked from dm94/DmPlugin
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.gradle.kts
69 lines (56 loc) · 1.45 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
plugins {
id("org.gradle.java-library")
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath("com.guardsquare", "proguard-gradle", "7.2.2")
}
}
repositories {
mavenLocal()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
allprojects {
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
group = "com.deeme"
version = "2.2.0"
description = "DmPlugin"
dependencies {
api("eu.darkbot.DarkBotAPI", "darkbot-impl", "0.9.5")
api("eu.darkbot", "DarkBot", "97430f3417")
implementation(files("private.jar"))
}
tasks.register<proguard.gradle.ProGuardTask>("proguard") {
dependsOn("uberJar")
configuration("proguard.conf")
dontnote()
dontwarn()
injars("./build/libs/DmPlugin-2.2.0.jar")
outjars("DmPlugin.jar")
}
tasks.register<Jar>("uberJar") {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
archiveFileName.set("DmPlugin.jar")
from(sourceSets.main.get().output)
dependsOn(configurations.runtimeClasspath)
from({
configurations.runtimeClasspath.get().filter { it.name.equals("private.jar") }.map { zipTree(it) }
})
}
tasks.register<Copy>("copyFile") {
dependsOn("uberJar")
from(layout.buildDirectory.file("DmPlugin.jar"))
into("DmPlugin.jar")
}
tasks.register<Exec>("signFile") {
dependsOn("copyFile")
commandLine("cmd", "/c", "sign.bat")
}