9
개개 개개개개 개 - Gradle 개개개개 2015 개 8 개 개개 + 개개 + 개개 + 개개

Gradle 사용가이드

  • Upload
    ibk-

  • View
    437

  • Download
    4

Embed Size (px)

Citation preview

Page 1: Gradle 사용가이드

개발 엔지니어 삶- Gradle 사용하기

2015 년 8 월공부 + 열정 + 가정 + 회사

Page 2: Gradle 사용가이드

build.gradle

buildscript {     ext {         springBootVersion = '1.2.2.RELEASE'     }     repositories {         mavenCentral()     }     dependencies {         classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")     } }

apply plugin: 'java' apply plugin: 'eclipse-wtp' apply plugin: 'idea' apply plugin: 'spring-boot'  apply plugin: 'war'

war {     baseName = 'gradleWebServer'     version = '1.0.1-SNAPSHOT' }

sourceCompatibility = 1.7 targetCompatibility = 1.7

repositories {     mavenCentral() }

Page 3: Gradle 사용가이드

build.gradle

configurations {     providedRuntime }

dependencies {     compile("org.springframework.boot:spring-boot-starter-hornetq")     compile("org.springframework.boot:spring-boot-starter-web")     compile("org.springframework.boot:spring-boot-starter-integration")     compile("org.springframework.integration:spring-integration-core")     compile('org.springframework.integration:spring-integration-http:4.1.3.RELEASE')     compile('org.springframework.integration:spring-integration-jms:4.1.2.RELEASE')     compile("org.springframework.integration:spring-integration-java-dsl:1.0.1.RELEASE")     compile('org.springframework.data:spring-data-commons:1.9.2.RELEASE')     compile("com.google.guava:guava:16.0.1")     compile('org.apache.activemq:activemq-broker:5.11.1')     compile('org.apache.activemq:activemq-kahadb-store:5.11.1')     compile('javax.el:javax.el-api:3.0.0')     providedRuntime("org.springframework.boot:spring-boot-starter-tomcat")     testCompile("org.springframework.boot:spring-boot-starter-test")  }

mainClassName = 'ldcc.integration.exercise.SpringIntegrationExerciseApplication'

task wrapper(type: Wrapper) {     gradleVersion = '2.5' }

Page 4: Gradle 사용가이드

gradle/wrapper/gradle-wrapper.properties

distributionBase=GRADLE_USER_HOMEdistributionPath=wrapper/distszipStoreBase=GRADLE_USER_HOMEzipStorePath=wrapper/distsdistributionUrl=https\://services.gradle.org/distributions/gradle-2.5-all.zip

Page 5: Gradle 사용가이드

build.gradle

package ldcc..integration.exercise;

import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ImportResource; import org.springframework.context.annotation.PropertySource; import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;

@SpringBootApplication @ImportResource(value = "/META-INF/integration-context.xml") @PropertySource("classpath:application.properties") public class SpringIntegrationExerciseApplication {

    @Bean     public PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {         return new PropertySourcesPlaceholderConfigurer();     }     public static void main(String[] args) {         SpringApplication.run(SpringIntegrationExerciseApplication.class, args);     } }

Page 6: Gradle 사용가이드

프로젝트 파일 - 디렉토리 구조

Page 7: Gradle 사용가이드

빌더 - gradle 메뉴

Page 8: Gradle 사용가이드

빌더 - gradle 빌더 ( run, jar , war , assemble , bootRun, build , clean )

Page 9: Gradle 사용가이드

빌더 - gradle 빌더 ( bootRun )