| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- 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")
- }
- //所有子项目使用的插件
- apply(plugin = "java-library")
- }
- //指定使用的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()
- }
|