Skip to content

Commit

Permalink
Merge pull request #163 from MaaAssistantArknights/kt
Browse files Browse the repository at this point in the history
迁移至 kotlin 编程语言
  • Loading branch information
KevinT3Hu authored Feb 14, 2024
2 parents 673a709 + 83f6e51 commit 3bff313
Show file tree
Hide file tree
Showing 329 changed files with 8,531 additions and 9,427 deletions.
33 changes: 26 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ plugins {
id 'java'
id 'org.springframework.boot' version '3.1.5'
id 'io.spring.dependency-management' version '1.1.3'
id 'io.freefair.lombok' version '8.4'
id 'org.springdoc.openapi-gradle-plugin' version '1.8.0'
id 'org.hidetake.swagger.generator' version '2.19.2'
// id 'org.graalvm.buildtools.native' version '0.9.28'
id 'com.gorylenko.gradle-git-properties' version '2.4.1'
id 'org.jetbrains.kotlin.jvm' version '1.9.22'
id "org.jetbrains.kotlin.plugin.spring" version "1.9.22"
id "org.jetbrains.kotlin.kapt" version "1.9.22"
}

group 'plus.maa'
Expand All @@ -25,25 +27,35 @@ repositories {
ext {
// 统一管理版本号
hutoolVersion = '5.8.22'
mapstructVersion = '1.5.5.Final'
}

dependencies {

annotationProcessor 'com.github.therapi:therapi-runtime-javadoc-scribe:0.13.0'
annotationProcessor 'org.mapstruct:mapstruct-processor:1.5.3.Final'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
kapt 'org.springframework.boot:spring-boot-configuration-processor'

implementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'io.mockk:mockk:1.13.9'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.boot:spring-boot-starter-security'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-cache'

//springdoc相关依赖没有被自动管理,必须保留版本号
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0'
implementation 'com.github.therapi:therapi-runtime-javadoc:0.13.0'
kapt 'com.github.therapi:therapi-runtime-javadoc-scribe:0.15.0'

// kotlin
implementation "com.fasterxml.jackson.module:jackson-module-kotlin"
implementation "org.jetbrains.kotlin:kotlin-reflect"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"

// kotlin-logging
implementation 'io.github.oshai:kotlin-logging-jvm:5.1.0'

implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation 'com.sun.mail:javax.mail:1.6.2'
Expand All @@ -52,7 +64,10 @@ dependencies {
implementation "cn.hutool:hutool-jwt:$hutoolVersion"
implementation "cn.hutool:hutool-dfa:$hutoolVersion"

implementation 'org.mapstruct:mapstruct:1.5.5.Final'
// mapstruct
implementation "org.mapstruct:mapstruct:${mapstructVersion}"
kapt "org.mapstruct:mapstruct-processor:${mapstructVersion}"

implementation 'org.eclipse.jgit:org.eclipse.jgit:6.6.0.202305301015-r'
implementation 'org.eclipse.jgit:org.eclipse.jgit.ssh.apache.agent:6.6.0.202305301015-r'
implementation 'org.freemarker:freemarker:2.3.32'
Expand All @@ -66,6 +81,10 @@ dependencies {

}

kapt {
keepJavacAnnotationProcessors = true
}

test {
useJUnitPlatform()
}
Expand Down Expand Up @@ -122,7 +141,7 @@ swaggerSources {
}
}

rootProject.afterEvaluate(){
rootProject.afterEvaluate() {
def forkedSpringBootRun = project.tasks.named("forkedSpringBootRun")
forkedSpringBootRun.configure {
doNotTrackState("See https://github.com/springdoc/springdoc-openapi-gradle-plugin/issues/102")
Expand Down
24 changes: 0 additions & 24 deletions src/main/java/plus/maa/backend/MainApplication.java

This file was deleted.

22 changes: 0 additions & 22 deletions src/main/java/plus/maa/backend/common/annotation/AccessLimit.java

This file was deleted.

17 changes: 0 additions & 17 deletions src/main/java/plus/maa/backend/common/annotation/CurrentUser.java

This file was deleted.

16 changes: 0 additions & 16 deletions src/main/java/plus/maa/backend/common/annotation/JsonSchema.java

This file was deleted.

This file was deleted.

89 changes: 0 additions & 89 deletions src/main/java/plus/maa/backend/common/aop/JsonSchemaAop.java

This file was deleted.

91 changes: 0 additions & 91 deletions src/main/java/plus/maa/backend/common/aop/SensitiveWordAop.java

This file was deleted.

Loading

0 comments on commit 3bff313

Please sign in to comment.