-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
102 lines (89 loc) · 3.07 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
buildscript {
ext.kotlin_version = '1.3.61'
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
maven {
url "https://jcenter.bintray.com"
}
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-allopen:$kotlin_version"
classpath 'gradle.plugin.de.fuerstenau:BuildConfigPlugin:1.1.8'
classpath group: 'de.dynamicfiles.projects.gradle.plugins', name: 'javafx-gradle-plugin', version: '8.8.2'
}
}
apply plugin: 'kotlin'
apply plugin: 'java'
apply plugin: "kotlin-allopen"
apply plugin: 'idea'
apply plugin: 'de.fuerstenau.buildconfig'
apply plugin: 'javafx-gradle-plugin'
//apply plugin: 'application'
group 'ru.lionzxy.tplauncher'
version '1.0-SNAPSHOT'
version = "1.2." + getTime()
sourceCompatibility = 1.8
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
maven { url 'https://jcenter.bintray.com/' }
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
kotlinOptions {
jvmTarget = "1.8"
}
}
dependencies {
implementation 'com.google.code.gson:gson:2.8.5'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation 'com.github.LionZXY:mclauncher-api:37e0f29fc7'
implementation "no.tornado:tornadofx:1.7.20"
implementation 'de.codecentric.centerdevice:javafxsvg:1.3.0'
implementation 'com.github.LionZXY:oslib:d5ba9facde'
implementation "org.rauschig:jarchivelib:1.0.0"
implementation "net.minidev:json-smart:1.1.1"
implementation 'io.sentry:sentry:1.7.5'
implementation "commons-codec:commons-codec:1.12"
implementation 'org.zeroturnaround:zt-zip:1.14'
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.3")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-javafx:1.3.3")
//implementation 'org.bitbucket.shemnon.javafxplugin:gradle-javafx-plugin:8.1.1'
testCompile group: 'junit', name: 'junit', version: '4.12'
}
sourceSets {
main.kotlin.srcDirs += 'src/main/kotlin'
main.java.srcDirs += 'src/main/kotlin'
}
buildConfig {
appName = project.name
version = project.version
clsName = 'BuildConfig' // sets the name of the BuildConfig class
packageName = project.group // sets the package of the BuildConfig class,
// 'de.fuerstenau.buildconfig' if project.group is not set
charset = 'UTF-8' // sets charset of the generated class,
}
// Wait https://github.com/FibreFoX/javafx-gradle-plugin/issues/147
jfx {
mainClass 'ru.lionzxy.tplauncher.MainApplication'
}
task fatJar(type: Jar) {
manifest {
attributes 'Implementation-Title': 'launcher',
'Implementation-Version': version,
'Main-Class': 'ru.lionzxy.tplauncher.MainKt'
}
baseName = project.name
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
with jar
}
static def getTime() {
return new Date().format('MMddHHmm')
}