| 123456789101112131415161718192021222324252627282930313233343536373839404142 |
- plugins {
- java
- }
- group = "space.anyi"
- version = "1.0-SNAPSHOT"
- description = "学习springboot自动配置的项目,顺便学习gradle进行项目构建"
- //在所有子项目中指定编码
- allprojects {
- repositories {
- mavenCentral()
- }
- tasks.withType<JavaCompile> {
- options.encoding = "UTF-8"
- }
- tasks.withType<Javadoc> {
- options.encoding = "UTF-8"
- }
- tasks.withType<Test> {
- 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>("test") {
- useJUnitPlatform()
- }
|