크키런 2023. 1. 12. 17:24
728x90

빌드 자동화 툴.

라이브러리를 쉽게 관리할 수 있게 해준다

plugins {
	id 'org.springframework.boot' version '2.7.2'
	id 'io.spring.dependency-management' version '1.0.12.RELEASE'
	id 'java'
}

group = 'com.example' 
version = '0.0.1-SNAPSHOT'  //프로젝트 버전
sourceCompatibility = '11'

configurations {
	compileOnly {
		extendsFrom annotationProcessor
	}
}

repositories { //라이브러리를 다운로드 하는 곳을 리포지터리라고 함.
	mavenCentral() //메이븐센트럴 이용
}

dependencies { //여기에 명시한 라이브러리를 자동으로 다운 및 설치
	implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
	implementation 'org.springframework.boot:spring-boot-starter-web'
	compileOnly 'org.projectlombok:lombok'
	runtimeOnly 'com.h2database:h2'
	annotationProcessor 'org.projectlombok:lombok'
	testImplementation 'org.springframework.boot:spring-boot-starter-test'
	// https://mvnrepository.com/artifact/com.google.guava/guava
	implementation group: 'com.google.guava', name: 'guava', version: '31.0.1-jre'
	// https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt
	implementation group: 'io.jsonwebtoken', name: 'jjwt', version: '0.9.1'
	implementation 'org.springframework.boot:spring-boot-starter-security'
	runtimeOnly 'mysql:mysql-connector-java'
}

tasks.named('test') {
	useJUnitPlatform()
}
728x90