Skip to content

Commit affe345

Browse files
committed
添加文件
1 parent 2a90630 commit affe345

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+4606
-0
lines changed

.github/workflows/release.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: release publish
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
14+
- name: Setup JDK
15+
uses: actions/setup-java@v3
16+
with:
17+
java-version: 8
18+
distribution: zulu
19+
20+
- name: Build
21+
uses: gradle/gradle-build-action@v2.4.0
22+
with:
23+
arguments: shadowJar
24+
25+
- name: Release
26+
uses: softprops/action-gh-release@v2
27+
with:
28+
files: build/libs/*

.gitignore

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

build.gradle.kts

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2+
3+
fun getVersionName(tagName: String) = if(tagName.startsWith("v")) tagName.substring(1) else tagName
4+
val gitTagName: String? get() = Regex("(?<=refs/tags/).*").find(System.getenv("GITHUB_REF") ?: "")?.value
5+
val gitCommitSha: String? get() = System.getenv("GITHUB_SHA") ?: null
6+
val debugVersion: String get() = System.getenv("DBG_VERSION") ?: "0.0.0"
7+
8+
group = "com.github.balloonupdate"
9+
version = gitTagName?.run { getVersionName(this) } ?: debugVersion
10+
11+
plugins {
12+
id("java")
13+
id("com.github.johnrengelman.shadow") version "7.1.2"
14+
}
15+
16+
repositories {
17+
mavenCentral()
18+
}
19+
20+
dependencies {
21+
implementation("com.formdev:flatlaf:2.6")
22+
implementation("com.formdev:flatlaf-intellij-themes:2.6")
23+
24+
implementation("com.squareup.okhttp3:okhttp:4.12.0")
25+
implementation("com.github.lookfirst:sardine:5.12")
26+
implementation("org.json:json:20231013")
27+
implementation("org.yaml:snakeyaml:2.0")
28+
implementation("commons-codec:commons-codec:1.18.0")
29+
30+
}
31+
32+
tasks.withType<ShadowJar> {
33+
duplicatesStrategy = DuplicatesStrategy.INCLUDE
34+
archiveBaseName = "Mcpatch"
35+
36+
manifest {
37+
attributes("Version" to archiveVersion.get())
38+
attributes("Git-Commit" to (gitCommitSha ?: ""))
39+
attributes("Main-Class" to "com.github.balloonupdate.mcpatch.client")
40+
attributes("Premain-Class" to "com.github.balloonupdate.mcpatch.client")
41+
}
42+
43+
archiveClassifier.set("")
44+
}

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+
#Mon Jan 20 10:44:00 CST 2025
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
5+
zipStoreBase=GRADLE_USER_HOME
6+
zipStorePath=wrapper/dists

gradlew

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

0 commit comments

Comments
 (0)