-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
82 lines (72 loc) · 2.68 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
kotlin("jvm") version "1.6.20"
// id("com.github.johnrengelman.shadow") version "7.1.0"
id("org.springframework.boot") version "3.0.0-M3"
id("io.spring.dependency-management") version "1.0.11.RELEASE"
kotlin("plugin.spring") version "1.6.21"
kotlin("plugin.serialization") version "1.6.20"
}
group = "moe.peanutmelonseedbigalmond"
version = "1.0-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_17
allprojects {
repositories {
// mavenCentral()
maven("https://maven.aliyun.com/repository/central")
maven("https://jitpack.io")
maven("https://repo.spring.io/milestone")
// maven("https://maven.aliyun.com/repository/spring")
}
}
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
tasks.withType<org.springframework.boot.gradle.tasks.bundling.BootJar> {
setProperty("mainClass", "moe.peanutmelonseedbigalmond.bilirec.BiliRecApplicationKt")
}
//tasks.withType<Jar> {
// manifest {
// attributes(
// mapOf(
// "Main-Class" to "moe.peanutmelonseedbigalmond.bilirec.BiliRecApplicationKt"
// )
// )
// }
//}
//
//tasks.withType<com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar> {
// archiveBaseName.set("BiliRec")
//}
subprojects {
apply {
plugin("org.jetbrains.kotlin.jvm")
// plugin("com.github.johnrengelman.shadow")
plugin("org.springframework.boot")
plugin("io.spring.dependency-management")
plugin("org.jetbrains.kotlin.plugin.spring")
}
dependencies {
// implementation(project(":app"))
implementation(kotlin("stdlib-jdk8"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.2")
implementation("commons-cli:commons-cli:1.5.0")
implementation("org.springframework.boot:spring-boot-starter") {
exclude(group = "org.springframework.boot", module = "spring-boot-starter-logging")
}
developmentOnly("org.springframework.boot:spring-boot-devtools")
testImplementation("org.springframework.boot:spring-boot-starter-test")
implementation("org.greenrobot:eventbus-java:3.3.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.0")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
}
tasks.withType<KotlinCompile> {
kotlinOptions.jvmTarget = "17"
kotlinOptions.freeCompilerArgs = listOf("-Xjsr305=strict")
}
// tasks.getByName<Test>("test") {
// useJUnitPlatform()
// }
}