gradle项目中build.gradle配置文件详细讲解

新建gradle项目默认生成的build.gradle文件:
 1 plugins {
 2     id 'org.springframework.boot' version '2.2.6.RELEASE'
 3     id 'io.spring.dependency-management' version '1.0.9.RELEASE'
 4     id 'java'
 5 }
 6 
 7 group = 'com.example'
 8 version = '0.0.1-SNAPSHOT'
 9 sourceCompatibility = '1.8'
10 
11 repositories {
12     mavenCentral()
13 }
14 
15 dependencies {
16     implementation 'org.springframework.boot:spring-boot-starter-web'
17     testImplementation('org.springframework.boot:spring-boot-starter-test') {
18         exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
19     }
20 }
21 
22 test {
23     useJUnitPlatform()
24 }
View Code

标签list: 

1 plugins

2 buildscript

  repositories

3 repositories

  mavenCentral()

4 ext  xxxVersion = xx

5 configurations {
  mybatisGenerator
 }

6 configure(allprojects)
  apply plugin:
  repositories
    mavenLocal()

7 configure(subprojects)
  dependencyManagement
    imports
  dependencies
    compile project(":mybatisplus-demo")
    implementation
    annotationProcessor
    compileOnly
    compile
    testImplementation
    testCompile
  compileJava
  task sourcesJar
  task javadocJar

8 dependencies

  implementation
  testImplementation
  exclude

9 xxx = xxx

10 test

  useJUnitPlatform

PS:持续更新中。。。

 

猜你喜欢

转载自www.cnblogs.com/caesar-the-great/p/12671179.html