80 lines
1.9 KiB
Groovy
80 lines
1.9 KiB
Groovy
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|
|
|
buildscript {
|
|
ext {
|
|
jvm_version = '21'
|
|
kotlin_version = '2.0.0'
|
|
gaea_version = '1.7.2'
|
|
spring_version = "3.3.0"
|
|
}
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
|
|
maven { url 'https://maven.aliyun.com/repository/central' }
|
|
maven { url 'https://maven.aliyun.com/repository/public' }
|
|
mavenCentral()
|
|
}
|
|
|
|
dependencies {
|
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
|
}
|
|
}
|
|
|
|
subprojects {
|
|
group 'com.synebula'
|
|
version version
|
|
|
|
ext {
|
|
version '1.1.1'
|
|
}
|
|
|
|
buildscript {
|
|
repositories {
|
|
mavenLocal()
|
|
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
|
|
mavenCentral()
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
mavenLocal()
|
|
maven { url 'https://git.synebula.com/api/packages/alex/maven' }
|
|
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
|
|
mavenCentral()
|
|
}
|
|
|
|
apply plugin: 'idea'
|
|
apply plugin: 'java'
|
|
apply plugin: 'kotlin'
|
|
apply plugin: 'maven-publish'
|
|
|
|
dependencies {
|
|
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'
|
|
}
|
|
|
|
/*** 指定 Java & Kotlin 语言编译目标JVM ***/
|
|
sourceCompatibility = "$jvm_version"
|
|
targetCompatibility = "$jvm_version"
|
|
compileKotlin {
|
|
compilerOptions {
|
|
jvmTarget = JvmTarget.valueOf("JVM_$jvm_version")
|
|
}
|
|
}
|
|
compileTestKotlin {
|
|
compilerOptions {
|
|
jvmTarget = JvmTarget.valueOf("JVM_$jvm_version")
|
|
}
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
from components.java
|
|
}
|
|
}
|
|
}
|
|
}
|