1 Star 2 Fork 0

linbox / linbox-server-common-kotlin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
build.gradle.kts 4.77 KB
一键复制 编辑 原始数据 按行查看 历史
lrsec 提交于 2023-05-18 19:44 . update
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
@Suppress(
"DSL_SCOPE_VIOLATION",
"MISSING_DEPENDENCY_CLASS",
"UNRESOLVED_REFERENCE_WRONG_RECEIVER",
"FUNCTION_CALL_EXPECTED"
)
plugins {
alias(linboxLibs.plugins.spring.boot)
alias(linboxLibs.plugins.spring.dependency.management)
alias(linboxLibs.plugins.kotlin.spring)
alias(linboxLibs.plugins.kotlin.jvm)
alias(linboxLibs.plugins.kotlin.kapt)
`java-library`
`maven-publish`
signing
}
group = "tech.linbox"
version = "3.0.0-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_17
configurations.all {
resolutionStrategy {
cacheChangingModulesFor(0, "seconds")
}
}
extra["springCloudVersion"] = linboxLibs.versions.spring.cloud.version.get()
dependencyManagement {
imports {
mavenBom("org.springframework.cloud:spring-cloud-dependencies:${property("springCloudVersion")}")
}
applyMavenExclusions(false)
}
dependencies {
// kotlin
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation(linboxLibs.kotlin.coroutines.core)
implementation("org.springframework.boot:spring-boot-starter-web-services")
implementation("org.springframework.boot:spring-boot-starter-validation")
kapt("org.springframework.boot:spring-boot-configuration-processor")
implementation("org.springframework.boot:spring-boot-starter-data-jdbc")
implementation("org.springframework.boot:spring-boot-starter-data-redis")
implementation("org.springframework.cloud:spring-cloud-starter-netflix-eureka-client")
implementation("org.springframework.cloud:spring-cloud-openfeign-core")
implementation("org.springframework.cloud:spring-cloud-starter-openfeign")
// jackson module
implementation("com.fasterxml.jackson.module:jackson-module-parameter-names")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jsr310")
implementation("com.fasterxml.jackson.datatype:jackson-datatype-jdk8")
// jackson kotlin model
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation(linboxLibs.shardingsphere.core)
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "17"
}
}
sourceSets.main {
java.srcDirs("src/main/kotlin")
}
tasks.jar {
enabled = true
}
tasks.bootJar {
enabled = false
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
pom {
name.set("linbox server common")
description.set("A base lib for linbox server side")
url.set("https://gitee.com/linbox/linbox-server-common-kotlin")
licenses {
license {
name.set("The Apache License, Version 2.0")
url.set("https://www.apache.org/licenses/LICENSE-2.0.txt")
}
}
developers {
developer {
id.set("Linbox Company")
name.set("Linbox Company")
email.set("company@bhry.tech")
}
}
scm {
connection.set("scm:git:git@gitee.com:linbox/linbox-server-common-kotlin.git")
developerConnection.set("scm:git:git@gitee.com:linbox/linbox-server-common-kotlin.git")
url.set("https://gitee.com/linbox/linbox-server-common-kotlin")
}
}
}
}
repositories {
maven {
name = "OSSRH"
url = if (project.version.toString().endsWith("-SNAPSHOT")) {
uri("https://s01.oss.sonatype.org/content/repositories/snapshots")
} else {
uri("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
}
credentials {
username = findProperty("ossrhUsername").toString()
password = findProperty("ossrhPassword").toString()
}
}
maven {
name = "bhry"
url = if (project.version.toString().endsWith("-SNAPSHOT")) {
uri("https://repository.bhry.tech/repository/maven-snapshots/")
} else {
uri("https://repository.bhry.tech/repository/maven-releases/")
}
credentials {
username = findProperty("bhryUsername").toString()
password = findProperty("bhryPassword").toString()
}
}
}
}
signing {
setRequired({
gradle.taskGraph.hasTask("publish")
})
sign(publishing.publications["mavenJava"])
}
Kotlin
1
https://gitee.com/linbox/linbox-server-common-kotlin.git
git@gitee.com:linbox/linbox-server-common-kotlin.git
linbox
linbox-server-common-kotlin
linbox-server-common-kotlin
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891