-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
107 lines (92 loc) · 2.51 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
103
104
105
106
107
plugins {
id 'idea'
id 'maven-publish'
id 'java'
id 'java-library'
id 'application'
id 'org.openjfx.javafxplugin' version '0.0.10'
id 'org.beryx.jlink' version '2.24.0'
id "org.sonarqube" version "3.3"
}
repositories {
mavenCentral()
}
sonarqube {
properties {
property "sonar.projectKey", "lgs-games_eden"
property "sonar.organization", "lgs-games"
property "sonar.host.url", "https://sonarcloud.io"
}
}
dependencies {
implementation 'uk.co.bithatch:FX-BorderlessScene:5.0.4'
implementation 'org.jetbrains:annotations:21.0.1'
implementation 'org.commonmark:commonmark:0.18.0'
implementation 'org.commonmark:commonmark-ext-gfm-tables:0.18.0'
implementation 'io.socket:socket.io-client:2.0.1'
implementation 'org.junit.jupiter:junit-jupiter-api:5.7.2'
implementation 'org.junit.jupiter:junit-jupiter-engine:5.7.2'
}
javafx {
version = "16"
modules = [ 'javafx.controls', 'javafx.fxml', 'javafx.graphics', 'javafx.base', 'javafx.web' ]
}
/////////////////////////////////
/////////// VARIABLES ///////////
/////////////////////////////////
group = 'com.lgs'
version = '1.1.1'
description = 'Legendary Games Studio launcher'
application {
getMainModule().set('eden')
getMainClass().set("com.lgs.eden.Main")
}
/////////////////////////////
///////////// TASKS /////////////
/////////////////////////////////
// idea clean
idea {
module {
excludeDirs += [
file("gradle"), file("gradlew"), file("gradlew.bat"),
file(".github"), file("LICENSE"), file("pom.xml")
]
}
}
//noinspection GroovyAssignabilityCheck
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
options.encoding = "UTF-8"
sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(16)
}
}
// tests
test { useJUnitPlatform() }
// jre
jlink {
addOptions('--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages')
launcher {
name = 'eden'
}
imageDir.set(file("$buildDir/../eden/myjre"))
}
// jar
task makeJar(type: Jar) {
manifest {
attributes(
'Main-Class': 'com.lgs.eden.Main'
)
}
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
destinationDirectory.set(file("$buildDir/../eden/"))
with jar
}