diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b9cf43d..905134c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,6 +2,7 @@ name: 构建 on: workflow_dispatch: push: + pull_request: jobs: build-jar: @@ -24,36 +25,36 @@ jobs: with: name: WebAPI Jar path: build/libs/*boot*.jar - build-native: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-latest, windows-latest, ubuntu-latest] - steps: - - name: 签出仓库 - uses: actions/checkout@v7 - - name: 安装GraalVM - uses: graalvm/setup-graalvm@v1 - with: - java-version: '25' - distribution: 'liberica' - - name: 让gradlew可执行 - if: runner.os != 'Windows' - run: chmod +x ./gradlew - - name: 构建原生镜像 - if: runner.os == 'Windows' - env: - # Needed for Windows; to resolve issue with temp folder during native image build, due to relativization - # problem when different drives are used, such as in GHA runners. - # https://github.com/graalvm/native-build-tools/issues/754 - # https://github.com/bric3/jufmt/commit/feb040f159b9a5168d677455218b787d9b644ee2 - GRADLE_OPTS: -Djava.io.tmpdir=${{ runner.temp }} - run: ./gradlew nativeCompile - - name: 构建原生镜像 - if: runner.os != 'Windows' - run: ./gradlew nativeCompile - - name: 上传构建产物 - uses: actions/upload-artifact@v7 - with: - name: WebAPI Native Image ${{ runner.os }} ${{ runner.arch }} - path: build/native/nativeCompile/* \ No newline at end of file +# build-native: +# runs-on: ${{ matrix.os }} +# strategy: +# matrix: +# os: [macos-latest, windows-latest, ubuntu-latest] +# steps: +# - name: 签出仓库 +# uses: actions/checkout@v7 +# - name: 安装GraalVM +# uses: graalvm/setup-graalvm@v1 +# with: +# java-version: '25' +# distribution: 'liberica' +# - name: 让gradlew可执行 +# if: runner.os != 'Windows' +# run: chmod +x ./gradlew +# - name: 构建原生镜像 +# if: runner.os == 'Windows' +# env: +# # Needed for Windows; to resolve issue with temp folder during native image build, due to relativization +# # problem when different drives are used, such as in GHA runners. +# # https://github.com/graalvm/native-build-tools/issues/754 +# # https://github.com/bric3/jufmt/commit/feb040f159b9a5168d677455218b787d9b644ee2 +# GRADLE_OPTS: -Djava.io.tmpdir=${{ runner.temp }} +# run: ./gradlew nativeCompile +# - name: 构建原生镜像 +# if: runner.os != 'Windows' +# run: ./gradlew nativeCompile +# - name: 上传构建产物 +# uses: actions/upload-artifact@v7 +# with: +# name: WebAPI Native Image ${{ runner.os }} ${{ runner.arch }} +# path: build/native/nativeCompile/* \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index 514f9de..7d73bbc 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -9,11 +9,11 @@ plugins { id("org.springframework.boot") version "4.1.0" id("io.spring.dependency-management") version "1.1.7" id("org.hibernate.orm") version "7.4.1.Final" - id("org.graalvm.buildtools.native") version "1.1.1" +// id("org.graalvm.buildtools.native") version "1.1.1" } group = "xyz.thewhitedog9487" -version = "0.8.0" +version = "0.8.1" java { toolchain { @@ -48,22 +48,22 @@ dependencies { annotationProcessor("org.projectlombok:lombok") annotationProcessor("org.springframework.boot:spring-boot-configuration-processor") kapt("org.springframework.boot:spring-boot-configuration-processor") - testImplementation("org.springframework.boot:spring-boot-starter-actuator-test") - testImplementation("org.springframework.boot:spring-boot-starter-data-jpa-test") +// testImplementation("org.springframework.boot:spring-boot-starter-actuator-test") +// testImplementation("org.springframework.boot:spring-boot-starter-data-jpa-test") // testImplementation("org.springframework.boot:spring-boot-starter-data-redis-test") // testImplementation("org.springframework.boot:spring-boot-starter-jdbc-test") // testImplementation("org.springframework.boot:spring-boot-starter-restclient-test") // testImplementation("org.springframework.boot:spring-boot-starter-security-oauth2-authorization-server-test") // testImplementation("org.springframework.boot:spring-boot-starter-security-oauth2-client-test") // testImplementation("org.springframework.boot:spring-boot-starter-security-oauth2-resource-server-test") - testImplementation("org.springframework.boot:spring-boot-starter-security-test") - testImplementation("org.springframework.boot:spring-boot-starter-webmvc-test") +// testImplementation("org.springframework.boot:spring-boot-starter-security-test") +// testImplementation("org.springframework.boot:spring-boot-starter-webmvc-test") // testImplementation("org.springframework.boot:spring-boot-starter-websocket-test") - testImplementation("org.jetbrains.kotlin:kotlin-test-junit5") - testCompileOnly("org.projectlombok:lombok") - testRuntimeOnly("org.junit.platform:junit-platform-launcher") - testAnnotationProcessor("org.projectlombok:lombok") - testImplementation(kotlin("test")) +// testImplementation("org.jetbrains.kotlin:kotlin-test-junit5") +// testCompileOnly("org.projectlombok:lombok") +// testRuntimeOnly("org.junit.platform:junit-platform-launcher") +// testAnnotationProcessor("org.projectlombok:lombok") +// testImplementation(kotlin("test")) implementation("io.github.oshai:kotlin-logging-jvm:7.0.3") implementation("org.hibernate.orm:hibernate-community-dialects") @@ -107,6 +107,7 @@ tasks.withType().configureEach { freeCompilerArgs.add("-Xannotation-default-target=param-property") } } + kapt { keepJavacAnnotationProcessors = true } \ No newline at end of file diff --git a/src/main/kotlin/xyz/thewhitedog9487/WebAPI/Configuration/OpenApiConfiguration.kt b/src/main/kotlin/xyz/thewhitedog9487/WebAPI/Configuration/OpenApiConfiguration.kt index bee6957..46b02a9 100644 --- a/src/main/kotlin/xyz/thewhitedog9487/WebAPI/Configuration/OpenApiConfiguration.kt +++ b/src/main/kotlin/xyz/thewhitedog9487/WebAPI/Configuration/OpenApiConfiguration.kt @@ -21,7 +21,7 @@ class OpenApiConfiguration { .contact(Contact() .name("TheWhiteDog9487") .url("https://www.github.com/TheWhiteDog9487/WebAPI")) - .version("0.8.0") + .version("0.8.1") .license(License() .name("WTFPL") .url("https://spdx.org/licenses/WTFPL")) )