Skip to content

Commit

Permalink
初始化仓库
Browse files Browse the repository at this point in the history
  • Loading branch information
Gu-ZT committed Oct 18, 2023
0 parents commit 2e79929
Show file tree
Hide file tree
Showing 14 changed files with 612 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Continuous Integration

on:
push:
branches: [ 'main' ]
paths:
- .github/workflows/ci.yml
- src/**
- build.gradle
- gradle.properties

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Set build number
run: sed -i "s/undefined/$GITHUB_RUN_NUMBER/g" gradle.properties
- name: Grant execute permission
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Publish artifacts
uses: actions/upload-artifact@v2
with:
name: Artifacts for ${{ github.sha }}
path: build/libs/
26 changes: 26 additions & 0 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Releases

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
- name: Grant execute permission
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Publish artifacts
uses: actions/upload-artifact@v2
with:
name: Artifacts for ${{ github.sha }}
path: build/libs/
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
HELP.md
.gradle
build/
!gradle/wrapper/gradle-wrapper.jar
!**/src/main/**/build/
!**/src/test/**/build/

### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/

### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
out/
!**/src/main/**/out/
!**/src/test/**/out/

### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/

### VS Code ###
.vscode/
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div align="center" style="font-size: 48px;text-align: center">学生社团管理系统</div>
<div align="center" style="text-align: center">
<img src="https://badgen.net/static/JAVA/17?icon=kofi&color=orange" alt="java version" />
<img src="https://badgen.net/github/stars/XATUOS/Student-Society-Management-System?icon=github&color=33ff66" alt="stars" />
<img src="https://badgen.net/github/forks/XATUOS/Student-Society-Management-System?icon=github&color=2266ff" alt="forks" />
<img src="https://badgen.net/github/open-issues/XATUOS/Student-Society-Management-System?icon=github&color=ff4433" alt="issues" />
</div>

# Student Society Management System

105 changes: 105 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.6'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
}

group = maven_group

version = '0.0.1'
if (build_number != 'undefined') {
version += "+build.${build_number}"
}

repositories {
mavenCentral()
}

static String starter(value) {
return "org.springframework.boot:spring-boot-starter-$value"
}

String easypoi(model) {
return "cn.afterturn:easypoi-${model}:${easypoi_version}"
}

dependencies {
testImplementation starter('test')
developmentOnly 'org.springframework.boot:spring-boot-devtools'
implementation starter('web')
implementation starter('security')
implementation starter('data-redis')
implementation starter('validation')
implementation "org.apache.commons:commons-pool2:${pool2_version}"
implementation "mysql:mysql-connector-java:${connector_version}"
// implementation "com.github.pagehelper:pagehelper-spring-boot-starter:${pagehelper_version}" // mybatis plus yyds
implementation "com.github.oshi:oshi-core:${oshi_version}"
implementation "com.alibaba.fastjson2:fastjson2:${fastjson2_version}"
implementation "com.google.code.gson:gson:${gson_version}"
implementation "io.jsonwebtoken:jjwt:${jwt_version}"
// implementation "com.github.jeffreyning:mybatisplus-plus:${mpp_version}" // 多主键mpp
implementation "com.baomidou:mybatis-plus-boot-starter:${mybatis_plus_version}"
implementation "com.baomidou:mybatis-plus-extension:${mybatis_plus_version}"
implementation "cn.hutool:hutool-all:${hutool_version}"
implementation("org.springframework.cloud:spring-cloud-starter-openfeign:${feign_version}") {
exclude module: 'commons-fileupload'
}
//noinspection VulnerableLibrariesLocal
implementation "commons-fileupload:commons-fileupload:${file_upload_version}"
implementation "io.github.openfeign:feign-okhttp:${feign_okhttp_version}"
implementation "commons-io:commons-io:${commons_version}"
implementation easypoi('base')
implementation easypoi('web')
implementation easypoi('annotation')
implementation "org.xhtmlrenderer:flying-saucer-pdf-itext5:${saucer_version}"
implementation "org.freemarker:freemarker:${freemarker_version}"
compileOnly "org.projectlombok:lombok:${lombok_version}"
testCompileOnly "org.projectlombok:lombok:${lombok_version}"
annotationProcessor "org.projectlombok:lombok:${lombok_version}"
annotationProcessor "org.springframework.boot:spring-boot-configuration-processor"
}

test {
useJUnitPlatform()
}

processResources {
exclude 'application-config-product.yml'
exclude 'template/**'
}

bootJar {
exclude 'application-config.yml'
if (!file("build/libs/application-config.yml").exists()) {
copy {
from 'src/main/resources'
into 'build/libs'
include 'application-config-product.yml'
rename {
'application-config.yml'
}
}
}
}

jar {
exclude 'application-config.yml'
if (!file("build/libs/application-config.yml").exists()) {
copy {
from 'src/main/resources'
into 'build/libs'
include 'application-config-product.yml'
rename {
'application-config.yml'
}
}
}
}

gradle.taskGraph.whenReady { graph ->
graph.getAllTasks().each { task ->
if (task.path =~ /:build/) {
test.enabled false
}
}
}
25 changes: 25 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# JVM Info
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false
# Project Info
maven_group=dev.xatuos
version=0.0.1
build_number=undefined
# Dependencies Info
connector_version=8.0.31
pagehelper_version=1.4.6
oshi_version=6.4.0
fastjson2_version=2.0.29
gson_version=2.10
jwt_version=0.9.1
mybatis_plus_version=3.5.3.1
hutool_version=5.8.20
feign_version=3.1.7
feign_okhttp_version=12.1
lombok_version=1.18.30
commons_version=2.11.0
file_upload_version=1.5
easypoi_version=4.4.0
pool2_version=2.11.1
saucer_version=9.1.22
freemarker_version=2.3.32
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 2e79929

Please sign in to comment.