// build.gradle plugins { id 'org.springframework.boot' version '2.7.8' id 'io.spring.dependency-management' version '1.0.11.RELEASE' id 'java' } sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 repositories { mavenLocal() maven { url "https://mirrors.cloud.tencent.com/nexus/repository/maven-public/" } mavenCentral() } // 统一管理版本号 ext { springBootVersion = '2.7.8' gsonVersion = '2.10.1' } dependencies { implementation "org.springframework.boot:spring-boot-starter-web:${springBootVersion}" implementation "com.google.code.gson:gson:${gsonVersion}" } jar { group = 'org.person' archiveBaseName = 'gradle-deploy' archiveVersion = '0.1-SNAPSHOT' archiveClassifier = '' // 设置分类器为空字符串,去除额外后缀 }