Skip to content

Commit

Permalink
Merge pull request #9 from Enaium/develop
Browse files Browse the repository at this point in the history
update to 0.4.0
  • Loading branch information
Enaium authored Apr 1, 2024
2 parents d2799f5 + 06f3180 commit 5e3c2ed
Show file tree
Hide file tree
Showing 239 changed files with 4,700 additions and 3,234 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '17'
java-version: '21'
distribution: 'liberica'
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build
gradle-version: 8.1
gradle-version: 8.7
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
# kook-spring-boot-stater

![OpenJDK](https://img.shields.io/badge/OpenJDK-17-white?style=flat-square&logo=OpenJDK)
![SpringBoot](https://img.shields.io/badge/SpringBoot-3-green?style=flat-square&logo=SpringBoot)
![OpenJDK](https://img.shields.io/badge/OpenJDK-21-white?style=flat-square&logo=OpenJDK)
![SpringBoot](https://img.shields.io/badge/SpringBoot-3.2-green?style=flat-square&logo=SpringBoot)
![Maven-Central](https://img.shields.io/maven-central/v/cn.enaium/kook-spring-boot-starter?style=flat-square)
![JitPack](https://img.shields.io/jitpack/version/com.github.Enaium/kook-spring-boot-starter?style=flat-square)
![GitHub](https://img.shields.io/github/license/enaium/kook-spring-boot-starter?style=flat-square)
![Enaium的频道](https://www.kookapp.cn/api/v3/badge/guild?style=0&guild_id=7057670786047912)

支持了所有的Http接口和Websocket事件,可以在`kookstarter-sample`里查看例子
支持了所有的Http接口和Websocket事件,可以在`test`里查看例子

最新版本以maven仓库中版本为准

## 依赖

```xml

<dependency>
<groupId>cn.enaium</groupId>
<artifactId>kook-spring-boot-starter</artifactId>
Expand All @@ -28,6 +30,6 @@ implementation 'cn.enaium:kook-spring-boot-starter:最新版本'
implementation("cn.enaium:kook-spring-boot-starter:最新版本")
```

本项目使用了`webflux`也需要添加`webflux`依赖
## pr

提交pr时请提交到`develop`而不是`master`
94 changes: 83 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,18 +1,90 @@
allprojects {
group = "cn.enaium"
version = "0.3.0"
plugins {
`java-library`
`maven-publish`
signing
}

repositories {
mavenCentral()
}


java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21

withJavadocJar()
withSourcesJar()
}

group = "cn.enaium"
version = "0.4.0"

repositories {
mavenCentral()
}

val springboot: String by project
val annotations: String by project

dependencies {
implementation("org.jetbrains:annotations:$annotations")

implementation("org.springframework.boot:spring-boot-starter-webflux:$springboot")

annotationProcessor("org.springframework.boot:spring-boot-configuration-processor:$springboot")

testImplementation("org.springframework.boot:spring-boot-starter-test:$springboot")
}

tasks.test {
useJUnitPlatform()
}

subprojects {
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
publishing {
publications {
create<MavenPublication>("mavenJava") {
artifactId = "kook-spring-boot-starter"
from(components["java"])

pom {
name.set("kook-spring-boot-starter")
description.set("KOOK机器人的spring-boot-starter")
url.set("https://github.com/Enaium/kook-spring-boot-starter/")

licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("enaium")
name.set("Enaium")
email.set("[email protected]")
}
}
scm {
connection.set("scm:git:https://github.com/Enaium/kook-spring-boot-starter.git")
developerConnection.set("scm:git:https://github.com/Enaium/kook-spring-boot-starter.git")
url.set("https://github.com/Enaium/kook-spring-boot-starter/")
}
}
}
}
repositories {
maven {
url = uri(
"https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
)
credentials {
username = project.properties["ossrhUsername"].toString()
password = project.properties["ossrhPassword"].toString()
}
}
}
}

tasks.withType<Javadoc> {
options.encoding = "UTF-8"
signing {
project.properties["signing.secretKeyRingFile"]?.let {
sign(publishing.publications["mavenJava"])
}
}
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
springboot=3.2.4
annotations=24.1.0
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Sun Mar 31 09:49:36 CST 2024
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
6 changes: 0 additions & 6 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,6 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"

# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi

# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
Expand Down
14 changes: 6 additions & 8 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
@rem limitations under the License.
@rem

@if "%DEBUG%"=="" @echo off
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -25,7 +25,7 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

Expand All @@ -40,7 +40,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand Down Expand Up @@ -75,15 +75,13 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
2 changes: 1 addition & 1 deletion jitpack.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
jdk:
- openjdk17
- openjdk21
44 changes: 0 additions & 44 deletions kookstarter-sample/.gitignore

This file was deleted.

14 changes: 0 additions & 14 deletions kookstarter-sample/README.md

This file was deleted.

11 changes: 0 additions & 11 deletions kookstarter-sample/build.gradle.kts

This file was deleted.

Loading

0 comments on commit 5e3c2ed

Please sign in to comment.