2024-06-29 20:00:05 +08:00
|
|
|
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
|
|
2019-09-02 17:08:06 +08:00
|
|
|
buildscript {
|
|
|
|
|
ext {
|
2024-06-26 17:31:44 +08:00
|
|
|
jvm_version = '21'
|
|
|
|
|
kotlin_version = '2.0.0'
|
|
|
|
|
spring_version = '3.3.0'
|
2019-09-02 17:08:06 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
|
mavenLocal()
|
2024-06-29 20:00:05 +08:00
|
|
|
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
|
2023-04-18 09:58:52 +08:00
|
|
|
maven { url 'https://maven.aliyun.com/repository/central' }
|
|
|
|
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
2019-09-02 17:08:06 +08:00
|
|
|
mavenCentral()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-07-29 15:28:14 +08:00
|
|
|
subprojects {
|
2019-09-02 17:08:06 +08:00
|
|
|
group 'com.synebula'
|
2024-09-30 22:55:02 +08:00
|
|
|
version '1.7.0'
|
2019-09-02 17:08:06 +08:00
|
|
|
|
|
|
|
|
buildscript {
|
|
|
|
|
repositories {
|
|
|
|
|
mavenLocal()
|
2023-04-18 09:58:52 +08:00
|
|
|
maven { url 'https://maven.aliyun.com/repository/central' }
|
|
|
|
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
2019-09-02 17:08:06 +08:00
|
|
|
mavenCentral()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-05-16 14:49:16 +08:00
|
|
|
repositories {
|
|
|
|
|
mavenLocal()
|
2023-04-18 09:58:52 +08:00
|
|
|
maven { url 'https://maven.aliyun.com/repository/central' }
|
|
|
|
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
2020-05-16 14:49:16 +08:00
|
|
|
mavenCentral()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
apply plugin: 'idea'
|
2019-09-02 17:08:06 +08:00
|
|
|
apply plugin: 'java'
|
|
|
|
|
apply plugin: 'kotlin'
|
|
|
|
|
apply plugin: 'maven-publish'
|
|
|
|
|
|
|
|
|
|
dependencies {
|
2022-07-19 11:34:31 +08:00
|
|
|
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
|
|
|
|
api "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
|
|
|
|
|
testApi group: 'junit', name: 'junit', version: '4.12'
|
2019-09-02 17:08:06 +08:00
|
|
|
}
|
|
|
|
|
|
2023-04-20 23:06:33 +08:00
|
|
|
/*** 指定 Java & Kotlin 语言编译目标JVM ***/
|
|
|
|
|
sourceCompatibility = "$jvm_version"
|
|
|
|
|
targetCompatibility = "$jvm_version"
|
|
|
|
|
compileKotlin {
|
2024-06-29 20:00:05 +08:00
|
|
|
compilerOptions {
|
|
|
|
|
jvmTarget = JvmTarget.valueOf("JVM_$jvm_version")
|
|
|
|
|
}
|
2023-04-20 23:06:33 +08:00
|
|
|
}
|
|
|
|
|
compileTestKotlin {
|
2024-06-29 20:00:05 +08:00
|
|
|
compilerOptions {
|
|
|
|
|
jvmTarget = JvmTarget.valueOf("JVM_$jvm_version")
|
|
|
|
|
}
|
2023-04-20 23:06:33 +08:00
|
|
|
}
|
|
|
|
|
|
2022-08-26 10:33:24 +08:00
|
|
|
publishing {
|
2024-09-30 22:55:02 +08:00
|
|
|
repositories {
|
|
|
|
|
maven {
|
|
|
|
|
name = "Gitea"
|
|
|
|
|
url = uri("https://git.synebula.com/api/packages/alex/maven")
|
|
|
|
|
|
|
|
|
|
credentials(HttpHeaderCredentials) {
|
|
|
|
|
name = "Authorization"
|
|
|
|
|
value = "token 1b9a13c1c75832c2f82beba8c8db340364eff7b1"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
authentication {
|
|
|
|
|
header(HttpHeaderAuthentication)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-08-26 10:33:24 +08:00
|
|
|
|
|
|
|
|
publications {
|
|
|
|
|
mavenJava(MavenPublication) {
|
|
|
|
|
from components.java
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
2019-09-02 17:08:06 +08:00
|
|
|
}
|