1 Star 0 Fork 0

对号 / jojava

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.gradle 1.87 KB
一键复制 编辑 原始数据 按行查看 历史
刘亚东 提交于 2023-11-10 04:17 . 增加自定义banner
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.5' apply false
id 'io.spring.dependency-management' version '1.1.3'
}
group = 'com.jojava'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '21'
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
// 所有项目(主项目+子项目)配置
allprojects {
// 指定需要的插件
// 指定语言
apply plugin: 'java'
// 配置项目信息(继承主项目)
group group
version version
// 配置仓库
repositories {
//阿里
maven { url 'https://maven.aliyun.com/nexus/content/groups/public/' }
//腾讯
//maven { url 'https://mirrors.cloud.tencent.com/nexus/repository/maven-public/' }
//华为
//maven { url 'https://developer.huawei.com/repo/' }
mavenCentral()
gradlePluginPortal()
mavenLocal()
}
}
// 子项目配置
subprojects {
// 子项目插入组件
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'java'
// 编译JDK版本
// sourceCompatibility = '21'
// 配置字符编码
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
// 子项目引用依赖
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-elasticsearch'
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
}
tasks.named('test') {
useJUnitPlatform()
}
// 开启构建bootJar
tasks.bootJar {
enabled = true
}
// tasks.jar {
// enabled = true
// }
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/duihao/jojava.git
git@gitee.com:duihao/jojava.git
duihao
jojava
jojava
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891