plugins { java } group = "space.anyi" version = "1.0-SNAPSHOT" description = "学习springboot自动配置的项目,顺便学习gradle进行项目构建" //在所有子项目中指定编码 allprojects { repositories { mavenCentral() } tasks.withType { options.encoding = "UTF-8" } tasks.withType { options.encoding = "UTF-8" } tasks.withType { systemProperty("file.encoding", "UTF-8") } } //指定使用的jdk版本 java { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } dependencies { testImplementation("org.junit.jupiter:junit-jupiter-api:5.6.0") testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine") } tasks.getByName("test") { useJUnitPlatform() }