Skip to content

Commit a5a3e33

Browse files
v1.0.0
0 parents  commit a5a3e33

34 files changed

+1909
-0
lines changed

.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
.gradle
2+
build/
3+
!gradle/wrapper/gradle-wrapper.jar
4+
!**/src/main/**/build/
5+
!**/src/test/**/build/
6+
.kotlin
7+
8+
### IntelliJ IDEA ###
9+
.idea/modules.xml
10+
.idea/jarRepositories.xml
11+
.idea/compiler.xml
12+
.idea/libraries/
13+
*.iws
14+
*.iml
15+
*.ipr
16+
out/
17+
!**/src/main/**/out/
18+
!**/src/test/**/out/
19+
20+
### Eclipse ###
21+
.apt_generated
22+
.classpath
23+
.factorypath
24+
.project
25+
.settings
26+
.springBeans
27+
.sts4-cache
28+
bin/
29+
!**/src/main/**/bin/
30+
!**/src/test/**/bin/
31+
32+
### NetBeans ###
33+
/nbproject/private/
34+
/nbbuild/
35+
/dist/
36+
/nbdist/
37+
/.nb-gradle/
38+
39+
### VS Code ###
40+
.vscode/
41+
42+
### Mac OS ###
43+
.DS_Store

.idea/.gitignore

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/copilot.data.migration.ask2agent.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/gradle.xml

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/misc.xml

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
plugins {
2+
application
3+
java
4+
id("org.openjfx.javafxplugin") version "0.0.14"
5+
}
6+
7+
group = "com.lokins.sleepy.gui"
8+
version = "1.0.0"
9+
10+
repositories {
11+
mavenCentral()
12+
}
13+
14+
java {
15+
toolchain {
16+
languageVersion.set(JavaLanguageVersion.of(21))
17+
}
18+
}
19+
20+
dependencies {
21+
22+
implementation("com.squareup.okhttp3:okhttp:4.12.0")
23+
// JSON 处理
24+
implementation("com.fasterxml.jackson.core:jackson-databind:2.17.2")
25+
// 配置文件
26+
implementation("org.ini4j:ini4j:0.5.4")
27+
// Windows 原生 API
28+
implementation("net.java.dev.jna:jna:5.14.0")
29+
implementation("net.java.dev.jna:jna-platform:5.14.0")
30+
// 日志
31+
implementation("ch.qos.logback:logback-classic:1.5.8")
32+
implementation("org.slf4j:slf4j-api:2.0.16")
33+
34+
testImplementation(platform("org.junit:junit-bom:5.10.0"))
35+
testImplementation("org.junit.jupiter:junit-jupiter")
36+
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
37+
}
38+
39+
javafx {
40+
version = "21"
41+
modules("javafx.controls", "javafx.fxml", "javafx.graphics")
42+
}
43+
44+
tasks.test {
45+
useJUnitPlatform()
46+
}
47+
48+
application {
49+
mainClass.set("com.lokins.sleepy.gui.Launcher")
50+
}
51+
52+
tasks.withType<JavaCompile> {
53+
options.encoding = "UTF-8"
54+
}
55+
56+
tasks.register<Jar>("fatJar") {
57+
group = "build"
58+
description = "创建轻量级引导 JAR (不含 JavaFX)"
59+
60+
outputs.upToDateWhen { false }
61+
destinationDirectory.set(layout.buildDirectory.dir("libs"))
62+
63+
archiveBaseName.set("sleepy-gui")
64+
archiveVersion.set(project.version.toString())
65+
66+
manifest {
67+
attributes["Main-Class"] = "com.lokins.sleepy.gui.launch.Launcher"
68+
}
69+
70+
from(sourceSets.main.get().output)
71+
72+
from({
73+
configurations.runtimeClasspath.get()
74+
.filter { it.name.endsWith("jar") }
75+
.filter { !it.name.contains("javafx") }
76+
.map { zipTree(it) }
77+
})
78+
79+
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
80+
81+
exclude("META-INF/*.SF", "META-INF/*.DSA", "META-INF/*.RSA")
82+
}

gradle/wrapper/gradle-wrapper.jar

59.3 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Sat Feb 14 20:32:12 CST 2026
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.0.0-bin.zip
5+
zipStoreBase=GRADLE_USER_HOME
6+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)