-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
81 lines (66 loc) · 1.71 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
plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '8.1.1'
id 'com.github.gmazzo.buildconfig' version '5.3.5'
}
group = 'me.theentropyshard'
version = '0.7.3'
description = 'JsonViewer'
def theMainClass = 'me.theentropyshard.jsonviewer.Main'
def theVersion = project.version.toString()
def theName = project.name
repositories {
mavenCentral()
}
ext {
flatlaf = '3.4.1'
gson = '2.10.1'
rsyntaxtextarea = '3.4.0'
junit = '5.7.2'
}
dependencies {
implementation "com.formdev:flatlaf:$flatlaf"
implementation "com.google.code.gson:gson:$gson"
implementation "com.fifesoft:rsyntaxtextarea:$rsyntaxtextarea"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit"
testImplementation "org.junit.jupiter:junit-jupiter-engine:$junit"
}
test {
useJUnitPlatform()
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
application {
mainClass = theMainClass
}
jar {
manifest {
attributes(
'Main-Class': theMainClass,
'Implementation-Title': theName,
'Implementation-Version': theVersion,
'Implementation-Vendor': theName
)
}
}
shadowJar {
archiveClassifier = ''
archiveBaseName = theName
archiveVersion = theVersion
}
buildConfig {
packageName('me.theentropyshard.jsonviewer')
className('BuildConfig')
useJavaOutput()
buildConfigField(String, 'APP_NAME', theName)
buildConfigField(String, 'APP_VERSION', theVersion)
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc).configureEach {
options.encoding = 'UTF-8'
}