-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle
More file actions
142 lines (123 loc) · 3.99 KB
/
Copy pathbuild.gradle
File metadata and controls
142 lines (123 loc) · 3.99 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
plugins {
id 'java-library'
id 'maven-publish'
}
group = 'io.github._3xhaust'
version = '0.2.0'
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
withSourcesJar()
withJavadocJar()
}
repositories {
mavenCentral()
}
dependencies {
api 'com.formdev:svgSalamander:1.1.4'
compileOnly 'org.projectlombok:lombok:1.18.38'
annotationProcessor 'org.projectlombok:lombok:1.18.38'
testImplementation platform('org.junit:junit-bom:5.10.0')
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testCompileOnly 'org.projectlombok:lombok:1.18.38'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.38'
// Optional dependency only used by examples/login
implementation 'org.postgresql:postgresql:42.7.4'
}
test {
useJUnitPlatform()
testLogging {
events "passed", "skipped", "failed"
}
// Avoid HeadlessException in CI by enabling headless mode
systemProperty 'java.awt.headless', 'true'
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
options.compilerArgs += ['-Xlint:all', '-Xlint:-serial', '-Xlint:-processing']
}
tasks.named('jar') {
manifest {
attributes(
'Implementation-Title': 'JavaUI',
'Implementation-Version': project.version,
'Implementation-Vendor': 'io.github._3xhaust',
'Built-By': System.getProperty('user.name'),
'Build-Jdk': System.getProperty('java.version')
)
}
}
javadoc {
options.encoding = 'UTF-8'
options.addBooleanOption('Xdoclint:none', true)
options.addStringOption('charset', 'UTF-8')
failOnError = false
}
publishing {
publications {
maven(MavenPublication) {
from components.java
pom {
name = 'JavaUI'
description = 'A declarative, Flutter-inspired UI framework for Java desktop apps (Swing-backed).'
url = 'https://github.com/3x-haust/javaUI'
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = '3x-haust'
name = '3x-haust'
}
}
scm {
connection = 'scm:git:https://github.com/3x-haust/javaUI.git'
developerConnection = 'scm:git:ssh://github.com/3x-haust/javaUI.git'
url = 'https://github.com/3x-haust/javaUI'
}
}
}
}
}
tasks.register('runHello', JavaExec) {
group = 'application'
description = 'Run the hello_world example'
classpath = sourceSets.main.runtimeClasspath
mainClass = 'examples.hello_world.Main'
}
tasks.register('runCounter', JavaExec) {
group = 'application'
description = 'Run the counter example (auto re-render demo)'
classpath = sourceSets.main.runtimeClasspath
mainClass = 'examples.counter.Main'
}
tasks.register('runTodo', JavaExec) {
group = 'application'
description = 'Run the todo example'
classpath = sourceSets.main.runtimeClasspath
mainClass = 'examples.todo.Main'
}
tasks.register('runGallery', JavaExec) {
group = 'application'
description = 'Run the widget gallery example'
classpath = sourceSets.main.runtimeClasspath
mainClass = 'examples.gallery.Main'
}
tasks.register('runSettings', JavaExec) {
group = 'application'
description = 'Run the settings (theme switching) example'
classpath = sourceSets.main.runtimeClasspath
mainClass = 'examples.settings.Main'
}
tasks.register('runLogin', JavaExec) {
group = 'application'
description = 'Run the login example (PostgreSQL-backed)'
classpath = sourceSets.main.runtimeClasspath
mainClass = 'examples.login.Main'
environment System.getenv()
}