加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.gradle 3.02 KB
一键复制 编辑 原始数据 按行查看 历史
唔知取咩名 提交于 2023-03-07 09:45 . 业务错误日志记录错误码
/*
* This file was generated by the Gradle "init" task.
*
* This generated file contains a sample Java project to get you started.
* For more details take a look at the Java Quickstart chapter in the Gradle
* User Manual available at https://docs.gradle.org/6.3/userguide/tutorial_java_projects.html
*/
plugins {
// Apply the java plugin to add support for Java
id "java-library"
id "maven-publish"
}
ext {
set("springVersion", "5.3.7")
set("mybatisPlusVersion", "3.4.2")
set("lombokVersion", "1.18.20")
set("hutoolVersion", "4.5.7")
set("slf4jVersion", "1.7.30")
set("junitVersion", "5.7.0")
set("servletApiVersion", "3.1.0")
set("validationApiVersion", "2.0.1")
}
group "com.soulcraft"
version "0.0.6"
compileJava {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.encoding = "UTF-8"
}
compileTestJava {
sourceCompatibility = "1.8"
targetCompatibility = "1.8"
options.encoding = "UTF-8"
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
all {
resolutionStrategy.cacheChangingModulesFor 0, "hours"
}
}
jar {
manifest {
attributes(
"Implementation-Title": project.name,
"Implementation-Version": project.version,
"Build-JDK": "${System.properties["java.version"]} (${System.properties["java.vendor"]} ${System.properties["java.vm.version"]})",
"Build-OS": "${System.properties["os.name"]} ${System.properties["os.arch"]} ${System.properties["os.version"]}"
)
}
}
repositories {
mavenLocal()
}
dependencies {
annotationProcessor "org.projectlombok:lombok:${lombokVersion}"
implementation "org.slf4j:slf4j-api:${slf4jVersion}"
implementation "org.springframework:spring-web:${springVersion}"
implementation "org.springframework:spring-webmvc:${springVersion}"
implementation "org.springframework:spring-jdbc:${springVersion}"
compileOnly "javax.servlet:javax.servlet-api:${servletApiVersion}"
implementation "jakarta.validation:jakarta.validation-api:${validationApiVersion}"
implementation "cn.hutool:hutool-all:${hutoolVersion}"
implementation "com.baomidou:mybatis-plus-core:${mybatisPlusVersion}"
testImplementation "org.junit.jupiter:junit-jupiter-api:${junitVersion}"
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:${junitVersion}"
}
publishing {
publications {
maven(MavenPublication) {
from(components.java)
}
}
repositories {
maven {
name "mavenLocal"
def releasesRepoUrl = "http://localhost:8081/repository/maven-releases/"
def snapshotsRepoUrl = "http://localhost:8081/repository/maven-snapshots/"
allowInsecureProtocol = true
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username project.repoUser
password project.repoPassword
}
}
}
}
test {
useJUnitPlatform()
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化