-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.gradle
91 lines (77 loc) · 2.13 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
buildscript {
ext.kotlin_version = '1.4.0'
repositories {
mavenCentral()
jcenter()
google()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.guardsquare:proguard-gradle:7.0.0'
classpath 'com.github.jengelman.gradle.plugins:shadow:6.0.0'
}
}
apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'idea'
apply plugin: 'com.github.johnrengelman.shadow'
group 'cookiedragon'
version ''
jar {
manifest {
attributes (
"Main-Class": "dev.binclub.binscure.api.Binscure"
)
}
archiveName = "binscure.jar"
}
shadowJar() {
classifier = "shadow"
archiveName = "binscure-shadow.jar"
manifest {
attributes 'Main-Class': "dev.binclub.binscure.api.Binscure"
}
new File("build/libs/binscure-release.jar").delete()
}
task apiJar(type: Jar, dependsOn: shadowJar) {
from (zipTree(shadowJar.archivePath)) {
include "dev/binclub/binscure/api/**"
}
classifier = "api"
archiveName = "binscure-api.jar"
}
task proguard(type: proguard.gradle.ProGuardTask, dependsOn: shadowJar) {
configuration 'proguard/proguard.txt'
injars 'build/libs/binscure-shadow.jar'
outjars 'build/libs/binscure-release.jar'
}
//build.dependsOn.add("apiJar")
build.finalizedBy (apiJar)
sourceSets {
main {
java {
srcDirs = ['src/main/kotlin']
}
resources {
srcDirs = ['src/resources']
}
}
}
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile 'org.ow2.asm:asm:7.1'
compile 'org.ow2.asm:asm-tree:7.1'
compile 'org.ow2.asm:asm-commons:7.1'
compile 'org.ow2.asm:asm-util:7.1'
compile 'com.sksamuel.hoplite:hoplite-core:1.1.4'
compile 'com.sksamuel.hoplite:hoplite-yaml:1.1.4'
}
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
kotlinOptions.noJdk = false
kotlinOptions.noReflect = true
kotlinOptions.noStdlib = true
}